[Mplayer-cvslog] CVS: main dec_video.h,1.2,1.3 dec_video.c,1.90,1.91 mplayer.c,1.381,1.382 mencoder.c,1.77,1.78

Nick Kurshev nick at mplayer.dev.hu
Fri Feb 1 09:50:48 CET 2002


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

Modified Files:
	dec_video.h dec_video.c mplayer.c mencoder.c 
Log Message:
Providing new tune info

Index: dec_video.h
===================================================================
RCS file: /cvsroot/mplayer/main/dec_video.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- dec_video.h	30 Oct 2001 17:38:09 -0000	1.2
+++ dec_video.h	1 Feb 2002 08:50:45 -0000	1.3
@@ -2,7 +2,7 @@
 // dec_video.c:
 extern int video_read_properties(sh_video_t *sh_video);
 
-extern int init_video(sh_video_t *sh_video);
+extern int init_video(sh_video_t *sh_video, int *pitches);
 void uninit_video(sh_video_t *sh_video);
 
 #ifdef USE_LIBVO2

Index: dec_video.c
===================================================================
RCS file: /cvsroot/mplayer/main/dec_video.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -r1.90 -r1.91
--- dec_video.c	28 Jan 2002 07:29:17 -0000	1.90
+++ dec_video.c	1 Feb 2002 08:50:45 -0000	1.91
@@ -413,8 +413,10 @@
     sh_video->inited=0;
 }
 
-int init_video(sh_video_t *sh_video){
+int init_video(sh_video_t *sh_video,int *pitches)
+{
 unsigned int out_fmt=sh_video->codec->outfmt[sh_video->outfmtidx];
+pitches[0] = pitches[1] =pitches[2] = 0; /* fake unknown */
 
 sh_video->our_out_buffer=NULL;
 
@@ -581,6 +583,9 @@
    mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_NoLAVCsupport);
    return 0;
 #else
+   /* Just because we know that */
+   pitches[0] = 16;
+   pitches[1] = pitches[2] = 8;
    mp_msg(MSGT_DECVIDEO,MSGL_V,"FFmpeg's libavcodec video codec\n");
     if(!avcodec_inited){
       avcodec_init();
@@ -620,6 +625,9 @@
 #else
    if(divx_quality) mp_msg(MSGT_DECVIDEO,MSGL_HINT,MSGTR_MpegPPhint);
 #endif
+   /* Just because we know that */
+   pitches[0] = 16;
+   pitches[1] = pitches[2] = 8;
    // send seq header to the decoder:
    mpeg2_decode_data(NULL,videobuffer,videobuffer+videobuf_len,0);
    mpeg2_allocate_image_buffers (picture);

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.381
retrieving revision 1.382
diff -u -r1.381 -r1.382
--- mplayer.c	31 Jan 2002 09:57:13 -0000	1.381
+++ mplayer.c	1 Feb 2002 08:50:45 -0000	1.382
@@ -477,10 +477,12 @@
 
 int gui_no_filename=0;
 
+vo_tune_info_t vtune;
+
   mp_msg_init(MSGL_STATUS);
 
   mp_msg(MSGT_CPLAYER,MSGL_INFO,"%s",banner_text);
-
+  memset(&vtune,0,sizeof(vo_tune_info_t));
   /* Test for cpu capabilities (and corresponding OS support) for optimizing */
 #ifdef ARCH_X86
   GetCpuCaps(&gCpuCaps);
@@ -1239,7 +1241,7 @@
 
 mp_msg(MSGT_CPLAYER,MSGL_DBG2,"vo_debug1: out_fmt=%s\n",vo_format_name(out_fmt));
 
-if(!init_video(sh_video)){
+if(!init_video(sh_video,&vtune.pitch[0])){
      mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CouldntInitVideoCodec);
      goto goto_next_file; // exit_player(MSGTR_Exit_error);
 }
@@ -1349,7 +1351,7 @@
    if(video_out->config(sh_video->disp_w,sh_video->disp_h,
                       screen_size_x,screen_size_y,
                       fullscreen|(vidmode<<1)|(softzoom<<2)|(flip<<3),
-                      title,out_fmt,NULL)){
+                      title,out_fmt,&vtune)){
 #endif
      mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CannotInitVO);
      goto goto_next_file; // exit_player(MSGTR_Exit_error);

Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- mencoder.c	31 Jan 2002 00:38:53 -0000	1.77
+++ mencoder.c	1 Feb 2002 08:50:45 -0000	1.78
@@ -323,7 +323,7 @@
 sh_audio_t *sh_audio=NULL;
 sh_video_t *sh_video=NULL;
 int file_format=DEMUXER_TYPE_UNKNOWN;
-int i;
+int i,pitches[3];
 unsigned int out_fmt;
 
 aviwrite_t* muxer=NULL;
@@ -569,7 +569,7 @@
 if (IMGFMT_IS_RGB(out_fmt))
     vo_image_ptr = vo_image = malloc(vo_w*vo_h*IMGFMT_RGB_DEPTH(out_fmt)/8);
 
-if(!init_video(sh_video)){
+if(!init_video(sh_video,pitches)){
      mp_msg(MSGT_MENCODER,MSGL_FATAL,MSGTR_CouldntInitVideoCodec);
      exit(1);
 }




More information about the MPlayer-cvslog mailing list