mirror of
https://github.com/mpv-player/mpv
synced 2025-01-05 03:06:28 +01:00
Add support for Realaudio files
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10034 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
724cc21577
commit
5b0d3c5971
@ -3,7 +3,7 @@ LIBNAME = libmpdemux.a
|
||||
|
||||
include ../config.mak
|
||||
|
||||
SRCS = mp3_hdr.c video.c mpeg_hdr.c cache2.c asfheader.c aviheader.c aviprint.c muxer.c muxer_avi.c muxer_mpeg.c demux_asf.c demux_avi.c demux_mov.c parse_mp4.c demux_mpg.c demux_pva.c demux_viv.c demuxer.c dvdauth.c dvdnav_stream.c open.c parse_es.c stream.c stream_file.c stream_netstream.c stream_vcd.c stream_null.c tv.c tvi_dummy.c tvi_v4l.c tvi_bsdbt848.c frequencies.c demux_fli.c demux_real.c demux_y4m.c yuv4mpeg.c yuv4mpeg_ratio.c demux_nuv.c demux_film.c demux_roq.c mf.c demux_mf.c demux_audio.c demux_demuxers.c demux_ogg.c demux_bmp.c cdda.c demux_rawaudio.c demux_rawvideo.c cddb.c cdinfo.c demux_rawdv.c ai_alsa.c ai_oss.c audio_in.c demux_smjpeg.c cue_read.c extension.c demux_gif.c demux_ts.c
|
||||
SRCS = mp3_hdr.c video.c mpeg_hdr.c cache2.c asfheader.c aviheader.c aviprint.c muxer.c muxer_avi.c muxer_mpeg.c demux_asf.c demux_avi.c demux_mov.c parse_mp4.c demux_mpg.c demux_pva.c demux_viv.c demuxer.c dvdauth.c dvdnav_stream.c open.c parse_es.c stream.c stream_file.c stream_netstream.c stream_vcd.c stream_null.c tv.c tvi_dummy.c tvi_v4l.c tvi_bsdbt848.c frequencies.c demux_fli.c demux_real.c demux_y4m.c yuv4mpeg.c yuv4mpeg_ratio.c demux_nuv.c demux_film.c demux_roq.c mf.c demux_mf.c demux_audio.c demux_demuxers.c demux_ogg.c demux_bmp.c cdda.c demux_rawaudio.c demux_rawvideo.c cddb.c cdinfo.c demux_rawdv.c ai_alsa.c ai_oss.c audio_in.c demux_smjpeg.c cue_read.c extension.c demux_gif.c demux_ts.c demux_realaud.c
|
||||
ifeq ($(XMMS_PLUGINS),yes)
|
||||
SRCS += demux_xmms.c
|
||||
endif
|
||||
|
@ -136,6 +136,7 @@ extern void demux_close_xmms(demuxer_t* demuxer);
|
||||
extern void demux_close_gif(demuxer_t* demuxer);
|
||||
extern void demux_close_ts(demuxer_t* demuxer);
|
||||
extern void demux_close_mkv(demuxer_t* demuxer);
|
||||
extern void demux_close_ra(demuxer_t* demuxer);
|
||||
|
||||
#ifdef USE_TV
|
||||
#include "tv.h"
|
||||
@ -212,6 +213,8 @@ void free_demuxer(demuxer_t *demuxer){
|
||||
#endif
|
||||
case DEMUXER_TYPE_MPEG_TS:
|
||||
demux_close_ts(demuxer); break;
|
||||
case DEMUXER_TYPE_REALAUDIO:
|
||||
demux_close_ra(demuxer); break;
|
||||
|
||||
}
|
||||
// free streams:
|
||||
@ -291,6 +294,7 @@ int demux_pva_fill_buffer(demuxer_t *demux);
|
||||
int demux_xmms_fill_buffer(demuxer_t *demux,demux_stream_t *ds);
|
||||
int demux_gif_fill_buffer(demuxer_t *demux);
|
||||
int demux_ts_fill_buffer(demuxer_t *demux);
|
||||
int demux_ra_fill_buffer(demuxer_t *demux);
|
||||
|
||||
extern int demux_demuxers_fill_buffer(demuxer_t *demux,demux_stream_t *ds);
|
||||
extern int demux_ogg_fill_buffer(demuxer_t *d);
|
||||
@ -349,6 +353,7 @@ int demux_fill_buffer(demuxer_t *demux,demux_stream_t *ds){
|
||||
case DEMUXER_TYPE_GIF: return demux_gif_fill_buffer(demux);
|
||||
#endif
|
||||
case DEMUXER_TYPE_MPEG_TS: return demux_ts_fill_buffer(demux);
|
||||
case DEMUXER_TYPE_REALAUDIO: return demux_ra_fill_buffer(demux);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -584,6 +589,8 @@ extern int gif_check_file(demuxer_t *demuxer);
|
||||
extern int demux_open_gif(demuxer_t* demuxer);
|
||||
extern int ts_check_file(demuxer_t * demuxer);
|
||||
extern int demux_open_mkv(demuxer_t *demuxer);
|
||||
extern int ra_check_file(demuxer_t *demuxer);
|
||||
extern int demux_open_ra(demuxer_t* demuxer);
|
||||
|
||||
extern demuxer_t* init_avi_with_ogg(demuxer_t* demuxer);
|
||||
|
||||
@ -723,6 +730,17 @@ if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_MATROSKA){
|
||||
}
|
||||
}
|
||||
#endif
|
||||
//=============== Try to open as REALAUDIO file: =================
|
||||
if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_REALAUDIO){
|
||||
demuxer=new_demuxer(stream,DEMUXER_TYPE_REALAUDIO,audio_id,video_id,dvdsub_id);
|
||||
if(ra_check_file(demuxer)){
|
||||
mp_msg(MSGT_DEMUXER,MSGL_INFO,MSGTR_Detected_XXX_FileFormat,"REALAUDIO");
|
||||
file_format=DEMUXER_TYPE_REALAUDIO;
|
||||
} else {
|
||||
free_demuxer(demuxer);
|
||||
demuxer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//=============== Try based on filename EXTENSION: =================
|
||||
// Ok. We're over the stable detectable fileformats, the next ones are a bit
|
||||
@ -1204,6 +1222,10 @@ switch(file_format){
|
||||
demux_open_ts(demuxer);
|
||||
break;
|
||||
}
|
||||
case DEMUXER_TYPE_REALAUDIO: {
|
||||
if (!demux_open_ra(demuxer)) return NULL;
|
||||
break;
|
||||
}
|
||||
} // switch(file_format)
|
||||
pts_from_bps=0; // !!!
|
||||
return demuxer;
|
||||
|
@ -40,11 +40,12 @@
|
||||
#define DEMUXER_TYPE_MPEG_TS 29
|
||||
#define DEMUXER_TYPE_H264_ES 30
|
||||
#define DEMUXER_TYPE_MATROSKA 31
|
||||
#define DEMUXER_TYPE_REALAUDIO 32
|
||||
|
||||
// This should always match the higest demuxer type number.
|
||||
// Unless you want to disallow users to force the demuxer to some types
|
||||
#define DEMUXER_TYPE_MIN 0
|
||||
#define DEMUXER_TYPE_MAX 31
|
||||
#define DEMUXER_TYPE_MAX 32
|
||||
|
||||
#define DEMUXER_TYPE_DEMUXERS (1<<16)
|
||||
// A virtual demuxer type for the network code
|
||||
|
Loading…
Reference in New Issue
Block a user