xine-lib: xine-lib-1.2.12/src/input/librtsp/rtsp.h Source File

xine-lib 1.2.12

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
45int rtsp_request_options(rtsp_t *s, const char *what);
46int rtsp_request_describe(rtsp_t *s, const char *what);
47int rtsp_request_setup(rtsp_t *s, const char *what);
48int rtsp_request_setparameter(rtsp_t *s, const char *what);
49int rtsp_request_play(rtsp_t *s, const char *what);
50#if 0
51int rtsp_request_tearoff(rtsp_t *s, const char *what);
52#endif
53
54int rtsp_send_ok(rtsp_t *s);
55
56int rtsp_read_data(rtsp_t *s, void *buffer, unsigned int size);
57
58const char* rtsp_search_answers(rtsp_t *s, const char *tag);
59 void rtsp_add_to_payload(char **payload, const char *string);
60
61void rtsp_free_answers(rtsp_t *this);
62
63 int rtsp_read (rtsp_t *this, char *data, int len);
64void rtsp_close (rtsp_t *this);
65
66#if 0
67void rtsp_set_session(rtsp_t *s, const char *id);
68char *rtsp_get_session(rtsp_t *s);
69#endif
70
71char *rtsp_get_mrl(rtsp_t *s);
72
73/*int rtsp_peek_header (rtsp_t *this, char *data); */
74
75void rtsp_schedule_field(rtsp_t *s, const char *string);
76#if 0
77void rtsp_unschedule_field(rtsp_t *s, const char *string);
78#endif
79void rtsp_unschedule_all(rtsp_t *s);
80
81#endif
82
XINE_MALLOC
#define XINE_MALLOC
Definition: attributes.h:141
rtsp_request_describe
int rtsp_request_describe(rtsp_t *s, const char *what)
Definition: rtsp.c:311
rtsp_request_setparameter
int rtsp_request_setparameter(rtsp_t *s, const char *what)
Definition: rtsp.c:334
rtsp_request_play
int rtsp_request_play(rtsp_t *s, const char *what)
Definition: rtsp.c:350
rtsp_free_answers
void rtsp_free_answers(rtsp_t *this)
Definition: rtsp.c:689
rtsp_unschedule_all
void rtsp_unschedule_all(rtsp_t *s)
Definition: rtsp.c:673
rtsp_schedule_field
void rtsp_schedule_field(rtsp_t *s, const char *string)
Definition: rtsp.c:634
rtsp_get_mrl
char * rtsp_get_mrl(rtsp_t *s)
Definition: rtsp.c:624
rtsp_read
int rtsp_read(rtsp_t *this, char *data, int len)
rtsp_send_ok
int rtsp_send_ok(rtsp_t *s)
Definition: rtsp.c:280
rtsp_request_setup
int rtsp_request_setup(rtsp_t *s, const char *what)
Definition: rtsp.c:327
rtsp_connect
rtsp_t * rtsp_connect(xine_stream_t *stream, const char *mrl, const char *user_agent)
Definition: rtsp.c:442
rtsp_search_answers
const char * rtsp_search_answers(rtsp_t *s, const char *tag)
Definition: rtsp.c:584
rtsp_request_options
int rtsp_request_options(rtsp_t *s, const char *what)
Definition: rtsp.c:295
rtsp_add_to_payload
void rtsp_add_to_payload(char **payload, const char *string)
rtsp_read_data
int rtsp_read_data(rtsp_t *s, void *buffer, unsigned int size)
Definition: rtsp.c:379
rtsp_close
void rtsp_close(rtsp_t *this)
Definition: rtsp.c:564
rtsp_s
Definition: rtsp.c:47
rtsp_s::stream
xine_stream_t * stream
Definition: rtsp.c:49
rtsp_s::s
int s
Definition: rtsp.c:51
rtsp_s::mrl
char * mrl
Definition: rtsp.c:56
rtsp_s::user_agent
char * user_agent
Definition: rtsp.c:57
xine_stream_s
Definition: xine_internal.h:123
xine_internal.h