15 #ifdef STREAMING_LIVE555
17 extern int network_bandwidth
;
19 static int _rtsp_streaming_seek(int fd
, off_t pos
, streaming_ctrl_t
* streaming_ctrl
) {
20 return -1; // For now, we don't handle RTSP stream seeking
23 static int rtsp_streaming_start(stream_t
* stream
) {
24 stream
->streaming_ctrl
->streaming_seek
= _rtsp_streaming_seek
;
29 static int open_live_rtsp_sip(stream_t
*stream
,int mode
, void* opts
, int* file_format
) {
32 stream
->streaming_ctrl
= streaming_ctrl_new();
33 if( stream
->streaming_ctrl
==NULL
) {
36 stream
->streaming_ctrl
->bandwidth
= network_bandwidth
;
37 url
= url_new(stream
->url
);
38 stream
->streaming_ctrl
->url
= check4proxies(url
);
41 mp_msg(MSGT_OPEN
, MSGL_INFO
, "STREAM_LIVE555, URL: %s\n", stream
->url
);
43 if(rtsp_streaming_start(stream
) < 0) {
44 mp_msg(MSGT_NETWORK
,MSGL_ERR
,"rtsp_streaming_start failed\n");
48 *file_format
= DEMUXER_TYPE_RTP
;
49 stream
->type
= STREAMTYPE_STREAM
;
53 streaming_ctrl_free( stream
->streaming_ctrl
);
54 stream
->streaming_ctrl
= NULL
;
58 static int open_live_sdp(stream_t
*stream
,int mode
, void* opts
, int* file_format
) {
60 char *filename
= stream
->url
;
65 if(strncmp("sdp://",filename
,6) == 0) {
67 #if defined(__CYGWIN__) || defined(__MINGW32__)
68 f
= open(filename
,O_RDONLY
|O_BINARY
);
70 f
= open(filename
,O_RDONLY
);
73 mp_msg(MSGT_OPEN
,MSGL_ERR
,MSGTR_FileNotFound
,filename
);
77 len
=lseek(f
,0,SEEK_END
);
82 sdpDescription
= (char*)malloc(len
+1);
83 if(sdpDescription
== NULL
) return STREAM_ERROR
;
84 numBytesRead
= read(f
, sdpDescription
, len
);
85 if(numBytesRead
!= len
) {
89 sdpDescription
[len
] = '\0'; // to be safe
90 stream
->priv
= sdpDescription
;
92 stream
->type
= STREAMTYPE_SDP
;
93 *file_format
= DEMUXER_TYPE_RTP
;
96 return STREAM_UNSUPORTED
;
100 stream_info_t stream_info_rtsp_sip
= {
101 "standard RTSP and SIP",
104 "Uses LIVE555 Streaming Media library.",
106 {"rtsp", "sip", NULL
},
108 0 // Urls are an option string
111 stream_info_t stream_info_sdp
= {
112 "SDP stream descriptor",
115 "Uses LIVE555 Streaming Media library.",
119 0 // Urls are an option string