[Mplayer-cvslog] CVS: main/libmpdemux Makefile,1.18,1.19 demuxer.c,1.69,1.70 demuxer.h,1.27,1.28 open.c,1.36,1.37 stream.h,1.31,1.32
Zoltan Ponekker
pontscho at mplayer.dev.hu
Wed Feb 6 21:16:38 CET 2002
Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv20665/libmpdemux
Modified Files:
Makefile demuxer.c demuxer.h open.c stream.h
Log Message:
add mfi support
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/Makefile,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- Makefile 1 Feb 2002 05:35:16 -0000 1.18
+++ Makefile 6 Feb 2002 20:16:35 -0000 1.19
@@ -3,7 +3,7 @@
include ../config.mak
-SRCS = mp3_hdr.c video.c mpeg_hdr.c cache2.c asfheader.c aviheader.c aviprint.c aviwrite.c demux_asf.c demux_avi.c demux_mov.c demux_mpg.c demux_viv.c demuxer.c dvdauth.c open.c parse_es.c stream.c tv.c tvi_dummy.c tvi_v4l.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
+SRCS = mp3_hdr.c video.c mpeg_hdr.c cache2.c asfheader.c aviheader.c aviprint.c aviwrite.c demux_asf.c demux_avi.c demux_mov.c demux_mpg.c demux_viv.c demuxer.c dvdauth.c open.c parse_es.c stream.c tv.c tvi_dummy.c tvi_v4l.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
ifeq ($(STREAMING),yes)
SRCS += asf_streaming.c url.c http.c network.c rtp.c
endif
Index: demuxer.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demuxer.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- demuxer.c 1 Feb 2002 05:35:16 -0000 1.69
+++ demuxer.c 6 Feb 2002 20:16:35 -0000 1.70
@@ -15,6 +15,7 @@
#include "stream.h"
#include "demuxer.h"
#include "stheader.h"
+#include "mf.h"
void free_demuxer_stream(demux_stream_t *ds){
ds_free_packs(ds);
@@ -150,6 +151,7 @@
// return value:
// 0 = EOF or no stream found or invalid type
// 1 = successfully read a packet
+int demux_mf_fill_buffer( demuxer_t *demux);
int demux_roq_fill_buffer(demuxer_t *demux);
int demux_film_fill_buffer(demuxer_t *demux);
int demux_fli_fill_buffer(demuxer_t *demux);
@@ -177,6 +179,7 @@
// Note: parameter 'ds' can be NULL!
// printf("demux->type=%d\n",demux->type);
switch(demux->type){
+ case DEMUXER_TYPE_MF: return demux_mf_fill_buffer(demux);
case DEMUXER_TYPE_ROQ: return demux_roq_fill_buffer(demux);
case DEMUXER_TYPE_FILM: return demux_film_fill_buffer(demux);
case DEMUXER_TYPE_FLI: return demux_fli_fill_buffer(demux);
@@ -368,6 +371,7 @@
int mov_check_file(demuxer_t* demuxer);
int mov_read_header(demuxer_t* demuxer);
int demux_open_fli(demuxer_t* demuxer);
+int demux_open_mf(demuxer_t* demuxer);
int demux_open_film(demuxer_t* demuxer);
int demux_open_roq(demuxer_t* demuxer);
@@ -397,6 +401,12 @@
//printf("demux_open(%p,%d,%d,%d,%d) \n",stream,file_format,audio_id,video_id,dvdsub_id);
+if ( mf_support )
+ {
+ mp_msg(MSGT_DEMUXER,MSGL_INFO,"forced mf.\n");
+ file_format=DEMUXER_TYPE_MF;
+ }
+
#ifdef USE_TV
//=============== Try to open as TV-input: =================
if((tv_param_on == 1) &&
@@ -564,6 +574,17 @@
mp_msg(MSGT_DEMUXER,MSGL_INFO,MSGTR_DetectedMPEGESfile);
}
}
+//=============== Try to open as multi file: =================
+if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_MF){
+ demuxer=new_demuxer(stream,DEMUXER_TYPE_MF,audio_id,video_id,dvdsub_id);
+ {
+ if ( mf_support )
+ {
+ file_format=DEMUXER_TYPE_MF;
+ mp_msg( MSGT_DEMUXER,MSGL_INFO,"[demuxer] mf support.\n" );
+ }
+ }
+}
//=============== Unknown, exiting... ===========================
if(file_format==DEMUXER_TYPE_UNKNOWN){
mp_msg(MSGT_DEMUXER,MSGL_ERR,MSGTR_FormatNotRecognized);
@@ -578,6 +599,10 @@
demuxer->file_format=file_format;
switch(file_format){
+ case DEMUXER_TYPE_MF: {
+ if (!demux_open_mf(demuxer)) return NULL;
+ break;
+ }
case DEMUXER_TYPE_FLI: {
if (!demux_open_fli(demuxer)) return NULL;
break;
@@ -696,6 +721,7 @@
int demux_seek_mpg(demuxer_t *demuxer,float rel_seek_secs,int flags);
int demux_seek_y4m(demuxer_t *demuxer,float rel_seek_secs,int flags);
int demux_seek_fli(demuxer_t *demuxer,float rel_seek_secs,int flags);
+int demux_seek_mf(demuxer_t *demuxer,float rel_seek_secs,int flags);
int demux_seek_nuv(demuxer_t *demuxer,float rel_seek_secs,int flags);
void demux_seek_mov(demuxer_t *demuxer,float pts,int flags);
Index: demuxer.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demuxer.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- demuxer.h 1 Feb 2002 05:35:16 -0000 1.27
+++ demuxer.h 6 Feb 2002 20:16:35 -0000 1.28
@@ -18,6 +18,7 @@
#define DEMUXER_TYPE_NUV 13
#define DEMUXER_TYPE_FILM 14
#define DEMUXER_TYPE_ROQ 15
+#define DEMUXER_TYPE_MF 16
#define DEMUXER_TIME_NONE 0
#define DEMUXER_TIME_PTS 1
Index: open.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/open.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- open.c 27 Jan 2002 19:23:43 -0000 1.36
+++ open.c 6 Feb 2002 20:16:35 -0000 1.37
@@ -17,6 +17,7 @@
#include "../cfgparser.h"
#include "stream.h"
#include "demuxer.h"
+#include "mf.h"
#ifdef STREAMING
#include "url.h"
@@ -381,6 +382,20 @@
return(NULL);
}
#endif
+
+//============ Check for multi file-input ====
+ if (mf_support == 1)
+ {
+ /* create stream */
+ stream = new_stream(-1, STREAMTYPE_MF);
+ if (!stream)
+ return(NULL);
+
+ if (!stream_open_mf(filename, stream))
+ return(NULL);
+
+ return(stream);
+ }
//============ Open STDIN ============
if(!strcmp(filename,"-")){
Index: stream.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/stream.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- stream.h 29 Jan 2002 12:11:52 -0000 1.31
+++ stream.h 6 Feb 2002 20:16:35 -0000 1.32
@@ -12,6 +12,7 @@
#define STREAMTYPE_MEMORY 4
#define STREAMTYPE_TV 5
#define STREAMTYPE_PLAYLIST 6
+#define STREAMTYPE_MF 7
#define VCD_SECTOR_SIZE 2352
#define VCD_SECTOR_OFFS 24
More information about the MPlayer-cvslog
mailing list