xine-lib  1.2.9
rtsp.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2002-2017 the xine project
3  *
4  * This file is part of xine, a free video player.
5  *
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.
10  *
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.
15  *
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19  *
20  * a minimalistic implementation of rtsp protocol,
21  * *not* RFC 2326 compilant yet.
22  */
23 
24 #ifndef HAVE_RTSP_H
25 #define HAVE_RTSP_H
26 
27 /*#include <inttypes.h> */
28 #include <xine/xine_internal.h>
29 
30 #ifdef __CYGWIN__
31 #define uint32_t unsigned int
32 #define uint16_t unsigned short int
33 #define uint8_t unsigned char
34 #endif
35 
36 /* some codes returned by rtsp_request_* functions */
37 
38 #define RTSP_STATUS_SET_PARAMETER 10
39 #define RTSP_STATUS_OK 200
40 
41 typedef struct rtsp_s rtsp_t;
42 
43 rtsp_t* rtsp_connect (xine_stream_t *stream, const char *mrl, const char *user_agent) XINE_MALLOC;
44 
45 int rtsp_request_options(rtsp_t *s, const char *what);
46 int rtsp_request_describe(rtsp_t *s, const char *what);
47 int rtsp_request_setup(rtsp_t *s, const char *what);
48 int rtsp_request_setparameter(rtsp_t *s, const char *what);
49 int rtsp_request_play(rtsp_t *s, const char *what);
50 #if 0
51 int rtsp_request_tearoff(rtsp_t *s, const char *what);
52 #endif
53 
54 int rtsp_send_ok(rtsp_t *s);
55 
56 int rtsp_read_data(rtsp_t *s, void *buffer, unsigned int size);
57 
58 const char* rtsp_search_answers(rtsp_t *s, const char *tag);
59 void rtsp_add_to_payload(char **payload, const char *string);
60 
61 void rtsp_free_answers(rtsp_t *this);
62 
63 int rtsp_read (rtsp_t *this, char *data, int len);
64 void rtsp_close (rtsp_t *this);
65 
66 #if 0
67 void rtsp_set_session(rtsp_t *s, const char *id);
68 char *rtsp_get_session(rtsp_t *s);
69 #endif
70 
71 char *rtsp_get_mrl(rtsp_t *s);
72 
73 /*int rtsp_peek_header (rtsp_t *this, char *data); */
74 
75 void rtsp_schedule_field(rtsp_t *s, const char *string);
76 #if 0
77 void rtsp_unschedule_field(rtsp_t *s, const char *string);
78 #endif
80 
81 #endif
82 
int rtsp_read_data(rtsp_t *s, void *buffer, unsigned int size)
Definition: rtsp.c:393
#define XINE_MALLOC
Definition: attributes.h:119
char * user_agent
Definition: rtsp.c:75
void rtsp_add_to_payload(char **payload, const char *string)
int s
Definition: rtsp.c:69
xine_stream_t * stream
Definition: rtsp.c:67
int rtsp_request_setparameter(rtsp_t *s, const char *what)
Definition: rtsp.c:348
void rtsp_schedule_field(rtsp_t *s, const char *string)
Definition: rtsp.c:646
int rtsp_send_ok(rtsp_t *s)
Definition: rtsp.c:294
void rtsp_free_answers(rtsp_t *this)
Definition: rtsp.c:701
void rtsp_unschedule_all(rtsp_t *s)
Definition: rtsp.c:685
int rtsp_request_describe(rtsp_t *s, const char *what)
Definition: rtsp.c:325
Definition: xine_internal.h:210
char * mrl
Definition: rtsp.c:74
int rtsp_request_options(rtsp_t *s, const char *what)
Definition: rtsp.c:309
Definition: rtsp.c:65
rtsp_t * rtsp_connect(xine_stream_t *stream, const char *mrl, const char *user_agent)
Definition: rtsp.c:456
void rtsp_close(rtsp_t *this)
Definition: rtsp.c:577
int rtsp_read(rtsp_t *this, char *data, int len)
int rtsp_request_setup(rtsp_t *s, const char *what)
Definition: rtsp.c:341
int rtsp_request_play(rtsp_t *s, const char *what)
Definition: rtsp.c:364
const char * rtsp_search_answers(rtsp_t *s, const char *tag)
Definition: rtsp.c:596
char * rtsp_get_mrl(rtsp_t *s)
Definition: rtsp.c:636