2 * Copyright (C) 2007 Alessandro Molina <amol.wrk@gmail.com>
3 * based on previous RTSP support from Benjamin Zores.
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.
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.
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
20 #define HAVE_STRUCT_SOCKADDR_STORAGE
28 #include "nemesi/rtsp.h"
33 #include "libmpdemux/demuxer.h"
37 extern int network_bandwidth
;
38 char *rtsp_destination
= NULL
;
40 static int rtsp_streaming_seek(int fd
, off_t pos
,
41 streaming_ctrl_t
* streaming_ctrl
) {
45 static int rtsp_streaming_open (stream_t
*stream
, int mode
, void *opts
,
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
)
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
;
62 *file_format
= DEMUXER_TYPE_RTP_NEMESI
;
63 stream
->type
= STREAMTYPE_STREAM
;
67 const stream_info_t stream_info_rtsp
= {
71 "implemented over libnemesi",
75 0 /* Urls are an option string */