annotate stream/stream_rtsp.c @ 25357:b265c001e64a

Add new audio filter for encoding multi-channel audio into ac3 at runtime. And if set first parameter of this filter to 1, it will do ac3 passthrough like hwac3 did.
author ulion
date Thu, 13 Dec 2007 12:38:17 +0000
parents c1d17bd6683c
children a26e50cae389
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 /*
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
2 * Copyright (C) 2006 Benjamin Zores
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
3 * based on previous Real RTSP support from Roberto Togni and xine team.
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
4 *
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
5 * This program is free software; you can redistribute it and/or modify
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
6 * it under the terms of the GNU General Public License as published by
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
7 * the Free Software Foundation; either version 2 of the License, or
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
8 * (at your option) any later version.
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
9 *
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful,
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
13 * GNU General Public License for more details.
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
14 *
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
16 * along with this program; if not, write to the Free Software Foundation,
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
18 */
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
19
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
20 #include <stdlib.h>
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
21 #include <string.h>
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
22 #include <unistd.h>
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 <stdio.h>
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
25 #include <sys/types.h>
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
26 #include <ctype.h>
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
27 #include "config.h"
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
28 #ifndef HAVE_WINSOCK2
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
29 #include <netinet/in.h>
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
30 #include <sys/socket.h>
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
31 #include <arpa/inet.h>
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
32 #define closesocket close
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
33 #else
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
34 #include <winsock2.h>
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
35 #include <ws2tcpip.h>
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
36 #endif
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
37 #include <errno.h>
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
38
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
39 #include "stream.h"
19335
2a9d669e5ff6 isolated tcp socket code from network.c to a dedicated file
ben
parents: 19271
diff changeset
40 #include "tcp.h"
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
41 #include "librtsp/rtsp.h"
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
42 #include "librtsp/rtsp_session.h"
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
43
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
44 #define RTSP_DEFAULT_PORT 554
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
45
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
46 extern int network_bandwidth;
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 static int
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
49 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
50 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
51 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
52 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
53 }
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 static int
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
56 rtsp_streaming_start (stream_t *stream)
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 int fd;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
59 rtsp_session_t *rtsp;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
60 char *mrl;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
61 char *file;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
62 int port;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
63 int redirected, temp;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
64
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
65 if (!stream)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
66 return -1;
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 /* 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
69 temp = 5;
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 do {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
72 redirected = 0;
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 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
75 port = (stream->streaming_ctrl->url->port ?
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
76 stream->streaming_ctrl->url->port :
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
77 RTSP_DEFAULT_PORT), 1);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
78
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
79 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
80 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
81 port = 7070, 1);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
82
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
83 if (fd < 0)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
84 return -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 file = stream->streaming_ctrl->url->file;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
87 if (file[0] == '/')
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
88 file++;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
89
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
90 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
91 + strlen (file) + 16);
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 sprintf (mrl, "rtsp://%s:%i/%s",
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
94 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
95
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
96 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
97 stream->streaming_ctrl->url->hostname,
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
98 port, &redirected,
20527
b8f069b793c2 Realrtsp authentication
rtogni
parents: 20185
diff changeset
99 stream->streaming_ctrl->bandwidth,
b8f069b793c2 Realrtsp authentication
rtogni
parents: 20185
diff changeset
100 stream->streaming_ctrl->url->username,
b8f069b793c2 Realrtsp authentication
rtogni
parents: 20185
diff changeset
101 stream->streaming_ctrl->url->password);
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
102
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
103 if (redirected == 1)
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 url_free (stream->streaming_ctrl->url);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
106 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
107 closesocket (fd);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
108 }
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 free (mrl);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
111 temp--;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
112 } while ((redirected != 0) && (temp > 0));
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
113
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
114 if (!rtsp)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
115 return -1;
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 stream->fd = fd;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
118 stream->streaming_ctrl->data = rtsp;
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->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
121 stream->streaming_ctrl->streaming_seek = NULL;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
122 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
123 stream->streaming_ctrl->buffering = 1;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
124 stream->streaming_ctrl->status = streaming_playing_e;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
125
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
126 return 0;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
127 }
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 static void
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
130 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
131 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
132 rtsp_session_t *rtsp = NULL;
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 = (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
135 if (rtsp)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
136 rtsp_session_end (rtsp);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
137 }
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 static int
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
140 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
141 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
142 URL_t *url;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
143 extern int index_mode;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
144
20185
b6eed21e0535 slight overall verbosity reduction
diego
parents: 19335
diff changeset
145 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
146 stream->streaming_ctrl = streaming_ctrl_new ();
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
147 if (!stream->streaming_ctrl)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
148 return STREAM_ERROR;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
149
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
150 stream->streaming_ctrl->bandwidth = network_bandwidth;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
151 url = url_new (stream->url);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
152 stream->streaming_ctrl->url = check4proxies (url);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
153
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
154 stream->fd = -1;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
155 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
156 if (rtsp_streaming_start (stream) < 0)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
157 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
158 streaming_ctrl_free (stream->streaming_ctrl);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
159 stream->streaming_ctrl = NULL;
24257
d261f5109660 cosmetics: typo fix UNSUPORTED --> UNSUPPORTED
diego
parents: 20527
diff changeset
160 return STREAM_UNSUPPORTED;
19155
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
161 }
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 fixup_network_stream_cache (stream);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
164 stream->type = STREAMTYPE_STREAM;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
165 stream->close = rtsp_streaming_close;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
166
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
167 return STREAM_OK;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
168 }
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
169
25211
c1d17bd6683c Mark all stream_info_t as const
reimar
parents: 24257
diff changeset
170 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
171 "RTSP streaming",
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
172 "rtsp",
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
173 "Benjamin Zores, Roberto Togni",
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
174 "ported from xine",
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
175 rtsp_streaming_open,
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
176 {"rtsp", NULL},
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
177 NULL,
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
178 0 /* Urls are an option string */
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
179 };