[Mplayer-cvslog] CVS: main cfg-mencoder.h,1.10,1.11 mencoder.c,1.38,1.39

Alex Beregszaszi alex at mplayer.dev.hu
Sat Dec 8 13:21:36 CET 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv30573

Modified Files:
	cfg-mencoder.h mencoder.c 
Log Message:
fixed framecopy

Index: cfg-mencoder.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-mencoder.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- cfg-mencoder.h	8 Dec 2001 01:29:19 -0000	1.10
+++ cfg-mencoder.h	8 Dec 2001 12:21:23 -0000	1.11
@@ -44,7 +44,7 @@
 #endif
 
 struct config ovc_conf[]={
-	{"copy", &out_video_codec, CONF_TYPE_FLAG, 0, 0, 0},
+	{"copy", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_COPY},
 	{"frameno", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_FRAMENO},
 	{"divx4", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_DIVX4},
 	{"help", "\nAvailable codecs:\n   copy\n   frameno\n   divx4\n\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},

Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- mencoder.c	8 Dec 2001 02:47:55 -0000	1.38
+++ mencoder.c	8 Dec 2001 12:21:23 -0000	1.39
@@ -1,4 +1,4 @@
-
+#define VCODEC_COPY 0
 #define VCODEC_FRAMENO 1
 #define VCODEC_DIVX4 2
 
@@ -503,8 +503,24 @@
 mux_v->codec=out_video_codec;
 
 switch(mux_v->codec){
-case 0:
-    mux_v->bih=sh_video->bih;
+case VCODEC_COPY:
+    printf("sh_video->bih: %x\n", sh_video->bih);
+    if (sh_video->bih)
+	mux_v->bih=sh_video->bih;
+    else
+    {
+	mux_v->bih=malloc(sizeof(BITMAPINFOHEADER));
+	mux_v->bih->biSize=sizeof(BITMAPINFOHEADER);
+	mux_v->bih->biWidth=sh_video->disp_w;
+	mux_v->bih->biHeight=sh_video->disp_h;
+	mux_v->bih->biCompression=sh_video->format;
+	mux_v->bih->biPlanes=1;
+	mux_v->bih->biBitCount=24; // FIXME!!!
+	mux_v->bih->biSizeImage=mux_v->bih->biWidth*mux_v->bih->biHeight*(mux_v->bih->biBitCount/8);
+    }
+    printf("videocodec: framecopy (%dx%d %dbpp fourcc=%x)\n",
+	mux_v->bih->biWidth, mux_v->bih->biHeight,
+	mux_v->bih->biBitCount, mux_v->bih->biCompression);
     break;
 case VCODEC_FRAMENO:
     mux_v->bih=malloc(sizeof(BITMAPINFOHEADER));
@@ -591,7 +607,7 @@
 aviwrite_write_header(muxer,muxer_f);
 
 switch(mux_v->codec){
-case 0:
+case VCODEC_COPY:
     break;
 case VCODEC_FRAMENO:
     decoded_frameno=0;
@@ -792,7 +808,7 @@
 
 
 switch(mux_v->codec){
-case 0:
+case VCODEC_COPY:
     mux_v->buffer=start;
     if(skip_flag<=0) aviwrite_write_chunk(muxer,mux_v,muxer_f,in_size,(sh_video->ds->flags&1)?0x10:0);
     break;




More information about the MPlayer-cvslog mailing list