Part2 of several printf2mp_msg changes in patch from Otvos Attila oattila AT chello...
authorreynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2>
Fri, 31 Mar 2006 00:15:47 +0000 (00:15 +0000)
committerreynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2>
Fri, 31 Mar 2006 00:15:47 +0000 (00:15 +0000)
git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@18005 b3059339-0415-0410-9bf9-f77b7e298cf2

23 files changed:
help/help_mp-en.h
libmpcodecs/ad_libdv.c
libmpcodecs/vd_dmo.c
libmpcodecs/vd_dshow.c
libmpcodecs/vd_ffmpeg.c
libmpcodecs/vd_vfw.c
libmpcodecs/ve_lavc.c
libmpcodecs/ve_raw.c
libmpcodecs/ve_vfw.c
libmpcodecs/vf.c
libmpcodecs/vf_crop.c
libmpcodecs/vf_cropdetect.c
libmpcodecs/vf_expand.c
libmpcodecs/vf_fame.c
libmpcodecs/vf_format.c
libmpcodecs/vf_framestep.c
libmpcodecs/vf_noformat.c
libmpcodecs/vf_palette.c
libmpcodecs/vf_phase.c
libmpcodecs/vf_test.c
libmpcodecs/vf_tile.c
libmpcodecs/vf_yuy2.c
libmpcodecs/vf_yvu9.c

index 720ef27..7fac1bd 100644 (file)
@@ -1487,3 +1487,60 @@ static char help_text[]=
 #define MSGTR_LIBMENU_UnknownMenuCommand "[MENU] Unknown command: '%s'.\n"
 #define MSGTR_LIBMENU_FailedToOpenMenu "[MENU] Failed to open menu: '%s'.\n"
 
+// ========================== LIBMPCODECS ===================================
+
+// libmpcodecs/ad_libdv.c
+#define MSGTR_MPCODECS_AudioFramesizeDiffers "[AD_LIBDV] Warning! Audio framesize differs! read=%d  hdr=%d.\n"
+
+// libmpcodecs/vd_dmo.c vd_dshow.c vd_vfw.c
+#define MSGTR_MPCODECS_CouldntAllocateImageForCinepakCodec "[VD_DMO] Couldn't allocate image for cinepak codec.\n"
+
+// libmpcodecs/vd_ffmpeg.c
+#define MSGTR_MPCODECS_XVMCAcceleratedCodec "[VD_FFMPEG] XVMC accelerated codec.\n"
+#define MSGTR_MPCODECS_ArithmeticMeanOfQP "[VD_FFMPEG] Arithmetic mean of QP: %2.4f, Harmonic mean of QP: %2.4f\n"
+#define MSGTR_MPCODECS_DRIFailure "[VD_FFMPEG] DRI failure.\n"
+#define MSGTR_MPCODECS_CouldntAllocateImageForCodec "[VD_FFMPEG] Couldn't allocate image for codec.\n"
+#define MSGTR_MPCODECS_XVMCAcceleratedMPEG2 "[VD_FFMPEG] XVMC accelerated MPEG2.\n"
+#define MSGTR_MPCODECS_TryingPixfmt "[VD_FFMPEG] Trying pixfmt=%d.\n"
+#define MSGTR_MPCODECS_McGetBufferShouldWorkOnlyWithXVMC "[VD_FFMPEG] The mc_get_buffer should work only with XVMC acceleration!!"
+#define MSGTR_MPCODECS_UnexpectedInitVoError "[VD_FFMPEG] Unexpected init_vo error.\n"
+#define MSGTR_MPCODECS_UnrecoverableErrorRenderBuffersNotTaken "[VD_FFMPEG] Unrecoverable error, render buffers not taken.\n"
+#define MSGTR_MPCODECS_OnlyBuffersAllocatedByVoXvmcAllowed "[VD_FFMPEG] Only buffers allocated by vo_xvmc allowed.\n"
+
+// libmpcodecs/ve_lavc.c
+#define MSGTR_MPCODECS_HighQualityEncodingSelected "[VE_LAVC] High quality encoding selected (non real time)!\n"
+#define MSGTR_MPCODECS_UsingConstantQscale "[VE_LAVC] Using constant qscale = %f (VBR).\n"
+
+// libmpcodecs/ve_raw.c
+#define MSGTR_MPCODECS_OutputWithFourccNotSupported "[VE_RAW] Raw output with fourcc [%x] not supported!\n"
+#define MSGTR_MPCODECS_NoVfwCodecSpecified "[VE_RAW] Required VfW codec not specified!!\n"
+
+// libmpcodecs/vf_crop.c
+#define MSGTR_MPCODECS_CropBadPositionWidthHeight "[CROP] Bad position/width/height - cropped area outside of the original!\n"
+
+// libmpcodecs/vf_cropdetect.c
+#define MSGTR_MPCODECS_CropArea "[CROP] Crop area: X: %d..%d  Y: %d..%d  (-vf crop=%d:%d:%d:%d).\n"
+
+// libmpcodecs/vf_format.c, vf_palette.c, vf_noformat.c
+#define MSGTR_MPCODECS_UnknownFormatName "[VF_FORMAT] Unknown format name: '%s'.\n"
+
+// libmpcodecs/vf_framestep.c vf_noformat.c vf_palette.c vf_tile.c
+#define MSGTR_MPCODECS_ErrorParsingArgument "[VF_FRAMESTEP] Error parsing argument.\n"
+
+// libmpcodecs/ve_vfw.c
+#define MSGTR_MPCODECS_CompressorType "Compressor type: %.4lx\n"
+#define MSGTR_MPCODECS_CompressorSubtype "Compressor subtype: %.4lx\n"
+#define MSGTR_MPCODECS_CompressorFlags "Compressor flags: %lu, version %lu, ICM version: %lu\n"
+#define MSGTR_MPCODECS_Flags "Flags:"
+#define MSGTR_MPCODECS_Quality " quality"
+
+// libmpcodecs/vf_expand.c
+#define MSGTR_MPCODECS_FullDRNotPossible "Full DR not possible, trying SLICES instead!\n"
+#define MSGTR_MPCODECS_WarnNextFilterDoesntSupportSlices  "WARNING! next filter doesn't support SLICES, get ready for sig11...\n"
+#define MSGTR_MPCODECS_FunWhydowegetNULL "Why do we get NULL \n"
+
+// libmpcodecs/vf_fame.c
+#define MSGTR_MPCODECS_FatalCantOpenlibFAME "FATAL: cannot open libFAME!\n"
+
+// libmpcodecs/vf_test.c, vf_yuy2.c, vf_yvu9.c
+#define MSGTR_MPCODECS_WarnNextFilterDoesntSupport "%s not supported by next filter/vo :(\n"
index a193369..9107035 100644 (file)
@@ -6,6 +6,8 @@
 #include <math.h>
 
 #include "config.h"
