Mercurial > mplayer.hg
annotate stream/stream_nemesi.c @ 26467:d5d8c4974d7a
Create standard recursive rules from a template.
author | diego |
---|---|
date | Tue, 22 Apr 2008 22:00:37 +0000 |
parents | 23c21064c571 |
children | a26e50cae389 |
rev | line source |
---|---|
24564 | 1 /* |
2 * Copyright (C) 2007 Alessandro Molina <amol.wrk@gmail.com> | |
3 * based on previous RTSP support from Benjamin Zores. | |
4 * | |
5 * MPlayer is free software; you can redistribute it and/or modify | |
6 * it under the terms of the GNU General Public License as published by | |
7 * the Free Software Foundation; either version 2 of the License, or | |
8 * (at your option) any later version. | |
9 * | |
10 * MPlayer is distributed in the hope that it will be useful, | |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 * GNU General Public License for more details. | |
14 * | |
15 * You should have received a copy of the GNU General Public License | |
16 * along with MPlayer; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
18 */ | |
19 | |
20 #define HAVE_STRUCT_SOCKADDR_STORAGE | |
21 | |
22 #include <stdlib.h> | |
23 #include <string.h> | |
24 #include <stdlib.h> | |
25 #include <stdio.h> | |
26 #include <ctype.h> | |
27 #include "config.h" | |
28 #include "nemesi/rtsp.h" | |
29 | |
30 #include <errno.h> | |
31 | |
32 #include "stream.h" | |
25268 | 33 #include "libmpdemux/demuxer.h" |
34 | |
24564 | 35 #include "tcp.h" |
36 | |
37 extern int network_bandwidth; | |
38 char *rtsp_destination = NULL; | |
39 | |
40 static int rtsp_streaming_seek(int fd, off_t pos, | |
41 streaming_ctrl_t* streaming_ctrl) { | |
42 return -1; | |
43 } | |
44 | |
45 static int rtsp_streaming_open (stream_t *stream, int mode, void *opts, | |
46 int *file_format) | |
47 { | |
48 rtsp_ctrl * ctl; | |
49 URL_t *url; | |
50 stream->fd = -1; | |
51 | |
52 mp_msg (MSGT_OPEN, MSGL_V, "STREAM_RTSP, URL: %s\n", stream->url); | |
53 stream->streaming_ctrl = streaming_ctrl_new (); | |
54 if (!stream->streaming_ctrl) | |
55 return STREAM_ERROR; | |
56 | |
57 stream->streaming_ctrl->bandwidth = network_bandwidth; | |
58 url = url_new(stream->url); | |
59 stream->streaming_ctrl->url = check4proxies(url); | |
60 stream->streaming_ctrl->streaming_seek = rtsp_streaming_seek; | |
61 | |
25266
239330301b33
Make libnemesi use specific struct and DEMUXER_TYPE
lu_zero
parents:
25211
diff
changeset
|
62 *file_format = DEMUXER_TYPE_RTP_NEMESI; |
24564 | 63 stream->type = STREAMTYPE_STREAM; |
64 return STREAM_OK; | |
65 } | |
66 | |
25211 | 67 const stream_info_t stream_info_rtsp = { |
24564 | 68 "RTSP streaming", |
69 "rtsp", | |
70 "Alessandro Molina", | |
71 "implemented over libnemesi", | |
72 rtsp_streaming_open, | |
73 {"rtsp", NULL}, | |
74 NULL, | |
75 0 /* Urls are an option string */ | |
76 }; | |
77 |