annotate stream/stream_rtsp.c @ 30673:cfb6e0b4e2bd

Mark sleep_accurate() as static, it is only used within the file.
author diego
date Mon, 22 Feb 2010 21:53:06 +0000
parents 0f1b5b68af32
children de190efe4da3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
1 /*
26737
a26e50cae389 Use standard license headers with standard formatting.
diego
parents: 25211
diff changeset
2 * based on previous Real RTSP support from Roberto Togni and xine team.
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
3 *
26737
a26e50cae389 Use standard license headers with standard formatting.
diego
parents: 25211
diff changeset
4 * Copyright (C) 2006 Benjamin Zores
a26e50cae389 Use standard license headers with standard formatting.
diego
parents: 25211
diff changeset
5 *
a26e50cae389 Use standard license headers with standard formatting.
diego
parents: 25211
diff changeset
6 * This file is part of MPlayer.
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
7 *
26737
a26e50cae389 Use standard license headers with standard formatting.
diego
parents: 25211
diff changeset
8 * MPlayer is free software; you can redistribute it and/or modify
a26e50cae389 Use standard license headers with standard formatting.
diego
parents: 25211
diff changeset
9 * it under the terms of the GNU General Public License as published by
a26e50cae389 Use standard license headers with standard formatting.
diego
parents: 25211
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
a26e50cae389 Use standard license headers with standard formatting.
diego
parents: 25211
diff changeset
11 * (at your option) any later version.
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
12 *
26737
a26e50cae389 Use standard license headers with standard formatting.
diego
parents: 25211
diff changeset
13 * MPlayer is distributed in the hope that it will be useful,
a26e50cae389 Use standard license headers with standard formatting.
diego
parents: 25211
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
a26e50cae389 Use standard license headers with standard formatting.
diego
parents: 25211
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a26e50cae389 Use standard license headers with standard formatting.
diego
parents: 25211
diff changeset
16 * GNU General Public License for more details.
a26e50cae389 Use standard license headers with standard formatting.
diego
parents: 25211
diff changeset
17 *
a26e50cae389 Use standard license headers with standard formatting.
diego
parents: 25211
diff changeset
18 * You should have received a copy of the GNU General Public License along
a26e50cae389 Use standard license headers with standard formatting.
diego
parents: 25211
diff changeset
19 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
a26e50cae389 Use standard license headers with standard formatting.
diego
parents: 25211
diff changeset
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
21 */
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
22
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
23 #include <stdlib.h>
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
24 #include <string.h>
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
25 #include <unistd.h>
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
26 #include <stdlib.h>
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
27 #include <stdio.h>
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
28 #include <sys/types.h>
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
29 #include <ctype.h>
27472
c0b233cd30ca Revert moving closesocket definition and network headers to network.h.
diego
parents: 27464
diff changeset
30 #include "config.h"
28402
c884d17bd005 Convert HAVE_WINSOCK2_H into a 0/1 definition.
diego
parents: 27473
diff changeset
31 #if !HAVE_WINSOCK2_H
27472
c0b233cd30ca Revert moving closesocket definition and network headers to network.h.
diego
parents: 27464
diff changeset
32 #include <netinet/in.h>
c0b233cd30ca Revert moving closesocket definition and network headers to network.h.
diego
parents: 27464
diff changeset
33 #include <sys/socket.h>
c0b233cd30ca Revert moving closesocket definition and network headers to network.h.
diego
parents: 27464
diff changeset
34 #include <arpa/inet.h>
c0b233cd30ca Revert moving closesocket definition and network headers to network.h.
diego
parents: 27464
diff changeset
35 #else
c0b233cd30ca Revert moving closesocket definition and network headers to network.h.
diego
parents: 27464
diff changeset
36 #include <winsock2.h>
c0b233cd30ca Revert moving closesocket definition and network headers to network.h.
diego
parents: 27464
diff changeset
37 #include <ws2tcpip.h>
c0b233cd30ca Revert moving closesocket definition and network headers to network.h.
diego
parents: 27464
diff changeset
38 #endif
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
39 #include <errno.h>
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
40
27473
ae5da477539e Move '#define closesocket close' preprocessor directive to a common place
diego
parents: 27472
diff changeset
41 #include "network.h"
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
42 #include "stream.h"
19335
2a9d669e5ff6 isolated tcp socket code from network.c to a dedicated file
ben
parents: 19271
diff changeset
43 #include "tcp.h"
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
44 #include "librtsp/rtsp.h"
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
45 #include "librtsp/rtsp_session.h"
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
46
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
47 #define RTSP_DEFAULT_PORT 554
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
48
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
49 extern int network_bandwidth;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
50
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
51 static int
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
52 rtsp_streaming_read (int fd, char *buffer,
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
53 int size, streaming_ctrl_t *stream_ctrl)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
54 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
55 return rtsp_session_read (stream_ctrl->data, buffer, size);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
56 }
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
57
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
58 static int
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
59 rtsp_streaming_start (stream_t *stream)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
60 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
61 int fd;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
62 rtsp_session_t *rtsp;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
63 char *mrl;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
64 char *file;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
65 int port;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
66 int redirected, temp;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
67
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
68 if (!stream)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
69 return -1;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
70
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
71 /* counter so we don't get caught in infinite redirections */
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
72 temp = 5;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
73
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
74 do {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
75 redirected = 0;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
76
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
77 fd = connect2Server (stream->streaming_ctrl->url->hostname,
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
78 port = (stream->streaming_ctrl->url->port ?
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
79 stream->streaming_ctrl->url->port :
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
80 RTSP_DEFAULT_PORT), 1);
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
81
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
82 if (fd < 0 && !stream->streaming_ctrl->url->port)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
83 fd = connect2Server (stream->streaming_ctrl->url->hostname,
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
84 port = 7070, 1);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
85
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
86 if (fd < 0)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
87 return -1;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
88
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
89 file = stream->streaming_ctrl->url->file;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
90 if (file[0] == '/')
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
91 file++;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
92
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
93 mrl = malloc (strlen (stream->streaming_ctrl->url->hostname)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
94 + strlen (file) + 16);
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
95
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
96 sprintf (mrl, "rtsp://%s:%i/%s",
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
97 stream->streaming_ctrl->url->hostname, port, file);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
98
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
99 rtsp = rtsp_session_start (fd, &mrl, file,
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
100 stream->streaming_ctrl->url->hostname,
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
101 port, &redirected,
20527
b8f069b793c2 Realrtsp authentication
rtogni
parents: 20185
diff changeset
102 stream->streaming_ctrl->bandwidth,
b8f069b793c2 Realrtsp authentication
rtogni
parents: 20185
diff changeset
103 stream->streaming_ctrl->url->username,
b8f069b793c2 Realrtsp authentication
rtogni
parents: 20185
diff changeset
104 stream->streaming_ctrl->url->password);
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
105
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
106 if (redirected == 1)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
107 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
108 url_free (stream->streaming_ctrl->url);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
109 stream->streaming_ctrl->url = url_new (mrl);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
110 closesocket (fd);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
111 }
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
112
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
113 free (mrl);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
114 temp--;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
115 } while ((redirected != 0) && (temp > 0));
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
116
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
117 if (!rtsp)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
118 return -1;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
119
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
120 stream->fd = fd;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
121 stream->streaming_ctrl->data = rtsp;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
122
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
123 stream->streaming_ctrl->streaming_read = rtsp_streaming_read;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
124 stream->streaming_ctrl->streaming_seek = NULL;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
125 stream->streaming_ctrl->prebuffer_size = 128*1024; // 640 KBytes
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
126 stream->streaming_ctrl->buffering = 1;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
127 stream->streaming_ctrl->status = streaming_playing_e;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
128
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
129 return 0;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
130 }
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
131
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
132 static void
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
133 rtsp_streaming_close (struct stream_st *s)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
134 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
135 rtsp_session_t *rtsp = NULL;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
136
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
137 rtsp = (rtsp_session_t *) s->streaming_ctrl->data;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
138 if (rtsp)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
139 rtsp_session_end (rtsp);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
140 }
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
141
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
142 static int
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
143 rtsp_streaming_open (stream_t *stream, int mode, void *opts, int *file_format)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
144 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
145 URL_t *url;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
146 extern int index_mode;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
147
20185
b6eed21e0535 slight overall verbosity reduction
diego
parents: 19335
diff changeset
148 mp_msg (MSGT_OPEN, MSGL_V, "STREAM_RTSP, URL: %s\n", stream->url);
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
149 stream->streaming_ctrl = streaming_ctrl_new ();
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
150 if (!stream->streaming_ctrl)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
151 return STREAM_ERROR;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
152
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
153 stream->streaming_ctrl->bandwidth = network_bandwidth;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
154 url = url_new (stream->url);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
155 stream->streaming_ctrl->url = check4proxies (url);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
156
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
157 stream->fd = -1;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
158 index_mode = -1; /* prevent most RTSP streams from locking due to -idx */
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
159 if (rtsp_streaming_start (stream) < 0)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
160 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
161 streaming_ctrl_free (stream->streaming_ctrl);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
162 stream->streaming_ctrl = NULL;
24257
d261f5109660 cosmetics: typo fix UNSUPORTED --> UNSUPPORTED
diego
parents: 20527
diff changeset
163 return STREAM_UNSUPPORTED;
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
164 }
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
165
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
166 fixup_network_stream_cache (stream);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
167 stream->type = STREAMTYPE_STREAM;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
168 stream->close = rtsp_streaming_close;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
169
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
170 return STREAM_OK;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
171 }
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
172
25211
c1d17bd6683c Mark all stream_info_t as const
reimar
parents: 24257
diff changeset
173 const stream_info_t stream_info_rtsp = {
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
174 "RTSP streaming",
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
175 "rtsp",
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
176 "Benjamin Zores, Roberto Togni",
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
177 "ported from xine",
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
178 rtsp_streaming_open,
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
179 {"rtsp", NULL},
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
180 NULL,
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
181 0 /* Urls are an option string */
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
182 };