annotate stream/stream_rtsp.c @ 33771:6e774a02d00c

Remove gtkClearStruct code from mplayer() in interface.c. Move it as static function guiInfoMediumClear() where it is used and rename the symbolic constants used with this code.
author ib
date Sat, 09 Jul 2011 11:48:13 +0000
parents c3c9652058f8
children 8f6d3f8ffa61
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
32018
c3c9652058f8 Add proper #include instead of declaring index_mode extern.
diego
parents: 31427
diff changeset
41 #include "libmpdemux/demuxer.h"
27473
ae5da477539e Move '#define closesocket close' preprocessor directive to a common place
diego
parents: 27472
diff changeset
42 #include "network.h"
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
43 #include "stream.h"
19335
2a9d669e5ff6 isolated tcp socket code from network.c to a dedicated file
ben
parents: 19271
diff changeset
44 #include "tcp.h"
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
45 #include "librtsp/rtsp.h"
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
46 #include "librtsp/rtsp_session.h"
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
47
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
48 #define RTSP_DEFAULT_PORT 554
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
49
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
50 static int
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
51 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
52 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
53 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
54 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
55 }
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 static int
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
58 rtsp_streaming_start (stream_t *stream)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
59 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
60 int fd;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
61 rtsp_session_t *rtsp;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
62 char *mrl;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
63 char *file;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
64 int port;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
65 int redirected, temp;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
66
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
67 if (!stream)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
68 return -1;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
69
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
70 /* 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
71 temp = 5;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
72
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
73 do {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
74 redirected = 0;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
75
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
76 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
77 port = (stream->streaming_ctrl->url->port ?
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
78 stream->streaming_ctrl->url->port :
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
79 RTSP_DEFAULT_PORT), 1);
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
80
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
81 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
82 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
83 port = 7070, 1);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
84
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
85 if (fd < 0)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
86 return -1;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
87
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
88 file = stream->streaming_ctrl->url->file;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
89 if (file[0] == '/')
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
90 file++;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
91
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
92 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
93 + strlen (file) + 16);
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
94
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
95 sprintf (mrl, "rtsp://%s:%i/%s",
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
96 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
97
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
98 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
99 stream->streaming_ctrl->url->hostname,
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
100 port, &redirected,
20527
b8f069b793c2 Realrtsp authentication
rtogni
parents: 20185
diff changeset
101 stream->streaming_ctrl->bandwidth,
b8f069b793c2 Realrtsp authentication
rtogni
parents: 20185
diff changeset
102 stream->streaming_ctrl->url->username,
b8f069b793c2 Realrtsp authentication
rtogni
parents: 20185
diff changeset
103 stream->streaming_ctrl->url->password);
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
104
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
105 if (redirected == 1)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
106 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
107 url_free (stream->streaming_ctrl->url);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
108 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
109 closesocket (fd);
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
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
112 free (mrl);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
113 temp--;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
114 } while ((redirected != 0) && (temp > 0));
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
115
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
116 if (!rtsp)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
117 return -1;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
118
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
119 stream->fd = fd;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
120 stream->streaming_ctrl->data = rtsp;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
121
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
122 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
123 stream->streaming_ctrl->streaming_seek = NULL;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
124 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
125 stream->streaming_ctrl->buffering = 1;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
126 stream->streaming_ctrl->status = streaming_playing_e;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
127
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
128 return 0;
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
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
131 static void
31179
de190efe4da3 Drop pointless _st suffix from 'struct stream'.
diego
parents: 29263
diff changeset
132 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
133 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
134 rtsp_session_t *rtsp = NULL;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28402
diff changeset
135
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
136 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
137 if (rtsp)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
138 rtsp_session_end (rtsp);
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
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
141 static int
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
142 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
143 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
144 URL_t *url;
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 };