annotate stream/librtsp/rtsp.h @ 19642:db2a522e319e

Matroska subtitles are always utf-8, no need to recode them.
author eugeni
date Sat, 02 Sep 2006 19:55:45 +0000
parents 64d82a45a05d
children 3baf6a2283da
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18799
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
1 /*
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
2 * This file was ported to MPlayer from xine CVS rtsp.h,v 1.2 2002/12/16 21:50:55
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
3 */
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
4
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
5 /*
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
6 * Copyright (C) 2002 the xine project
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
7 *
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
8 * This file is part of xine, a free video player.
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
9 *
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
10 * xine is free software; you can redistribute it and/or modify
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
13 * (at your option) any later version.
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
14 *
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
15 * xine is distributed in the hope that it will be useful,
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
18 * GNU General Public License for more details.
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
19 *
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
21 * along with this program; if not, write to the Free Software
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
23 *
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
24 *
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
25 * a minimalistic implementation of rtsp protocol,
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
26 * *not* RFC 2326 compilant yet.
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
27 *
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
28 * 2006, Benjamin Zores and Vincent Mussard
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
29 * fixed a lot of RFC compliance issues.
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
30 */
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
31
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
32 #ifndef HAVE_RTSP_H
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
33 #define HAVE_RTSP_H
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
34
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
35
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
36 /* some codes returned by rtsp_request_* functions */
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
37
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
38 #define RTSP_STATUS_SET_PARAMETER 10
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
39 #define RTSP_STATUS_OK 200
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
40
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
41 #define RTSP_METHOD_OPTIONS "OPTIONS"
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
42 #define RTSP_METHOD_DESCRIBE "DESCRIBE"
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
43 #define RTSP_METHOD_SETUP "SETUP"
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
44 #define RTSP_METHOD_PLAY "PLAY"
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
45 #define RTSP_METHOD_TEARDOWN "TEARDOWN"
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
46 #define RTSP_METHOD_SET_PARAMETER "SET_PARAMETER"
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
47
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
48 typedef struct rtsp_s rtsp_t;
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
49
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
50 rtsp_t* rtsp_connect (int fd, char *mrl, char *path, char *host, int port, char *user_agent);
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
51
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
52 int rtsp_request_options(rtsp_t *s, const char *what);
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
53 int rtsp_request_describe(rtsp_t *s, const char *what);
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
54 int rtsp_request_setup(rtsp_t *s, const char *what, char *control);
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
55 int rtsp_request_setparameter(rtsp_t *s, const char *what);
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
56 int rtsp_request_play(rtsp_t *s, const char *what);
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
57 int rtsp_request_teardown(rtsp_t *s, const char *what);
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
58
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
59 int rtsp_send_ok(rtsp_t *s);
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
60
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
61 int rtsp_read_data(rtsp_t *s, char *buffer, unsigned int size);
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
62
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
63 char* rtsp_search_answers(rtsp_t *s, const char *tag);
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
64 void rtsp_add_to_payload(char **payload, const char *string);
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
65
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
66 void rtsp_free_answers(rtsp_t *this);
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
67
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
68 int rtsp_read (rtsp_t *this, char *data, int len);
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
69 void rtsp_close (rtsp_t *this);
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
70
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
71 void rtsp_set_session(rtsp_t *s, const char *id);
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
72 char *rtsp_get_session(rtsp_t *s);
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
73
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
74 char *rtsp_get_mrl(rtsp_t *s);
19108
5e767cabf4cd marks several read-only string parameters and function return-values which can only be used read-only as const. Patch by Stefan Huehner, stefan _AT huener-org
reynaldo
parents: 18799
diff changeset
75 char *rtsp_get_param(rtsp_t *s, const char *param);
18799
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
76
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
77 /*int rtsp_peek_header (rtsp_t *this, char *data); */
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
78
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
79 void rtsp_schedule_field(rtsp_t *s, const char *string);
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
80 void rtsp_unschedule_field(rtsp_t *s, const char *string);
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
81 void rtsp_unschedule_all(rtsp_t *s);
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
82
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
83 #endif
e16345b97dab moved generic rtsp related files from realrtsp to librtsp
ben
parents:
diff changeset
84