From 534a2e220edee5f5fef5cc40d09b29ad5d697067 Mon Sep 17 00:00:00 2001 From: jaf Date: Tue, 13 Aug 2002 23:24:20 +0000 Subject: [PATCH] messages moved from vf.c and vd.c git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6994 b3059339-0415-0410-9bf9-f77b7e298cf2 --- help_mp-de.h | 14 ++++++++++++++ help_mp-en.h | 13 +++++++++++++ libmpcodecs/vd.c | 13 +++++-------- libmpcodecs/vf.c | 10 +++++----- 4 files changed, 37 insertions(+), 13 deletions(-) diff --git a/help_mp-de.h b/help_mp-de.h index 593924433c..6422d45a13 100644 --- a/help_mp-de.h +++ b/help_mp-de.h @@ -304,6 +304,20 @@ static char help_text[]= #define MSGTR_LIRCsocketerr "Fehler im LIRC Socket: %s\n" #define MSGTR_LIRCcfgerr "Kann LIRC Konfigurationsdatei nicht lesen %s !\n" +// vf.c +#define MSGTR_CouldNotFindVideoFilter "Konnte Videofilter '%s' nicht finden\n" +#define MSGTR_CouldNotOpenVideoFilter "Konnte Videofilter '%s' nicht öffnen\n" +#define MSGTR_OpeningVideoFilter "Öffne Videofilter: [%s=%s]\n" +#define MSGTR_OpeningVideoFilter2 "Öffne Videofilter: [%s]\n" +#define MSGTR_CannotFindColorspace "Konnte kein allgemeines Colorspace-Format finden, auch nicht mithilfe von 'scale' :(\n" + +// vd.c +#define MSGTR_CodecDidNotSet "VDec: Codec hat sh->disp_w und sh->disp_h nicht gesetzt, versuche zu umgehen!\n" +#define MSGTR_VoConfigRequest "VDec: VO wird versucht auf %d x %d (Bevorzugter Colorspace: %s) zu setzen\n" +#define MSGTR_CouldNotFindColorspace "Kann keinen passenden Colorspace finden - versuche erneut mithilfe von -vop scale...\n" +#define MSGTR_MovieAspectIsSet "Movie-Aspect ist %.2f:1 - Prescaling zur korrekten Videogröße.\n" +#define MSGTR_MovieAspectUndefined "Movie-Aspect ist undefiniert - kein Prescaling verwendet.\n" + // ====================== GUI messages/buttons ======================== diff --git a/help_mp-en.h b/help_mp-en.h index b548855c83..2e0a569316 100644 --- a/help_mp-en.h +++ b/help_mp-en.h @@ -305,7 +305,20 @@ static char help_text[]= #define MSGTR_LIRCsocketerr "Something's wrong with the lirc socket: %s\n" #define MSGTR_LIRCcfgerr "Failed to read LIRC config file %s !\n" +// vf.c +#define MSGTR_CouldNotFindVideoFilter "Couldn't find video filter '%s'\n" +#define MSGTR_CouldNotOpenVideoFilter "Couldn't open video filter '%s'\n" +#define MSGTR_OpeningVideoFilter "Opening video filter: [%s=%s]\n" +#define MSGTR_OpeningVideoFilter2 "Opening video filter: [%s]\n" +#define MSGTR_CannotFindColorspace "Cannot find common colorspace, even by inserting 'scale' :(\n" +// vd.c +#define MSGTR_CodecDidNotSet "VDec: codec didn't set sh->disp_w and sh->disp_h, trying to workaround!\n" +#define MSGTR_VoConfigRequest "VDec: vo config request - %d x %d (preferred csp: %s)\n" +#define MSGTR_CouldNotFindColorspace "Couldn't find matching colorspace - retrying with -vop scale...\n" +#define MSGTR_MovieAspectIsSet "Movie-Aspect is %.2f:1 - prescaling to correct movie aspect.\n" +#define MSGTR_MovieAspectUndefined "Movie-Aspect is undefined - no prescaling applied.\n" + // ====================== GUI messages/buttons ======================== #ifdef HAVE_NEW_GUI diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c index 8bfb525192..caf53efb30 100644 --- a/libmpcodecs/vd.c +++ b/libmpcodecs/vd.c @@ -139,8 +139,7 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outf #if 1 if(!(sh->disp_w && sh->disp_h)) - mp_msg(MSGT_DECVIDEO,MSGL_WARN, - "VDec: codec didn't set sh->disp_w and sh->disp_h, trying to workaround!\n"); + mp_msg(MSGT_DECVIDEO,MSGL_WARN, MSGTR_CodecDidNotSet); /* XXX: HACK, if sh->disp_* aren't set, * but we have w and h, set them :: atmos */ if(!sh->disp_w && w) @@ -149,8 +148,7 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outf sh->disp_h=h; #endif - mp_msg(MSGT_DECVIDEO,MSGL_INFO,"VDec: vo config request - %d x %d (preferred csp: %s) \n", - w,h,vo_format_name(preferred_outfmt)); + mp_msg(MSGT_DECVIDEO,MSGL_INFO,MSGTR_VoConfigRequest,w,h,vo_format_name(preferred_outfmt)); // if(!vf) return 1; // temp hack @@ -178,7 +176,7 @@ csp_again: if(j<0){ // TODO: no match - we should use conversion... if(strcmp(vf->info->name,"scale")){ - mp_msg(MSGT_DECVIDEO,MSGL_INFO,"Couldn't find matching colorspace - retrying with -vop scale...\n"); + mp_msg(MSGT_DECVIDEO,MSGL_INFO,MSGTR_CouldNotFindColorspace); vf=vf_open_filter(vf,"scale",NULL); goto csp_again; } @@ -234,8 +232,7 @@ csp_again: } if(sh->aspect>0.01){ int w; - mp_msg(MSGT_CPLAYER,MSGL_INFO,"Movie-Aspect is %.2f:1 - prescaling to correct movie aspect.\n", - sh->aspect); + mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_MovieAspectIsSet,sh->aspect); w=(int)((float)screen_size_y*sh->aspect); w+=w%2; // round // we don't like horizontal downscale || user forced width: if(w8){ @@ -243,7 +240,7 @@ csp_again: screen_size_y+=screen_size_y%2; // round } else screen_size_x=w; // keep new width } else { - mp_msg(MSGT_CPLAYER,MSGL_INFO,"Movie-Aspect is undefined - no prescaling applied.\n"); + mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_MovieAspectUndefined); } } diff --git a/libmpcodecs/vf.c b/libmpcodecs/vf.c index 6c26f82103..96a2018e10 100644 --- a/libmpcodecs/vf.c +++ b/libmpcodecs/vf.c @@ -238,7 +238,7 @@ vf_instance_t* vf_open_plugin(vf_info_t** filter_list, vf_instance_t* next, char int i; for(i=0;;i++){ if(!filter_list[i]){ - mp_msg(MSGT_VFILTER,MSGL_ERR,"Couldn't find video filter '%s'\n",name); + mp_msg(MSGT_VFILTER,MSGL_ERR,MSGTR_CouldNotFindVideoFilter,name); return NULL; // no such filter! } if(!strcmp(filter_list[i]->name,name)) break; @@ -255,15 +255,15 @@ vf_instance_t* vf_open_plugin(vf_info_t** filter_list, vf_instance_t* next, char vf->default_reqs=0; if(vf->info->open(vf,args)>0) return vf; // Success! free(vf); - mp_msg(MSGT_VFILTER,MSGL_ERR,"Couldn't open video filter '%s'\n",name); + mp_msg(MSGT_VFILTER,MSGL_ERR,MSGTR_CouldNotOpenVideoFilter,name); return NULL; } vf_instance_t* vf_open_filter(vf_instance_t* next, char *name, char *args){ if(strcmp(name,"vo")) mp_msg(MSGT_VFILTER,MSGL_INFO, - args ? "Opening video filter: [%s=%s]\n" - : "Opening video filter: [%s]\n" ,name,args); + args ? MSGTR_OpeningVideoFilter + : MSGTR_OpeningVideoFilter2 ,name,args); return vf_open_plugin(filter_list,next,name,args); } @@ -315,7 +315,7 @@ int vf_next_config(struct vf_instance_s* vf, vf->next=vf2; flags=vf->next->query_format(vf->next,outfmt); if(!flags){ - mp_msg(MSGT_VFILTER,MSGL_ERR,"Cannot find common colorspace, even by inserting 'scale' :(\n"); + mp_msg(MSGT_VFILTER,MSGL_ERR,MSGTR_CannotFindColorspace); return 0; // FAIL } }