00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef HAVE_RTSP_H
00027 #define HAVE_RTSP_H
00028
00029
00030
00031 #define RTSP_STATUS_SET_PARAMETER 10
00032 #define RTSP_STATUS_OK 200
00033
00034 typedef struct rtsp_s rtsp_t;
00035
00036 typedef struct
00037 {
00038 void *p_userdata;
00039
00040 int (*pf_connect)( void *p_userdata, char *p_server, int i_port );
00041 int (*pf_disconnect)( void *p_userdata );
00042 int (*pf_read)( void *p_userdata, uint8_t *p_buffer, int i_buffer );
00043 int (*pf_read_line)( void *p_userdata, uint8_t *p_buffer, int i_buffer );
00044 int (*pf_write)( void *p_userdata, uint8_t *p_buffer, int i_buffer );
00045
00046 rtsp_t *p_private;
00047
00048 } rtsp_client_t;
00049
00050 int rtsp_connect( rtsp_client_t *, const char *mrl, const char *user_agent );
00051
00052 int rtsp_request_options( rtsp_client_t *, const char *what );
00053 int rtsp_request_describe( rtsp_client_t *, const char *what );
00054 int rtsp_request_setup( rtsp_client_t *, const char *what );
00055 int rtsp_request_setparameter( rtsp_client_t *, const char *what );
00056 int rtsp_request_play( rtsp_client_t *, const char *what );
00057 int rtsp_request_tearoff( rtsp_client_t *, const char *what );
00058
00059 int rtsp_send_ok( rtsp_client_t * );
00060
00061 int rtsp_read_data( rtsp_client_t *, char *buffer, unsigned int size );
00062
00063 char* rtsp_search_answers( rtsp_client_t *, const char *tag );
00064 void rtsp_free_answers( rtsp_client_t * );
00065
00066 void rtsp_add_to_payload( char **payload, const char *string );
00067
00068 int rtsp_read( rtsp_client_t *, char *data, int len );
00069 void rtsp_close( rtsp_client_t * );
00070
00071 void rtsp_set_session( rtsp_client_t *, const char *id );
00072 char *rtsp_get_session( rtsp_client_t * );
00073
00074 char *rtsp_get_mrl( rtsp_client_t * );
00075
00076
00077
00078 void rtsp_schedule_field( rtsp_client_t *, const char *string );
00079 void rtsp_unschedule_field( rtsp_client_t *, const char *string );
00080 void rtsp_unschedule_all( rtsp_client_t * );
00081
00082 #endif
00083