From b5972d6f14c04384d88d3f813b435d484562403f Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Mon, 6 Jul 2009 02:41:23 +0300 Subject: Translation system changes part 1: wrap translated strings Replace mp_msg() calls which have a translated string as the format argument with mp_tmsg and add _() around all other translated strings. --- mplayer.c | 140 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 70 insertions(+), 70 deletions(-) (limited to 'mplayer.c') diff --git a/mplayer.c b/mplayer.c index a09333f662..d59e619a4d 100644 --- a/mplayer.c +++ b/mplayer.c @@ -699,15 +699,15 @@ void exit_player_with_rc(struct MPContext *mpctx, exit_reason_t how, int rc) if(edl_records != NULL) free(edl_records); // free mem allocated for EDL switch(how) { case EXIT_QUIT: - mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_ExitingHow,MSGTR_Exit_quit); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_ExitingHow,MSGTR_Exit_quit); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_EXIT=QUIT\n"); break; case EXIT_EOF: - mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_ExitingHow,MSGTR_Exit_eof); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_ExitingHow,MSGTR_Exit_eof); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_EXIT=EOF\n"); break; case EXIT_ERROR: - mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_ExitingHow,MSGTR_Exit_error); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_ExitingHow,MSGTR_Exit_error); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_EXIT=ERROR\n"); break; default: @@ -757,7 +757,7 @@ static void exit_sighandler(int x){ kill(getpid(),SIGKILL); #endif } - mp_msg(MSGT_CPLAYER,MSGL_FATAL,"\n" MSGTR_IntBySignal,x, + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,"\n" MSGTR_IntBySignal,x, current_module?current_module:"unknown" ); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SIGNAL=%d\n", x); @@ -771,15 +771,15 @@ static void exit_sighandler(int x){ return; // killed from keyboard (^C) or killed [-9] case SIGILL: #if CONFIG_RUNTIME_CPUDETECT - mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGILL_RTCpuSel); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGILL_RTCpuSel); #else - mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGILL); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGILL); #endif case SIGFPE: case SIGSEGV: - mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGSEGV_SIGFPE); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGSEGV_SIGFPE); default: - mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGCRASH); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGCRASH); #ifdef CONFIG_CRASH_DEBUG if (crash_debug) { int gdb_pid; @@ -820,7 +820,7 @@ if (!disable_system_conf && m_config_parse_config_file(conf, MPLAYER_CONFDIR "/mplayer.conf") < 0) exit_player(mpctx, EXIT_NONE); if ((conffile = get_path("")) == NULL) { - mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_NoHomeDir); + mp_tmsg(MSGT_CPLAYER,MSGL_WARN,MSGTR_NoHomeDir); } else { #ifdef __MINGW32__ mkdir(conffile); @@ -829,10 +829,10 @@ if ((conffile = get_path("")) == NULL) { #endif free(conffile); if ((conffile = get_path("config")) == NULL) { - mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_GetpathProblem); + mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_GetpathProblem); } else { if ((conffile_fd = open(conffile, O_CREAT | O_EXCL | O_WRONLY, 0666)) != -1) { - mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_CreatingCfgFile, conffile); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_CreatingCfgFile, conffile); write(conffile_fd, default_config, strlen(default_config)); close(conffile_fd); } @@ -862,7 +862,7 @@ static void load_per_protocol_config (m_config_t* conf, const char *const file) p = m_config_get_profile (conf, protocol); if (p) { - mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_LoadingProtocolProfile, protocol); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_LoadingProtocolProfile, protocol); m_config_set_profile(conf,p); } } @@ -885,7 +885,7 @@ static void load_per_extension_config (m_config_t* conf, const char *const file) p = m_config_get_profile (conf, extension); if (p) { - mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_LoadingExtensionProfile, extension); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_LoadingExtensionProfile, extension); m_config_set_profile(conf,p); } } @@ -902,7 +902,7 @@ static void load_per_output_config (m_config_t* conf, char *cfg, char *out) p = m_config_get_profile (conf, profile); if (p) { - mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_LoadingExtensionProfile, profile); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_LoadingExtensionProfile, profile); m_config_set_profile(conf,p); } } @@ -918,7 +918,7 @@ static void load_per_file_config (m_config_t* conf, const char *const file) if (use_filedir_conf && !stat (cfg, &st)) { - mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_LoadingConfig, cfg); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_LoadingConfig, cfg); m_config_parse_config_file (conf, cfg); return; } @@ -932,7 +932,7 @@ static void load_per_file_config (m_config_t* conf, const char *const file) { if (!stat (confpath, &st)) { - mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_LoadingConfig, confpath); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_LoadingConfig, confpath); m_config_parse_config_file (conf, confpath); } @@ -1032,7 +1032,7 @@ void add_subtitles(struct MPContext *mpctx, char *filename, float fps, int noerr #else if(!subd) #endif - mp_msg(MSGT_CPLAYER, noerr ? MSGL_WARN : MSGL_ERR, MSGTR_CantLoadSub, + mp_tmsg(MSGT_CPLAYER, noerr ? MSGL_WARN : MSGL_ERR, MSGTR_CantLoadSub, filename_recode(filename)); #ifdef CONFIG_ASS @@ -1046,7 +1046,7 @@ void add_subtitles(struct MPContext *mpctx, char *filename, float fps, int noerr mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_FILE_SUB_FILENAME=%s\n", filename_recode(filename)); ++mpctx->set_of_sub_size; - mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_AddedSubtitleFile, mpctx->set_of_sub_size, + mp_tmsg(MSGT_CPLAYER, MSGL_INFO, MSGTR_AddedSubtitleFile, mpctx->set_of_sub_size, filename_recode(filename)); } @@ -1178,7 +1178,7 @@ static void print_status(struct MPContext *mpctx, double a_pos, bool at_frame) mpctx->last_av_difference = a_pos - sh_video->pts - audio_delay; if (mpctx->last_av_difference > 0.5 && drop_frame_cnt > 50 && !mpctx->drop_message_shown) { - mp_msg(MSGT_AVSYNC,MSGL_WARN,MSGTR_SystemTooSlow); + mp_tmsg(MSGT_AVSYNC,MSGL_WARN,MSGTR_SystemTooSlow); mpctx->drop_message_shown = true; } } @@ -1616,7 +1616,7 @@ if(mpctx->sh_audio){ mpctx->sh_audio->samplerate, // output: &ao_data.samplerate, &ao_data.channels, &ao_data.format)){ - mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_AudioFilterChainPreinitError); + mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_AudioFilterChainPreinitError); exit_player(mpctx, EXIT_ERROR); } #endif @@ -1627,7 +1627,7 @@ if(mpctx->sh_audio){ ao_data.channels, ao_data.format,0))){ // FAILED: - mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CannotInitAO); + mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CannotInitAO); uninit_player(mpctx, INITIALIZED_ACODEC); // close codec mpctx->sh_audio=mpctx->d_audio->sh=NULL; // -> nosound mpctx->d_audio->id = -2; @@ -1648,7 +1648,7 @@ if(mpctx->sh_audio){ #if 1 current_module="af_init"; if(!build_afilter_chain(mpctx, mpctx->sh_audio, &ao_data)) { - mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_NoMatchingFilter); + mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_NoMatchingFilter); // mp_msg(MSGT_CPLAYER,MSGL_ERR,"Couldn't find matching filter / ao format! -> NOSOUND\n"); // uninit_player(mpctx, INITIALIZED_ACODEC|INITIALIZED_AO); // close codec & ao // sh_audio=mpctx->d_audio->sh=NULL; // -> nosound @@ -1761,7 +1761,7 @@ static float timing_sleep(struct MPContext *mpctx, float time_frame) while (time_frame > 0.000) { unsigned long rtc_ts; if (read(rtc_fd, &rtc_ts, sizeof(rtc_ts)) <= 0) - mp_msg(MSGT_CPLAYER, MSGL_ERR, MSGTR_LinuxRTCReadError, strerror(errno)); + mp_tmsg(MSGT_CPLAYER, MSGL_ERR, MSGTR_LinuxRTCReadError, strerror(errno)); time_frame -= get_relative_time(mpctx); } } else @@ -1778,7 +1778,7 @@ static float timing_sleep(struct MPContext *mpctx, float time_frame) if (softsleep){ current_module = "sleep_soft"; if (time_frame < 0) - mp_msg(MSGT_AVSYNC, MSGL_WARN, MSGTR_SoftsleepUnderflow); + mp_tmsg(MSGT_AVSYNC, MSGL_WARN, MSGTR_SoftsleepUnderflow); while (time_frame > 0) time_frame -= get_relative_time(mpctx); // burn the CPU } @@ -2103,7 +2103,7 @@ int reinit_video_chain(struct MPContext *mpctx) //shouldn't we set dvideo->id=-2 when we fail? //if((mpctx->video_out->preinit(vo_subdevice))!=0){ if(!(mpctx->video_out=init_best_video_out(opts, mpctx->x11_state, mpctx->key_fifo, mpctx->input))){ - mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_ErrorInitializingVODevice); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_ErrorInitializingVODevice); goto err_out; } mpctx->initialized_flags|=INITIALIZED_VO; @@ -2121,7 +2121,7 @@ int reinit_video_chain(struct MPContext *mpctx) char* vf_arg[] = { "_oldargs_", menu_root, NULL }; vf_menu = vf_open_plugin(opts,libmenu_vfs,sh_video->vfilter,"menu",vf_arg); if(!vf_menu) { - mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantOpenLibmenuFilterWithThisRootMenu,menu_root); + mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantOpenLibmenuFilterWithThisRootMenu,menu_root); use_menu = 0; } } @@ -2389,13 +2389,13 @@ static void pause_loop(struct MPContext *mpctx) // The pause string is: "\n == PAUSE == \r" so we need to // take the first and the last char out if (term_osd && !mpctx->sh_video) { - char msg[128] = MSGTR_Paused; + char msg[128] = _(MSGTR_Paused); int mlen = strlen(msg); msg[mlen-1] = '\0'; set_osd_msg(OSD_MSG_PAUSE, 1, 0, "%s", msg+1); update_osd_msg(mpctx); } else - mp_msg(MSGT_CPLAYER,MSGL_STATUS,MSGTR_Paused); + mp_tmsg(MSGT_CPLAYER,MSGL_STATUS,MSGTR_Paused); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_PAUSED\n"); } #ifdef CONFIG_GUI @@ -2469,7 +2469,7 @@ static void edl_update(MPContext *mpctx) return; if (!mpctx->sh_video) { - mp_msg(MSGT_CPLAYER, MSGL_ERR, MSGTR_EdlNOsh_video); + mp_tmsg(MSGT_CPLAYER, MSGL_ERR, MSGTR_EdlNOsh_video); free_edl(edl_records); next_edl_record = NULL; edl_records = NULL; @@ -2984,13 +2984,13 @@ int gui_no_filename=0; #ifndef CONFIG_GUI if(use_gui){ - mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_NoGui); + mp_tmsg(MSGT_CPLAYER,MSGL_WARN,MSGTR_NoGui); use_gui=0; } #else #if !defined(__MINGW32__) && !defined(__CYGWIN__) if(use_gui && !vo_init()){ - mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_GuiNeedsX); + mp_tmsg(MSGT_CPLAYER,MSGL_WARN,MSGTR_GuiNeedsX); use_gui=0; } #endif @@ -3028,7 +3028,7 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ if(!parse_codec_cfg(NULL)){ exit_player_with_rc(mpctx, EXIT_NONE, 0); } - mp_msg(MSGT_CPLAYER,MSGL_V,MSGTR_BuiltinCodecsConf); + mp_tmsg(MSGT_CPLAYER,MSGL_V,MSGTR_BuiltinCodecsConf); } } free( mem_ptr ); // release the buffer created by get_path() @@ -3043,14 +3043,14 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ } #endif if(audio_codec_list && strcmp(audio_codec_list[0],"help")==0){ - mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_AvailableAudioCodecs); + mp_tmsg(MSGT_CPLAYER, MSGL_INFO, MSGTR_AvailableAudioCodecs); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AUDIO_CODECS\n"); list_codecs(1); mp_msg(MSGT_FIXME, MSGL_FIXME, "\n"); opt_exit = 1; } if(video_codec_list && strcmp(video_codec_list[0],"help")==0){ - mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_AvailableVideoCodecs); + mp_tmsg(MSGT_CPLAYER, MSGL_INFO, MSGTR_AvailableVideoCodecs); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VIDEO_CODECS\n"); list_codecs(0); mp_msg(MSGT_FIXME, MSGL_FIXME, "\n"); @@ -3094,7 +3094,7 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ exit_player(mpctx, EXIT_NONE); if (player_idle_mode && use_gui) { - mp_msg(MSGT_CPLAYER, MSGL_FATAL, MSGTR_NoIdleAndGui); + mp_tmsg(MSGT_CPLAYER, MSGL_FATAL, MSGTR_NoIdleAndGui); exit_player_with_rc(mpctx, EXIT_NONE, 1); } @@ -3111,7 +3111,7 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ // Many users forget to include command line in bugreports... if( mp_msg_test(MSGT_CPLAYER,MSGL_V) ){ - mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_CommandLine); + mp_tmsg(MSGT_CPLAYER, MSGL_INFO, MSGTR_CommandLine); for(i=1;i1); - if(!vo_font) mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadFont, + if(!vo_font) mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadFont, filename_recode(font_name)); } else { // try default: @@ -3158,23 +3158,23 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ { // seteuid(0); /* Can't hurt to try to get root here */ if ((rtc_fd = open(rtc_device ? rtc_device : "/dev/rtc", O_RDONLY)) < 0) - mp_msg(MSGT_CPLAYER, MSGL_WARN, MSGTR_RTCDeviceNotOpenable, + mp_tmsg(MSGT_CPLAYER, MSGL_WARN, MSGTR_RTCDeviceNotOpenable, rtc_device ? rtc_device : "/dev/rtc", strerror(errno)); else { unsigned long irqp = 1024; /* 512 seemed OK. 128 is jerky. */ if (ioctl(rtc_fd, RTC_IRQP_SET, irqp) < 0) { - mp_msg(MSGT_CPLAYER, MSGL_WARN, MSGTR_LinuxRTCInitErrorIrqpSet, irqp, strerror(errno)); - mp_msg(MSGT_CPLAYER, MSGL_HINT, MSGTR_IncreaseRTCMaxUserFreq, irqp); + mp_tmsg(MSGT_CPLAYER, MSGL_WARN, MSGTR_LinuxRTCInitErrorIrqpSet, irqp, strerror(errno)); + mp_tmsg(MSGT_CPLAYER, MSGL_HINT, MSGTR_IncreaseRTCMaxUserFreq, irqp); close (rtc_fd); rtc_fd = -1; } else if (ioctl(rtc_fd, RTC_PIE_ON, 0) < 0) { /* variable only by the root */ - mp_msg(MSGT_CPLAYER, MSGL_ERR, MSGTR_LinuxRTCInitErrorPieOn, strerror(errno)); + mp_tmsg(MSGT_CPLAYER, MSGL_ERR, MSGTR_LinuxRTCInitErrorPieOn, strerror(errno)); close (rtc_fd); rtc_fd = -1; } else - mp_msg(MSGT_CPLAYER, MSGL_V, MSGTR_UsingRTCTiming, irqp); + mp_tmsg(MSGT_CPLAYER, MSGL_V, MSGTR_UsingRTCTiming, irqp); } } #ifdef CONFIG_GUI @@ -3207,17 +3207,17 @@ stream_set_interrupt_callback(mp_input_check_interrupt, mpctx->input); #ifdef CONFIG_MENU if(use_menu) { if(menu_cfg && menu_init(mpctx, mpctx->mconfig, mpctx->input, menu_cfg)) - mp_msg(MSGT_CPLAYER, MSGL_V, MSGTR_MenuInitialized, menu_cfg); + mp_tmsg(MSGT_CPLAYER, MSGL_V, MSGTR_MenuInitialized, menu_cfg); else { menu_cfg = get_path("menu.conf"); if(menu_init(mpctx, mpctx->mconfig, mpctx->input, menu_cfg)) - mp_msg(MSGT_CPLAYER, MSGL_V, MSGTR_MenuInitialized, menu_cfg); + mp_tmsg(MSGT_CPLAYER, MSGL_V, MSGTR_MenuInitialized, menu_cfg); else { if(menu_init(mpctx, mpctx->mconfig, mpctx->input, MPLAYER_CONFDIR "/menu.conf")) - mp_msg(MSGT_CPLAYER, MSGL_V, MSGTR_MenuInitialized, MPLAYER_CONFDIR"/menu.conf"); + mp_tmsg(MSGT_CPLAYER, MSGL_V, MSGTR_MenuInitialized, MPLAYER_CONFDIR"/menu.conf"); else { - mp_msg(MSGT_CPLAYER, MSGL_ERR, MSGTR_MenuInitFailed); + mp_tmsg(MSGT_CPLAYER, MSGL_ERR, MSGTR_MenuInitFailed); use_menu = 0; } } @@ -3289,7 +3289,7 @@ play_next_file: // or cache filling if(!noconsolecontrols && !slave_mode){ if(mpctx->initialized_flags&INITIALIZED_GETCH2) - mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_Getch2InitializedTwice); + mp_tmsg(MSGT_CPLAYER,MSGL_WARN,MSGTR_Getch2InitializedTwice); else getch2_enable(); // prepare stdin for hotkeys... mpctx->initialized_flags|=INITIALIZED_GETCH2; @@ -3393,7 +3393,7 @@ while (player_idle_mode && !mpctx->filename) { //--------------------------------------------------------------------------- if(mpctx->filename) - mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_Playing, + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_Playing, filename_recode(mpctx->filename)); if (edl_filename) { @@ -3404,7 +3404,7 @@ if (edl_output_filename) { if (edl_fd) fclose(edl_fd); if ((edl_fd = fopen(edl_output_filename, "w")) == NULL) { - mp_msg(MSGT_CPLAYER, MSGL_ERR, MSGTR_EdlCantOpenForWrite, + mp_tmsg(MSGT_CPLAYER, MSGL_ERR, MSGTR_EdlCantOpenForWrite, filename_recode(edl_output_filename)); } } @@ -3415,7 +3415,7 @@ if (edl_output_filename) { if (vobsub_name){ vo_vobsub=vobsub_open(vobsub_name,spudec_ifo,1,&vo_spudec); if(vo_vobsub==NULL) - mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadSub, + mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadSub, filename_recode(vobsub_name)); } else if (sub_auto && mpctx->filename){ /* try to autodetect vobsub from movie filename ::atmos */ @@ -3507,14 +3507,14 @@ if(stream_dump_type==5){ FILE *f; current_module="dumpstream"; if(mpctx->stream->type==STREAMTYPE_STREAM && mpctx->stream->fd<0){ - mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_DumpstreamFdUnavailable); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_DumpstreamFdUnavailable); exit_player(mpctx, EXIT_ERROR); } stream_reset(mpctx->stream); stream_seek(mpctx->stream,mpctx->stream->start_pos); f=fopen(stream_dump_name,"wb"); if(!f){ - mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CantOpenDumpfile); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CantOpenDumpfile); exit_player(mpctx, EXIT_ERROR); } if (dvd_chapter > 1) { @@ -3525,7 +3525,7 @@ if(stream_dump_type==5){ len=stream_read(mpctx->stream,buf,4096); if(len>0) { if(fwrite(buf,len,1,f) != 1) { - mp_msg(MSGT_MENCODER,MSGL_FATAL,MSGTR_ErrorWritingFile,stream_dump_name); + mp_tmsg(MSGT_MENCODER,MSGL_FATAL,MSGTR_ErrorWritingFile,stream_dump_name); exit_player(mpctx, EXIT_ERROR); } } @@ -3537,10 +3537,10 @@ if(stream_dump_type==5){ } } if(fclose(f)) { - mp_msg(MSGT_MENCODER,MSGL_FATAL,MSGTR_ErrorWritingFile,stream_dump_name); + mp_tmsg(MSGT_MENCODER,MSGL_FATAL,MSGTR_ErrorWritingFile,stream_dump_name); exit_player(mpctx, EXIT_ERROR); } - mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_CoreDumped); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_CoreDumped); exit_player_with_rc(mpctx, EXIT_EOF, 0); } @@ -3716,7 +3716,7 @@ if((stream_dump_type)&&(stream_dump_type<4)){ case 3: ds=mpctx->d_sub;break; } if(!ds){ - mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_DumpSelectedStreamMissing); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_DumpSelectedStreamMissing); exit_player(mpctx, EXIT_ERROR); } // disable other streams: @@ -3726,7 +3726,7 @@ if((stream_dump_type)&&(stream_dump_type<4)){ // let's dump it! f=fopen(stream_dump_name,"wb"); if(!f){ - mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CantOpenDumpfile); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CantOpenDumpfile); exit_player(mpctx, EXIT_ERROR); } while(!ds->eof){ @@ -3742,7 +3742,7 @@ if((stream_dump_type)&&(stream_dump_type<4)){ } } fclose(f); - mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_CoreDumped); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_CoreDumped); exit_player_with_rc(mpctx, EXIT_EOF, 0); } @@ -3753,10 +3753,10 @@ if(mpctx->sh_video){ current_module="video_read_properties"; if(!video_read_properties(mpctx->sh_video)) { - mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CannotReadVideoProperties); + mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CannotReadVideoProperties); mpctx->sh_video=mpctx->d_video->sh=NULL; } else { - mp_msg(MSGT_CPLAYER,MSGL_V,MSGTR_FilefmtFourccSizeFpsFtime, + mp_tmsg(MSGT_CPLAYER,MSGL_V,MSGTR_FilefmtFourccSizeFpsFtime, mpctx->demuxer->file_format,mpctx->sh_video->format, mpctx->sh_video->disp_w,mpctx->sh_video->disp_h, mpctx->sh_video->fps,mpctx->sh_video->frametime ); @@ -3769,7 +3769,7 @@ if(mpctx->sh_video){ vo_fps = mpctx->sh_video->fps; if(!mpctx->sh_video->fps && !force_fps){ - mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_FPSnotspecified); + mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_FPSnotspecified); mpctx->sh_video=mpctx->d_video->sh=NULL; } } @@ -3777,7 +3777,7 @@ if(mpctx->sh_video){ } if(!mpctx->sh_video && !mpctx->sh_audio){ - mp_msg(MSGT_CPLAYER,MSGL_FATAL, MSGTR_NoStreamFound); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL, MSGTR_NoStreamFound); #ifdef CONFIG_DVBIN if(mpctx->stream->type == STREAMTYPE_DVB) { @@ -3794,7 +3794,7 @@ if(!mpctx->sh_video && !mpctx->sh_audio){ } } #endif - goto goto_next_file; // exit_player(MSGTR_Exit_error); + goto goto_next_file; // exit_player(_(MSGTR_Exit_error)); } /* display clip info */ @@ -3907,7 +3907,7 @@ if(!mpctx->sh_video) goto main; // audio-only if(!reinit_video_chain(mpctx)) { if(!mpctx->sh_video){ if(!mpctx->sh_audio) goto goto_next_file; - goto main; // exit_player(MSGTR_Exit_error); + goto main; // exit_player(_(MSGTR_Exit_error)); } } @@ -3970,14 +3970,14 @@ if(mpctx->sh_audio){ } if(!mpctx->sh_audio){ - mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_NoSound); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_NoSound); mp_msg(MSGT_CPLAYER,MSGL_V,"Freeing %d unused audio chunks.\n",mpctx->d_audio->packs); ds_free_packs(mpctx->d_audio); // free buffered chunks //mpctx->d_audio->id=-2; // do not read audio chunks //uninit_player(mpctx, INITIALIZED_AO); // close device } if(!mpctx->sh_video){ - mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_Video_NoVideo); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_Video_NoVideo); mp_msg(MSGT_CPLAYER,MSGL_V,"Freeing %d unused video chunks.\n",mpctx->d_video->packs); ds_free_packs(mpctx->d_video); mpctx->d_video->id=-2; @@ -3991,7 +3991,7 @@ if (!mpctx->sh_video && !mpctx->sh_audio) if(force_fps && mpctx->sh_video){ vo_fps = mpctx->sh_video->fps=force_fps; mpctx->sh_video->frametime=1.0f/mpctx->sh_video->fps; - mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_FPSforced,mpctx->sh_video->fps,mpctx->sh_video->frametime); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_FPSforced,mpctx->sh_video->fps,mpctx->sh_video->frametime); } #ifdef CONFIG_GUI @@ -4014,7 +4014,7 @@ if ( use_gui ) { if(opts->loop_times>1) opts->loop_times--; else if(opts->loop_times==1) opts->loop_times = -1; -mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_StartPlaying); +mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_StartPlaying); total_time_usage_start=GetTimer(); audio_time_usage=0; video_time_usage=0; vout_time_usage=0; @@ -4031,7 +4031,7 @@ if (seek_to_sec) { } if (end_at.type == END_AT_SIZE) { - mp_msg(MSGT_CPLAYER, MSGL_WARN, MSGTR_MPEndposNoSizeBased); + mp_tmsg(MSGT_CPLAYER, MSGL_WARN, MSGTR_MPEndposNoSizeBased); end_at.type = END_AT_NONE; } @@ -4102,7 +4102,7 @@ if(!mpctx->sh_video) { double frame_time = update_video(mpctx, &blit_frame); mp_dbg(MSGT_AVSYNC,MSGL_DBG2,"*** ftime=%5.3f ***\n",frame_time); if (mpctx->sh_video->vf_initialized < 0) { - mp_msg(MSGT_CPLAYER,MSGL_FATAL, MSGTR_NotInitializeVOPorVO); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL, MSGTR_NotInitializeVOPorVO); mpctx->stop_play = PT_NEXT_ENTRY; goto goto_next_file; } -- cgit v1.2.3