annotate stream/stream_rtsp.c @ 31523:7ab5787e625c

configure: Fix detection of SDL backend for vo_gl on OS X SDL overrides main, and provides a prototype for SDL_main which uses argc and argv. Since the prototype didn't match the main() in the test program, it failed to compile, making the test fail when it should have worked.
author astrange
date Wed, 30 Jun 2010 09:27:03 +0000
parents 9494acd724a9
children c3c9652058f8
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 static int
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
50 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
51 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
52 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
53 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
54 }
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
55
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
56 static int
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
57 rtsp_streaming_start (stream_t *stream)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
58 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
59 int fd;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
60 rtsp_session_t *rtsp;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
61 char *mrl;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
62 char *file;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
63 int port;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
64 int redirected, temp;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
65
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
66 if (!stream)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
67 return -1;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
68
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
69 /* 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
70 temp = 5;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
71
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
72 do {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
73 redirected = 0;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
74
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
75 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
76 port = (stream->streaming_ctrl->url->port ?
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
77 stream->streaming_ctrl->url->port :
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
78 RTSP_DEFAULT_PORT), 1);
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
79
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
80 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
81 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
82 port = 7070, 1);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
83
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
84 if (fd < 0)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
85 return -1;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
86
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
87 file = stream->streaming_ctrl->url->file;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
88 if (file[0] == '/')
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
89 file++;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
90
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
91 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
92 + strlen (file) + 16);
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
93
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
94 sprintf (mrl, "rtsp://%s:%i/%s",
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
95 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
96
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
97 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
98 stream->streaming_ctrl->url->hostname,
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
99 port, &redirected,
20527
b8f069b793c2 Realrtsp authentication
rtogni
parents: 20185
diff changeset
100 stream->streaming_ctrl->bandwidth,
b8f069b793c2 Realrtsp authentication
rtogni
parents: 20185
diff changeset
101 stream->streaming_ctrl->url->username,
b8f069b793c2 Realrtsp authentication
rtogni
parents: 20185
diff changeset
102 stream->streaming_ctrl->url->password);
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
103
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
104 if (redirected == 1)
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 url_free (stream->streaming_ctrl->url);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
107 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
108 closesocket (fd);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
109 }
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
110
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
111 free (mrl);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
112 temp--;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
113 } while ((redirected != 0) && (temp > 0));
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
114
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
115 if (!rtsp)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
116 return -1;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
117
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
118 stream->fd = fd;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
119 stream->streaming_ctrl->data = rtsp;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
120
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
121 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
122 stream->streaming_ctrl->streaming_seek = NULL;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
123 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
124 stream->streaming_ctrl->buffering = 1;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
125 stream->streaming_ctrl->status = streaming_playing_e;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
126
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
127 return 0;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
128 }
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
129
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
130 static void
31179
de190efe4da3 Drop pointless _st suffix from 'struct stream'.
diego
parents: 29263
diff changeset
131 rtsp_streaming_close (struct stream *s)
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
132 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
133 rtsp_session_t *rtsp = NULL;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
134
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
135 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
136 if (rtsp)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
137 rtsp_session_end (rtsp);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
138 }
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
139
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
140 static int
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
141 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
142 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
143 URL_t *url;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
144 extern int index_mode;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
145
20185
b6eed21e0535 slight overall verbosity reduction
diego
parents: 19335
diff changeset
146 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
147 stream->streaming_ctrl = streaming_ctrl_new ();
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
148 if (!stream->streaming_ctrl)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
149 return STREAM_ERROR;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
150
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
151 stream->streaming_ctrl->bandwidth = network_bandwidth;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
152 url = url_new (stream->url);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
153 stream->streaming_ctrl->url = check4proxies (url);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
154
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
155 stream->fd = -1;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
156 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
157 if (rtsp_streaming_start (stream) < 0)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
158 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
159 streaming_ctrl_free (stream->streaming_ctrl);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
160 stream->streaming_ctrl = NULL;
24257
d261f5109660 cosmetics: typo fix UNSUPORTED --> UNSUPPORTED
diego
parents: 20527
diff changeset
161 return STREAM_UNSUPPORTED;
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
162 }
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
163
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
164 fixup_network_stream_cache (stream);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
165 stream->type = STREAMTYPE_STREAM;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
166 stream->close = rtsp_streaming_close;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
167
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
168 return STREAM_OK;
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
25211
c1d17bd6683c Mark all stream_info_t as const
reimar
parents: 24257
diff changeset
171 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
172 "RTSP streaming",
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
173 "rtsp",
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
174 "Benjamin Zores, Roberto Togni",
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
175 "ported from xine",
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
176 rtsp_streaming_open,
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
177 {"rtsp", NULL},
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
178 NULL,
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
179 0 /* Urls are an option string */
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
180 };