Mercurial > mplayer.hg
comparison libmpdemux/demuxer.c @ 6910:1a747aee653b
applied live.com streaming patch (-sdp and rtsp:// support) by Ross Finlayson <finlayson@live.com>
see <http://www.live.com/mplayer/> for details.
author | arpi |
---|---|
date | Mon, 05 Aug 2002 00:39:07 +0000 |
parents | 88953ff93743 |
children | cc46462d0015 |
comparison
equal
deleted
inserted
replaced
6909:db5e0161f021 | 6910:1a747aee653b |
---|---|
148 extern void demux_close_bmp(demuxer_t* demuxer); | 148 extern void demux_close_bmp(demuxer_t* demuxer); |
149 extern void demux_close_fli(demuxer_t* demuxer); | 149 extern void demux_close_fli(demuxer_t* demuxer); |
150 extern void demux_close_nuv(demuxer_t* demuxer); | 150 extern void demux_close_nuv(demuxer_t* demuxer); |
151 extern void demux_close_audio(demuxer_t* demuxer); | 151 extern void demux_close_audio(demuxer_t* demuxer); |
152 extern void demux_close_ogg(demuxer_t* demuxer); | 152 extern void demux_close_ogg(demuxer_t* demuxer); |
153 extern void demux_close_rtp(demuxer_t* demuxer); | |
153 extern void demux_close_demuxers(demuxer_t* demuxer); | 154 extern void demux_close_demuxers(demuxer_t* demuxer); |
154 extern void demux_close_avi(demuxer_t *demuxer); | 155 extern void demux_close_avi(demuxer_t *demuxer); |
155 | 156 |
156 void free_demuxer(demuxer_t *demuxer){ | 157 void free_demuxer(demuxer_t *demuxer){ |
157 int i; | 158 int i; |
177 demux_close_nuv(demuxer); break; | 178 demux_close_nuv(demuxer); break; |
178 case DEMUXER_TYPE_AUDIO: | 179 case DEMUXER_TYPE_AUDIO: |
179 demux_close_audio(demuxer); break; | 180 demux_close_audio(demuxer); break; |
180 case DEMUXER_TYPE_OGG: | 181 case DEMUXER_TYPE_OGG: |
181 demux_close_ogg(demuxer); break; | 182 demux_close_ogg(demuxer); break; |
183 #ifdef STREAMING_LIVE_DOT_COM | |
184 case DEMUXER_TYPE_RTP: | |
185 demux_close_rtp(demuxer); break; | |
186 #endif | |
182 case DEMUXER_TYPE_DEMUXERS: | 187 case DEMUXER_TYPE_DEMUXERS: |
183 demux_close_demuxers(demuxer); return; | 188 demux_close_demuxers(demuxer); return; |
184 case DEMUXER_TYPE_AVI: | 189 case DEMUXER_TYPE_AVI: |
185 case DEMUXER_TYPE_AVI_NI: | 190 case DEMUXER_TYPE_AVI_NI: |
186 case DEMUXER_TYPE_AVI_NINI: | 191 case DEMUXER_TYPE_AVI_NINI: |
253 int demux_asf_fill_buffer(demuxer_t *demux); | 258 int demux_asf_fill_buffer(demuxer_t *demux); |
254 int demux_mov_fill_buffer(demuxer_t *demux,demux_stream_t* ds); | 259 int demux_mov_fill_buffer(demuxer_t *demux,demux_stream_t* ds); |
255 int demux_vivo_fill_buffer(demuxer_t *demux); | 260 int demux_vivo_fill_buffer(demuxer_t *demux); |
256 int demux_real_fill_buffer(demuxer_t *demuxer); | 261 int demux_real_fill_buffer(demuxer_t *demuxer); |
257 int demux_nuv_fill_buffer(demuxer_t *demux); | 262 int demux_nuv_fill_buffer(demuxer_t *demux); |
263 int demux_rtp_fill_buffer(demuxer_t *demux, demux_stream_t* ds); | |
258 #ifdef USE_TV | 264 #ifdef USE_TV |
259 #include "tv.h" | 265 #include "tv.h" |
260 extern tvi_handle_t *tv_handler; | 266 extern tvi_handle_t *tv_handler; |
261 extern int tv_param_on; | 267 extern int tv_param_on; |
262 | 268 |
294 case DEMUXER_TYPE_Y4M: return demux_y4m_fill_buffer(demux); | 300 case DEMUXER_TYPE_Y4M: return demux_y4m_fill_buffer(demux); |
295 case DEMUXER_TYPE_AUDIO: return demux_audio_fill_buffer(ds); | 301 case DEMUXER_TYPE_AUDIO: return demux_audio_fill_buffer(ds); |
296 case DEMUXER_TYPE_DEMUXERS: return demux_demuxers_fill_buffer(demux,ds); | 302 case DEMUXER_TYPE_DEMUXERS: return demux_demuxers_fill_buffer(demux,ds); |
297 case DEMUXER_TYPE_OGG: return demux_ogg_fill_buffer(demux); | 303 case DEMUXER_TYPE_OGG: return demux_ogg_fill_buffer(demux); |
298 case DEMUXER_TYPE_RAWAUDIO: return demux_rawaudio_fill_buffer(demux,ds); | 304 case DEMUXER_TYPE_RAWAUDIO: return demux_rawaudio_fill_buffer(demux,ds); |
305 #ifdef STREAMING_LIVE_DOT_COM | |
306 case DEMUXER_TYPE_RTP: return demux_rtp_fill_buffer(demux, ds); | |
307 #endif | |
299 } | 308 } |
300 return 0; | 309 return 0; |
301 } | 310 } |
302 | 311 |
303 // return value: | 312 // return value: |
791 } else { | 800 } else { |
792 free_demuxer(demuxer); | 801 free_demuxer(demuxer); |
793 demuxer = NULL; | 802 demuxer = NULL; |
794 } | 803 } |
795 } | 804 } |
805 //=============== Try to open as a RTP stream): =========== | |
806 if(file_format==DEMUXER_TYPE_RTP) { | |
807 demuxer=new_demuxer(stream,DEMUXER_TYPE_RTP,audio_id,video_id,dvdsub_id); | |
808 } | |
809 | |
796 //=============== Unknown, exiting... =========================== | 810 //=============== Unknown, exiting... =========================== |
797 if(file_format==DEMUXER_TYPE_UNKNOWN || demuxer == NULL){ | 811 if(file_format==DEMUXER_TYPE_UNKNOWN || demuxer == NULL){ |
798 mp_msg(MSGT_DEMUXER,MSGL_ERR,MSGTR_FormatNotRecognized); | 812 mp_msg(MSGT_DEMUXER,MSGL_ERR,MSGTR_FormatNotRecognized); |
799 return NULL; | 813 return NULL; |
800 // GUI_MSG( mplUnknowFileType ) | 814 // GUI_MSG( mplUnknowFileType ) |
947 return(NULL); | 961 return(NULL); |
948 } | 962 } |
949 break; | 963 break; |
950 } | 964 } |
951 #endif | 965 #endif |
966 #ifdef STREAMING_LIVE_DOT_COM | |
967 case DEMUXER_TYPE_RTP: { | |
968 demux_open_rtp(demuxer); | |
969 break; | |
970 } | |
971 #endif | |
952 } // switch(file_format) | 972 } // switch(file_format) |
953 pts_from_bps=0; // !!! | 973 pts_from_bps=0; // !!! |
954 return demuxer; | 974 return demuxer; |
955 } | 975 } |
956 | 976 |