2 * based on previous RTSP support from Benjamin Zores.
4 * Copyright (C) 2007 Alessandro Molina <amol.wrk@gmail.com>
6 * This file is part of MPlayer.
8 * MPlayer is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * MPlayer is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #define HAVE_STRUCT_SOCKADDR_STORAGE
31 #include "nemesi/rtsp.h"
36 #include "libmpdemux/demuxer.h"
40 extern int network_bandwidth
;
41 char *rtsp_destination
= NULL
;
43 static int rtsp_streaming_seek(int fd
, off_t pos
,
44 streaming_ctrl_t
* streaming_ctrl
) {
48 static int rtsp_streaming_open (stream_t
*stream
, int mode
, void *opts
,
55 mp_msg (MSGT_OPEN
, MSGL_V
, "STREAM_RTSP, URL: %s\n", stream
->url
);
56 stream
->streaming_ctrl
= streaming_ctrl_new ();
57 if (!stream
->streaming_ctrl
)
60 stream
->streaming_ctrl
->bandwidth
= network_bandwidth
;
61 url
= url_new(stream
->url
);
62 stream
->streaming_ctrl
->url
= check4proxies(url
);
63 stream
->streaming_ctrl
->streaming_seek
= rtsp_streaming_seek
;
65 *file_format
= DEMUXER_TYPE_RTP_NEMESI
;
66 stream
->type
= STREAMTYPE_STREAM
;
70 const stream_info_t stream_info_rtsp
= {
74 "implemented over libnemesi",
78 0 /* Urls are an option string */