+#include "mp_msg.h"
+#include "help_mp.h"
 
 #ifdef HAVE_LIBDV095
 
@@ -86,7 +88,7 @@ static int decode_audio(sh_audio_t *audio, unsigned char *buf, int minlen, int m
    dv_parse_header(decoder, dv_audio_frame);
    
    if(xx!=decoder->frame_size)
-       printf("warning! audio framesize differs! read=%d  hdr=%d  \n",
+       mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_MPCODECS_AudioFramesizeDiffers,
            xx, decoder->frame_size);
 
    if (dv_decode_full_audio(decoder, dv_audio_frame,(int16_t**) audioBuffers))
index 2e0e884..737c0e2 100644 (file)
@@ -77,7 +77,7 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
        sh->disp_w, sh->disp_h);
     
     if(!mpi){  // temporary!
-       printf("couldn't allocate image for cinepak codec\n");
+       mp_msg(MSGT_DECVIDEO,MSGL_WARN,MSGTR_MPCODECS_CouldntAllocateImageForCinepakCodec);
        return NULL;
     }
 
index d603b5b..6f09236 100644 (file)
@@ -106,7 +106,7 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
        sh->disp_w, sh->disp_h);
     
     if(!mpi){  // temporary!
-       printf("couldn't allocate image for cinepak codec\n");
+       mp_msg(MSGT_DECVIDEO,MSGL_WARN,MSGTR_MPCODECS_CouldntAllocateImageForCinepakCodec);
        return NULL;
     }
 
index 457375b..6666452 100644 (file)
@@ -248,7 +248,7 @@ static int init(sh_video_t *sh){
 #else
     if(lavc_codec->id == CODEC_ID_MPEG2VIDEO_XVMC){
 #endif
-        printf("vd_ffmpeg: XVMC accelerated codec\n");
+        mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_XVMCAcceleratedCodec);
         assert(ctx->do_dr1);//these are must to!
         assert(ctx->do_slices); //it is (vo_)ffmpeg bug if this fails
         avctx->flags|= CODEC_FLAG_EMU_EDGE;//do i need that??!!
@@ -333,8 +333,8 @@ static int init(sh_video_t *sh){
            uint8_t *p = avctx->extradata;
            
            for (x=0; x<avctx->extradata_size; x++)
-               printf("[%x] ", p[x]);
-           printf("\n");
+               mp_msg(MSGT_DECVIDEO, MSGL_INFO,"[%x] ", p[x]);
+           mp_msg(MSGT_DECVIDEO, MSGL_INFO,"\n");
        }
 #endif
     }
