Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

rtsp.h

00001 /*
00002  * Copyright (C) 2002-2003 the xine project
00003  *
00004  * This file is part of xine, a free video player.
00005  *
00006  * xine is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * xine is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
00019  *
00020  * $Id: rtsp.h,v 1.4 2003/12/09 00:02:31 f1rmb Exp $
00021  *
00022  * a minimalistic implementation of rtsp protocol,
00023  * *not* RFC 2326 compilant yet.
00024  */
00025  
00026 #ifndef HAVE_RTSP_H
00027 #define HAVE_RTSP_H
00028 
00029 /* some codes returned by rtsp_request_* functions */
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 /* int rtsp_peek_header( rtsp_client_t *, char *data ); */
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 

Generated on Tue Dec 20 10:14:26 2005 for vlc-0.8.4a by  doxygen 1.4.2