changeset 7874:4c832590e18e

yeah, test.c works now!
author arpi
date Wed, 23 Oct 2002 18:20:13 +0000
parents 0e0e50d4aaee
children b890315b36d7
files libmpdemux/Makefile libmpdemux/test.c
diffstat 2 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/Makefile	Wed Oct 23 18:05:58 2002 +0000
+++ b/libmpdemux/Makefile	Wed Oct 23 18:20:13 2002 +0000
@@ -39,7 +39,7 @@
 	$(AR) r $(LIBNAME) $(OBJS)
 
 test:	$(LIBNAME) test.c
-	$(CC) $(CFLAGS) test.c ../mp_msg.c ../linux/shmem.c -o test ./libmpdemux.a ../libmpdvdkit2/libmpdvdkit.a ../libvo/aclib.o ../libmpcodecs/img_format.o ../libao2/afmt.o $(ALSA_LIB) $(VORBIS_LIB) $(CDPARANOIA_LIB) -lz -lpthread
+	$(CC) $(CFLAGS) test.c ../mp_msg.c ../linux/shmem.c -o test ./libmpdemux.a ../libmpdvdkit2/libmpdvdkit.a ../libvo/aclib.o ../libmpcodecs/img_format.o ../libao2/afmt.o ../sub_cc.o $(ALSA_LIB) $(VORBIS_LIB) $(CDPARANOIA_LIB) -lz -lpthread
 
 clean:
 	rm -f *.o *.a *~
--- a/libmpdemux/test.c	Wed Oct 23 18:05:58 2002 +0000
+++ b/libmpdemux/test.c	Wed Oct 23 18:20:13 2002 +0000
@@ -29,6 +29,13 @@
 
 int verbose=5; // must be global!
 
+int stream_cache_size=0;
+
+// for demux_ogg:
+void* vo_sub=NULL;
+int vo_osd_changed(int new_value){return 0;}
+int   subcc_enabled=0;
+
 //---------------
 
 extern stream_t* open_stream(char* filename,int vcd_track,int* file_format);
@@ -54,13 +61,16 @@
 
   printf("success: format: %d  data: 0x%X - 0x%X\n",file_format, (int)(stream->start_pos),(int)(stream->end_pos));
 
-  stream_enable_cache(stream,2048*1024,0,0);
+  if(stream_cache_size)
+      stream_enable_cache(stream,stream_cache_size,0,0);
 
   demuxer=demux_open(stream,file_format,-1,-1,-1);
   if(!demuxer){
 	printf("Cannot open demuxer\n");
 	exit(1);
   }
-  
+
+  if(demuxer->video->sh)
+      video_read_properties(demuxer->video->sh);
 
 }