@@ -433,9 +433,9 @@ static void uninit(sh_video_t *sh){
     if(lavc_param_vstats){
         int i;
         for(i=1; i<32; i++){
-            printf("QP: %d, count: %d\n", i, ctx->qp_stat[i]);
+            mp_msg(MSGT_DECVIDEO, MSGL_INFO,"QP: %d, count: %d\n", i, ctx->qp_stat[i]);
         }
-        printf("Arithmetic mean of QP: %2.4f, Harmonic mean of QP: %2.4f\n"
+        mp_msg(MSGT_DECVIDEO, MSGL_INFO,MSGTR_MPCODECS_ArithmeticMeanOfQP
             ctx->qp_sum / avctx->coded_frame->coded_picture_number,
             1.0/(ctx->inv_qp_sum / avctx->coded_frame->coded_picture_number)
             );
@@ -634,7 +634,7 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){
   if (!pic->buffer_hints) {
 #endif
     if(ctx->b_count>1 || ctx->ip_count>2){
-        printf("DR1 failure\n");
+        mp_msg(MSGT_DECVIDEO, MSGL_WARN, MSGTR_MPCODECS_DRIFailure);
 
         ctx->do_dr1=0; //FIXME
         avctx->get_buffer= avcodec_default_get_buffer;
@@ -921,7 +921,7 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
     mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_PRESERVE,
        avctx->width, avctx->height);
     if(!mpi){  // temporary!
-       printf("couldn't allocate image for codec\n");
+       mp_msg(MSGT_DECVIDEO, MSGL_WARN, MSGTR_MPCODECS_CouldntAllocateImageForCodec);
        return NULL;
     }
     
@@ -971,7 +971,7 @@ int i;
         avctx->get_buffer= mc_get_buffer;
         avctx->release_buffer= mc_release_buffer;
         avctx->draw_horiz_band = mc_render_slice;
-        printf("vd_ffmpeg: XVMC accelerated MPEG2\n");
+        mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_XVMCAcceleratedMPEG2);
         assert(ctx->do_dr1);//these are must to!
         assert(ctx->do_slices); //it is (vo_)ffmpeg bug if this fails
         avctx->flags|= CODEC_FLAG_EMU_EDGE;//do i need that??!!
@@ -979,7 +979,7 @@ int i;
     }
 #endif
     for(i=0;fmt[i]!=-1;i++){
-        printf("trying pixfmt=%d\n",i);
+        mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_TryingPixfmt,i);
         if( init_vo(sh,fmt[i]) >= 0)
            return fmt[i];
     }
@@ -997,7 +997,7 @@ static int mc_get_buffer(AVCodecContext *avctx, AVFrame *pic){
     
 //  printf("vd_ffmpeg::mc_get_buffer (xvmc) %d %d %d\n", pic->reference, ctx->ip_count, ctx->b_count);
     if(!avctx->xvmc_acceleration){
-        printf("vd_ffmpeg::mc_get_buffer should work only with XVMC acceleration !!");
+        mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_McGetBufferShouldWorkOnlyWithXVMC);
         assert(0);
         exit(1);
 //        return -1;//!!fixme check error conditions
@@ -1005,10 +1005,10 @@ static int mc_get_buffer(AVCodecContext *avctx, AVFrame *pic){
     assert(avctx->draw_horiz_band == mc_render_slice);
     assert(avctx->release_buffer == mc_release_buffer);
     if( mp_msg_test(MSGT_DECVIDEO,MSGL_DBG5) )
-        printf("vd_ffmpeg::mc_get_buffer\n");
+        mp_msg(MSGT_DECVIDEO, MSGL_DBG5, "vd_ffmpeg::mc_get_buffer\n");
 
     if(init_vo(sh,avctx->pix_fmt) < 0){
-        printf("vd_ffmpeg: Unexpected init_vo error\n");
+        mp_msg(MSGT_DECVIDEO, MSGL_WARN, MSGTR_MPCODECS_UnexpectedInitVoError);
         exit(1);
 //        return -1;//!!fixme check error conditions
     }
@@ -1025,14 +1025,14 @@ static int mc_get_buffer(AVCodecContext *avctx, AVFrame *pic){
     mpi= mpcodecs_get_image(sh, MP_IMGTYPE_IPB,flags ,
                             avctx->width, avctx->height);
     if(mpi==NULL){
-        printf("Unrecoverable error, render buffers not taken\n");
+        mp_msg(MSGT_DECVIDEO, MSGL_ERR, MSGTR_MPCODECS_UnrecoverableErrorRenderBuffersNotTaken);
         assert(0);
         exit(1);
 //        return -1;//!!fixme check error conditions in ffmpeg
     };
     
     if( (mpi->flags & MP_IMGFLAG_DIRECT) == 0){
-        printf("Only buffers allocated by vo_xvmc allowed\n");
+        mp_msg(MSGT_DECVIDEO, MSGL_ERR, MSGTR_MPCODECS_OnlyBuffersAllocatedByVoXvmcAllowed);
         assert(0);
         exit(1);
 //        return -1;//!!fixme check error conditions in ffmpeg
@@ -1072,7 +1072,7 @@ static int mc_get_buffer(AVCodecContext *avctx, AVFrame *pic){
 
     render=(xvmc_render_state_t*)mpi->priv;//same as data[2]
     if( mp_msg_test(MSGT_DECVIDEO,MSGL_DBG5) )
-        printf("vd_ffmpeg::mc_get_buffer (render=%p)\n",render);
+        mp_msg(MSGT_DECVIDEO, MSGL_DBG5, "vd_ffmpeg::mc_get_buffer (render=%p)\n",render);
     assert(render != 0);
     assert(render->magic == MP_XVMC_RENDER_MAGIC);
     render->state |= MP_XVMC_STATE_PREDICTION;
@@ -1099,7 +1099,7 @@ static void mc_release_buffer(AVCodecContext *avctx, AVFrame *pic){
 //mark the surface as not requared for prediction
     render=(xvmc_render_state_t*)pic->data[2];//same as mpi->priv
     if( mp_msg_test(MSGT_DECVIDEO,MSGL_DBG5) )
-        printf("vd_ffmpeg::mc_release_buffer (render=%p)\n",render);
+        mp_msg(MSGT_DECVIDEO, MSGL_DBG5, "vd_ffmpeg::mc_release_buffer (render=%p)\n",render);
     assert(render!=NULL);
     assert(render->magic==MP_XVMC_RENDER_MAGIC);
     render->state&=~MP_XVMC_STATE_PREDICTION;
index bbb70b0..6f94b0f 100644 (file)
@@ -303,7 +303,7 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
        MP_IMGTYPE_STATIC : MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_WIDTH, 
        sh->disp_w, sh->disp_h);
     if(!mpi){  // temporary!
-       printf("couldn't allocate image for cinepak codec\n");
+       mp_msg(MSGT_DECVIDEO,MSGL_WARN,MSGTR_MPCODECS_CouldntAllocateImageForCinepakCodec);
        return NULL;
     }
 
index 715b86f..8fcac43 100644 (file)
@@ -590,7 +590,7 @@ static int config(struct vf_instance_s* vf,
     lavc_venc_context->flags = 0;
     if (lavc_param_mb_decision)
     {
-       printf("High quality encoding selected (non real time)!\n");
+       mp_msg(MSGT_MENCODER, MSGL_INFO, MSGTR_MPCODECS_HighQualityEncodingSelected);
 #if LIBAVCODEC_BUILD < 4673
         lavc_venc_context->flags = CODEC_FLAG_HQ;
 #else
@@ -740,7 +740,7 @@ static int config(struct vf_instance_s* vf,
     /* fixed qscale :p */
     if (lavc_param_vqscale)
     {
-       printf("Using constant qscale = %f (VBR)\n", lavc_param_vqscale);
+       mp_msg(MSGT_MENCODER, MSGL_INFO, MSGTR_MPCODECS_UsingConstantQscale, lavc_param_vqscale);
        lavc_venc_context->flags |= CODEC_FLAG_QSCALE;
 #if LIBAVCODEC_BUILD >= 4668
         lavc_venc_context->global_quality= 
@@ -968,7 +968,7 @@ static void uninit(struct vf_instance_s* vf){
         double f= lavc_venc_context->width*lavc_venc_context->height*255.0*255.0;
         f*= lavc_venc_context->coded_frame->coded_picture_number;
         
-        printf("PSNR: Y:%2.2f, Cb:%2.2f, Cr:%2.2f, All:%2.2f\n",
+        mp_msg(MSGT_MENCODER, MSGL_INFO, "PSNR: Y:%2.2f, Cb:%2.2f, Cr:%2.2f, All:%2.2f\n",
             psnr(lavc_venc_context->error[0]/f),
             psnr(lavc_venc_context->error[1]*4/f),
             psnr(lavc_venc_context->error[2]*4/f),
index aeffee2..804266b 100644 (file)
@@ -4,6 +4,7 @@
 
 #include "config.h"
 #include "mp_msg.h"
+#include "help_mp.h"
 
 #include "codec-cfg.h"
 #include "stream.h"
@@ -68,7 +69,7 @@ static int set_format(struct vf_instance_s *vf, unsigned int fmt) {
        mux_v->bih->biBitCount = 16;
        break;
     default:
-       printf("ve_raw: raw output with fourcc [%x] not supported!\n", fmt);
+       mp_msg(MSGT_MENCODER, MSGL_INFO, MSGTR_MPCODECS_OutputWithFourccNotSupported, fmt);
        mux_v->bih->biCompression = 0;
        return 0;
     }
index 43d7ed3..7dfc84a 100644 (file)
@@ -8,6 +8,7 @@
 #ifdef USE_WIN32DLL
 
 #include "mp_msg.h"
+#include "help_mp.h"
 
 #include "codec-cfg.h"
 //#include "stream.h"
@@ -66,34 +67,34 @@ static BITMAPINFOHEADER* vfw_open_encoder(char *dll_name, BITMAPINFOHEADER *inpu
     mp_msg(MSGT_WIN32,MSGL_ERR,"ICOpen failed! unknown codec / wrong parameters?\n");
     return NULL;
   }
-  printf("HIC: %x\n", encoder_hic);
+  mp_msg(MSGT_WIN32,MSGL_INFO,"HIC: %x\n", encoder_hic);
 
 #if 1
 {
   ICINFO icinfo;
 
   ret = ICGetInfo(encoder_hic, &icinfo, sizeof(ICINFO));
-  printf("%ld - %ld - %d\n", ret, icinfo.dwSize, sizeof(ICINFO));
-printf("Compressor type: %.4lx\n", icinfo.fccType);
-printf("Compressor subtype: %.4lx\n", icinfo.fccHandler);
-printf("Compressor flags: %lu, version %lu, ICM version: %lu\n",
+  mp_msg(MSGT_WIN32,MSGL_INFO,"%ld - %ld - %d\n", ret, icinfo.dwSize, sizeof(ICINFO));
+  mp_msg(MSGT_WIN32,MSGL_INFO,MSGTR_MPCODECS_CompressorType, icinfo.fccType);
+  mp_msg(MSGT_WIN32,MSGL_INFO,MSGTR_MPCODECS_CompressorSubtype, icinfo.fccHandler);
+  mp_msg(MSGT_WIN32,MSGL_INFO,MSGTR_MPCODECS_CompressorFlags,
     icinfo.dwFlags, icinfo.dwVersion, icinfo.dwVersionICM);
 //printf("Compressor name: %s\n", icinfo.szName);
 //printf("Compressor description: %s\n", icinfo.szDescription);
 
-printf("Flags:");
+mp_msg(MSGT_WIN32,MSGL_INFO,MSGTR_MPCODECS_Flags);
 if (icinfo.dwFlags & VIDCF_QUALITY)
-    printf(" quality");
+    mp_msg(MSGT_WIN32,MSGL_INFO,MSGTR_MPCODECS_Quality);
 if (icinfo.dwFlags & VIDCF_FASTTEMPORALD)
-    printf(" fast-decompr");
+    mp_msg(MSGT_WIN32,MSGL_INFO," fast-decompr");
 if (icinfo.dwFlags & VIDCF_QUALITYTIME)
-    printf(" temp-quality");
-printf("\n");
+    mp_msg(MSGT_WIN32,MSGL_INFO," temp-quality");
+mp_msg(MSGT_WIN32,MSGL_INFO,"\n");
 }
 #endif
 
   temp_len = ICCompressGetFormatSize(encoder_hic, input_bih);
-  printf("ICCompressGetFormatSize ret: %d\n", temp_len);
+  mp_msg(MSGT_WIN32,MSGL_INFO,"ICCompressGetFormatSize ret: %d\n", temp_len);
 
   if (temp_len < sizeof(BITMAPINFOHEADER)) temp_len=sizeof(BITMAPINFOHEADER);
 
@@ -161,16 +162,15 @@ static int vfw_start_encoder(BITMAPINFOHEADER *input_bih, BITMAPINFOHEADER *outp
     mp_msg(MSGT_WIN32,MSGL_ERR,"ICCompressBegin failed: Error %d\n", (int)ret);
 //    return 0;
   } else
-  mp_msg(MSGT_WIN32,MSGL_V,"ICCompressBegin OK\n");
-
-    printf(" Output format after query/begin:\n");
-       printf("  biSize %d\n", output_bih->biSize);
-       printf("  biWidth %d\n", output_bih->biWidth);
-       printf("  biHeight %d\n", output_bih->biHeight);
-       printf("  biPlanes %d\n", output_bih->biPlanes);
-       printf("  biBitCount %d\n", output_bih->biBitCount);
-       printf("  biCompression 0x%x ('%.4s')\n", output_bih->biCompression, (char *)&output_bih->biCompression);
-       printf("  biSizeImage %d\n", output_bih->biSizeImage);
+    mp_msg(MSGT_WIN32,MSGL_V,"ICCompressBegin OK\n");
+    mp_msg(MSGT_WIN32,MSGL_INFO," Output format after query/begin:\n");
+    mp_msg(MSGT_WIN32,MSGL_INFO,"  biSize %d\n", output_bih->biSize);
+    mp_msg(MSGT_WIN32,MSGL_INFO,"  biWidth %d\n", output_bih->biWidth);
+    mp_msg(MSGT_WIN32,MSGL_INFO,"  biHeight %d\n", output_bih->biHeight);
+    mp_msg(MSGT_WIN32,MSGL_INFO,"  biPlanes %d\n", output_bih->biPlanes);
+    mp_msg(MSGT_WIN32,MSGL_INFO,"  biBitCount %d\n", output_bih->biBitCount);
+    mp_msg(MSGT_WIN32,MSGL_INFO,"  biCompression 0x%x ('%.4s')\n", output_bih->biCompression, (char *)&output_bih->biCompression);
+    mp_msg(MSGT_WIN32,MSGL_INFO,"  biSizeImage %d\n", output_bih->biSizeImage);
   
   encoder_buf_size=input_bih->biSizeImage;
   encoder_buf=malloc(encoder_buf_size);
@@ -270,7 +270,7 @@ static int vf_open(vf_instance_t *vf, char* args){
 
     if (!vfw_param_codec)
     {
-       printf("No VfW codec specified! It's required!\n");
+       mp_msg(MSGT_WIN32,MSGL_WARN, MSGTR_MPCODECS_NoVfwCodecSpecified);
        return 0;
     }
 //    mux_v->bih=vfw_open_encoder("divxc32.dll",vfw_bih,mmioFOURCC('D', 'I', 'V', '3'));
index f7fb37b..f34bca1 100644 (file)
@@ -318,7 +318,7 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype,
                // need to re-allocate buffer memory:
                free(mpi->planes[0]);
                mpi->flags&=~MP_IMGFLAG_ALLOCATED;
-               printf("vf.c: have to REALLOCATE buffer memory :(\n");
+               mp_msg(MSGT_VFILTER,MSGL_V,"vf.c: have to REALLOCATE buffer memory :(\n");
            }
 //     } else {
        } {
index d5d3735..200a3e7 100644 (file)
@@ -4,6 +4,7 @@
 
 #include "config.h"
 #include "mp_msg.h"
+#include "help_mp.h"
 
 #include "img_format.h"
 #include "mp_image.h"
@@ -57,7 +58,7 @@ static int config(struct vf_instance_s* vf,
     // check:
     if(vf->priv->crop_w+vf->priv->crop_x>width ||
        vf->priv->crop_h+vf->priv->crop_y>height){
-       printf("crop: bad position/width/height - cropped area is out of the original!\n");
+       mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_CropBadPositionWidthHeight);
        return 0;
     }
     if(!opt_screen_size_x && !opt_screen_size_y){
index d72c1dc..3f0d7a3 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "config.h"
 #include "mp_msg.h"
+#include "help_mp.h"
 
 #include "img_format.h"
 #include "mp_image.h"
@@ -127,7 +128,7 @@ if(++vf->priv->fno>2){      // ignore first 2 frames - they may be empty
     h -= shrink_by;
     y += (shrink_by / 2 + 1) & ~1;
 
-    printf("crop area: X: %d..%d  Y: %d..%d  (-vf crop=%d:%d:%d:%d)\n",
+    mp_msg(MSGT_VFILTER, MSGL_INFO, MSGTR_MPCODECS_CropArea,
        vf->priv->x1,vf->priv->x2,
        vf->priv->y1,vf->priv->y2,
        w,h,x,y);
index 1549b20..e420597 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "config.h"
 #include "mp_msg.h"
+#include "help_mp.h"
 
 #include "img_format.h"
 #include "mp_image.h"
@@ -232,7 +233,7 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
 #if 1
        if((vf->dmpi->flags & MP_IMGFLAG_DRAW_CALLBACK) &&
          !(vf->dmpi->flags & MP_IMGFLAG_DIRECT)){
-           printf("Full DR not possible, trying SLICES instead!\n");
+           mp_msg(MSGT_VFILTER, MSGL_INFO, MSGTR_MPCODECS_FullDRNotPossible);
            return;
        }
 #endif
@@ -273,7 +274,7 @@ static void start_slice(struct vf_instance_s* vf, mp_image_t *mpi){
             MAX(vf->priv->exp_w, mpi->width +vf->priv->exp_x), 
             MAX(vf->priv->exp_h, mpi->height+vf->priv->exp_y));
     if(!(vf->dmpi->flags&MP_IMGFLAG_DRAW_CALLBACK))
-       printf("WARNING! next filter doesn't support SLICES, get ready for sig11...\n"); // shouldn't happen.
+       mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_WarnNextFilterDoesntSupportSlices); // shouldn't happen.
     vf->priv->first_slice = 1;
 }
 
@@ -332,7 +333,7 @@ static void draw_slice(struct vf_instance_s* vf,
 static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     if(mpi->flags&MP_IMGFLAG_DIRECT || mpi->flags&MP_IMGFLAG_DRAW_CALLBACK){
        vf->dmpi=mpi->priv;
-       if(!vf->dmpi) { printf("Why do we get NULL \n"); return 0; }
+       if(!vf->dmpi) { mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_FunWhydowegetNULL); return 0; }
        mpi->priv=NULL;
 #ifdef OSD_SUPPORT
        if(vf->priv->osd) draw_osd(vf,mpi->w,mpi->h);
index f5f7696..6eeb295 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "config.h"
 #include "mp_msg.h"
+#include "help_mp.h"
 
 //#ifdef USE_LIBFAME
 
@@ -103,7 +104,7 @@ static int open(vf_instance_t *vf, char* args){
 
     vf->priv->ctx=fame_open();
     if(!vf->priv->ctx){
-       printf("FATAL: cannot open libFAME!\n");
+       mp_msg(MSGT_VFILTER, MSGL_ERR, MSGTR_MPCODECS_FatalCantOpenlibFAME);
        return 0;
     }
 
index f9a1c0a..fef17eb 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "config.h"
 #include "mp_msg.h"
+#include "help_mp.h"
 
 #include "img_format.h"
 #include "mp_image.h"
@@ -65,7 +66,7 @@ static int open(vf_instance_t *vf, char* args){
        if(!strcasecmp(args,"argb")) vf->priv->fmt=IMGFMT_ARGB; else
        if(!strcasecmp(args,"bgra")) vf->priv->fmt=IMGFMT_BGRA; else
        if(!strcasecmp(args,"abgr")) vf->priv->fmt=IMGFMT_ABGR; else
-       { printf("Unknown format name: '%s'\n",args);return 0;}
+       { mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_UnknownFormatName, args);return 0;}
     }
         
 
index ee438c5..b48c510 100644 (file)
@@ -53,6 +53,7 @@
 
 #include "config.h"
 #include "mp_msg.h"
+#include "help_mp.h"
 #include "cpudetect.h"
 
 #include "img_format.h"
@@ -88,7 +89,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
      */
     if (priv->dump_iframe) {
         if (mpi->pict_type == 1) {
-            printf("I!\n");
+            mp_msg(MSGT_VFILTER, MSGL_INFO, "I!\n");
         }
     }
 
@@ -172,7 +173,7 @@ static int open(vf_instance_t *vf, char* args)
                 if (*args != '\0') {
                     p->frame_step = atoi(args);
                     if (p->frame_step <= 0) {
-                        printf("Error parsing argument\n");
+                        mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_ErrorParsingArgument);
                         return(0);
                     }
                 }
index 8c857d9..1b16aab 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "config.h"
 #include "mp_msg.h"
+#include "help_mp.h"
 
 #include "img_format.h"
 #include "mp_image.h"
@@ -65,7 +66,7 @@ static int open(vf_instance_t *vf, char* args){
        if(!strcasecmp(args,"argb")) vf->priv->fmt=IMGFMT_ARGB; else
        if(!strcasecmp(args,"bgra")) vf->priv->fmt=IMGFMT_BGRA; else
        if(!strcasecmp(args,"abgr")) vf->priv->fmt=IMGFMT_ABGR; else
-       { printf("Unknown format name: '%s'\n",args);return 0;}
+       { mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_UnknownFormatName, args);return 0;}
     }
         
 
index e41b9e0..05b614b 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "config.h"
 #include "mp_msg.h"
+#include "help_mp.h"
 
 #include "img_format.h"
 #include "mp_image.h"
@@ -187,7 +188,7 @@ static int open(vf_instance_t *vf, char* args){
        if (!strcasecmp(args,"bgr24")) vf->priv->fmt=IMGFMT_BGR24; else
        if (!strcasecmp(args,"bgr32")) vf->priv->fmt=IMGFMT_BGR32; else
        {
-           printf("Unknown forced format name: '%s'\n", args);
+           mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_UnknownFormatName, args);
            return(0);
        }
     }
index 36e1fdc..42957cd 100644 (file)
@@ -168,11 +168,11 @@ static enum mode analyze_plane(unsigned char *old, unsigned char *new,
 
    if( mp_msg_test(MSGT_VFILTER,MSGL_V) )
       {
-      printf("%c", mode==BOTTOM_FIRST?'b':mode==TOP_FIRST?'t':'p');
-      if(tdiff==65536.0) printf("     N/A "); else printf(" %8.2f", tdiff);
-      if(bdiff==65536.0) printf("     N/A "); else printf(" %8.2f", bdiff);
-      if(pdiff==65536.0) printf("     N/A "); else printf(" %8.2f", pdiff);
-      printf("        \n");
+      mp_msg(MSGT_VFILTER, MSGL_INFO, "%c", mode==BOTTOM_FIRST?'b':mode==TOP_FIRST?'t':'p');
+      if(tdiff==65536.0) mp_msg(MSGT_VFILTER, MSGL_INFO,"     N/A "); else mp_msg(MSGT_VFILTER, MSGL_INFO," %8.2f", tdiff);
+      if(bdiff==65536.0) mp_msg(MSGT_VFILTER, MSGL_INFO,"     N/A "); else mp_msg(MSGT_VFILTER, MSGL_INFO," %8.2f", bdiff);
+      if(pdiff==65536.0) mp_msg(MSGT_VFILTER, MSGL_INFO,"     N/A "); else mp_msg(MSGT_VFILTER, MSGL_INFO," %8.2f", pdiff);
+      mp_msg(MSGT_VFILTER, MSGL_INFO,"        \n");
       }
 
    return mode;
index 483dea7..aaaca4d 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "config.h"
 #include "mp_msg.h"
+#include "help_mp.h"
 
 #include "img_format.h"
 #include "mp_image.h"
@@ -51,7 +52,7 @@ static int config(struct vf_instance_s* vf,
        unsigned int flags, unsigned int outfmt){
 
     if(vf_next_query_format(vf,IMGFMT_YV12)<=0){
-       printf("yv12 not supported by next filter/vo :(\n");
+       mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_WarnNextFilterDoesntSupport, "YV12");
        return 0;
     }
 
index 8f5a794..d4aa1fe 100644 (file)
@@ -39,6 +39,7 @@
 
 #include "config.h"
 #include "mp_msg.h"
+#include "help_mp.h"
 #include "cpudetect.h"
 
 #include "img_format.h"
@@ -278,7 +279,7 @@ static int open(vf_instance_t *vf, char* args)
 //    er |= parse_int( &args, &p->bkgSet, 0 );
 
     if (er) {
-        printf("Error parsing argument\n");
+        mp_msg(MSGT_VFILTER, MSGL_ERR, MSGTR_MPCODECS_ErrorParsingArgument);
         return(0);
     }
     /* Load some default */
index fe74b06..8310a53 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "config.h"
 #include "mp_msg.h"
+#include "help_mp.h"
 
 #include "img_format.h"
 #include "mp_image.h"
@@ -23,7 +24,7 @@ static int config(struct vf_instance_s* vf,
     sws_rgb2rgb_init(get_sws_cpuflags());
     
     if(vf_next_query_format(vf,IMGFMT_YUY2)<=0){
-       printf("yuy2 not supported by next filter/vo :(\n");
+       mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_WarnNextFilterDoesntSupport, "YUY2");
        return 0;
     }
     
index 72d6c37..654a90d 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "config.h"
 #include "mp_msg.h"
+#include "help_mp.h"
 
 #include "img_format.h"
 #include "mp_image.h"
@@ -20,7 +21,7 @@ static int config(struct vf_instance_s* vf,
        unsigned int flags, unsigned int outfmt){
     
     if(vf_next_query_format(vf,IMGFMT_YV12)<=0){
-       printf("yv12 not supported by next filter/vo :(\n");
+       mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_WarnNextFilterDoesntSupport, "YVU9");
        return 0;
     }