xine-lib 1.2.13-20230125hg15249
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
41typedef struct rtsp_s rtsp_t;
42
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
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);
59void rtsp_add_to_payload(char **payload, const char *string);
60
61void rtsp_free_answers(rtsp_t *this);
62
63int 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
80
81#endif
82
#define XINE_MALLOC
Definition attributes.h:141
int rtsp_request_describe(rtsp_t *s, const char *what)
Definition rtsp.c:311
int rtsp_request_setparameter(rtsp_t *s, const char *what)
Definition rtsp.c:334
int rtsp_request_play(rtsp_t *s, const char *what)
Definition rtsp.c:350
void rtsp_free_answers(rtsp_t *this)
Definition rtsp.c:689
void rtsp_unschedule_all(rtsp_t *s)
Definition rtsp.c:673
void rtsp_schedule_field(rtsp_t *s, const char *string)
Definition rtsp.c:634
char * rtsp_get_mrl(rtsp_t *s)
Definition rtsp.c:624
int rtsp_read(rtsp_t *this, char *data, int len)
int rtsp_send_ok(rtsp_t *s)
Definition rtsp.c:280
int rtsp_request_setup(rtsp_t *s, const char *what)
Definition rtsp.c:327
rtsp_t * rtsp_connect(xine_stream_t *stream, const char *mrl, const char *user_agent)
Definition rtsp.c:442
const char * rtsp_search_answers(rtsp_t *s, const char *tag)
Definition rtsp.c:584
int rtsp_request_options(rtsp_t *s, const char *what)
Definition rtsp.c:295
void rtsp_add_to_payload(char **payload, const char *string)
int rtsp_read_data(rtsp_t *s, void *buffer, unsigned int size)
Definition rtsp.c:379
void rtsp_close(rtsp_t *this)
Definition rtsp.c:564
Definition rtsp.c:47
xine_stream_t * stream
Definition rtsp.c:49
int s
Definition rtsp.c:51
char * mrl
Definition rtsp.c:56
char * user_agent
Definition rtsp.c:57
Definition xine_internal.h:123