annotate stream/stream_rtsp.c @ 20285:9ec1f7cffb3e

more updates on chinese translation patch by Sheldon Jin (jinsh2 yahoo com)
author kraymer
date Wed, 18 Oct 2006 00:29:41 +0000
parents b6eed21e0535
children b8f069b793c2
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,
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
99 stream->streaming_ctrl->bandwidth);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
100
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
101 if (redirected == 1)
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 url_free (stream->streaming_ctrl->url);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
104 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
105 closesocket (fd);
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
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
108 free (mrl);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
109 temp--;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
110 } while ((redirected != 0) && (temp > 0));
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 if (!rtsp)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
113 return -1;
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 stream->fd = fd;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
116 stream->streaming_ctrl->data = rtsp;
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->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
119 stream->streaming_ctrl->streaming_seek = NULL;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
120 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
121 stream->streaming_ctrl->buffering = 1;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
122 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
123
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
124 return 0;
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
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
127 static void
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
128 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
129 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
130 rtsp_session_t *rtsp = NULL;
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 = (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
133 if (rtsp)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
134 rtsp_session_end (rtsp);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
135 }
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
136
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
137 static int
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
138 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
139 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
140 URL_t *url;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
141 extern int index_mode;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
142
20185
b6eed21e0535 slight overall verbosity reduction
diego
parents: 19335
diff changeset
143 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
144 stream->streaming_ctrl = streaming_ctrl_new ();
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
145 if (!stream->streaming_ctrl)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
146 return STREAM_ERROR;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
147
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
148 stream->streaming_ctrl->bandwidth = network_bandwidth;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
149 url = url_new (stream->url);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
150 stream->streaming_ctrl->url = check4proxies (url);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
151
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
152 stream->fd = -1;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
153 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
154 if (rtsp_streaming_start (stream) < 0)
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
155 {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
156 streaming_ctrl_free (stream->streaming_ctrl);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
157 stream->streaming_ctrl = NULL;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
158 return STREAM_UNSUPORTED;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
159 }
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 fixup_network_stream_cache (stream);
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
162 stream->type = STREAMTYPE_STREAM;
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
163 stream->close = rtsp_streaming_close;
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 return STREAM_OK;
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
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
168 stream_info_t stream_info_rtsp = {
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
169 "RTSP streaming",
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
170 "rtsp",
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
171 "Benjamin Zores, Roberto Togni",
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
172 "ported from xine",
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
173 rtsp_streaming_open,
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
174 {"rtsp", NULL},
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
175 NULL,
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
176 0 /* Urls are an option string */
188225d6ba3f rename rtsp.c to stream_rtsp.c for consistency with other input modules
ben
parents:
diff changeset
177 };