contrib: theora: do not run autoreconf
[vlc/gmpfix.git] / modules / access / rtsp / rtsp.h
blobfc73642ca2d3f9939ef1e233aa00b8ac64ac46d1
1 /*
2 * Copyright (C) 2002-2003 the xine project
4 * This file is part of xine, a free video player.
6 * xine is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * xine is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
20 * $Id$
22 * a minimalistic implementation of rtsp protocol,
23 * *not* RFC 2326 compilant yet.
26 #ifndef HAVE_RTSP_H
27 #define HAVE_RTSP_H
29 /* some codes returned by rtsp_request_* functions */
31 #define RTSP_STATUS_SET_PARAMETER 10
32 #define RTSP_STATUS_OK 200
34 typedef struct rtsp_s rtsp_t;
36 typedef struct
38 void *p_userdata;
40 int (*pf_connect)( void *p_userdata, char *p_server, int i_port );
41 int (*pf_disconnect)( void *p_userdata );
42 int (*pf_read)( void *p_userdata, uint8_t *p_buffer, int i_buffer );
43 int (*pf_read_line)( void *p_userdata, uint8_t *p_buffer, int i_buffer );
44 int (*pf_write)( void *p_userdata, uint8_t *p_buffer, int i_buffer );
46 rtsp_t *p_private;
48 } rtsp_client_t;
50 int rtsp_connect( rtsp_client_t *, const char *mrl, const char *user_agent );
52 int rtsp_request_options( rtsp_client_t *, const char *what );
53 int rtsp_request_describe( rtsp_client_t *, const char *what );
54 int rtsp_request_setup( rtsp_client_t *, const char *what );
55 int rtsp_request_setparameter( rtsp_client_t *, const char *what );
56 int rtsp_request_play( rtsp_client_t *, const char *what );
57 int rtsp_request_tearoff( rtsp_client_t *, const char *what );
59 int rtsp_send_ok( rtsp_client_t * );
61 int rtsp_read_data( rtsp_client_t *, uint8_t *buffer, unsigned int size );
63 char* rtsp_search_answers( rtsp_client_t *, const char *tag );
64 void rtsp_free_answers( rtsp_client_t * );
66 void rtsp_add_to_payload( char **payload, const char *string );
68 int rtsp_read( rtsp_client_t *, char *data, int len );
69 void rtsp_close( rtsp_client_t * );
71 void rtsp_set_session( rtsp_client_t *, const char *id );
72 char *rtsp_get_session( rtsp_client_t * );
74 char *rtsp_get_mrl( rtsp_client_t * );
76 /* int rtsp_peek_header( rtsp_client_t *, char *data ); */
78 void rtsp_schedule_field( rtsp_client_t *, const char *string );
79 void rtsp_unschedule_field( rtsp_client_t *, const char *string );
80 void rtsp_unschedule_all( rtsp_client_t * );
82 #endif