diff options
151 files changed, 1770 insertions, 1515 deletions
diff --git a/codec-cfg.c b/codec-cfg.c index 23db052359..90f8f2207d 100644 --- a/codec-cfg.c +++ b/codec-cfg.c @@ -94,13 +94,13 @@ static int add_to_fourcc(char *s, char *alias, unsigned int *fourcc, goto err_out_parse_error; return 1; err_out_duplicated: - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_DuplicateFourcc); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"duplicated FourCC"); return 0; err_out_too_many: - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_TooManyFourccs); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"too many FourCCs/formats..."); return 0; err_out_parse_error: - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_ParseError); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"parse error"); return 0; } @@ -113,20 +113,20 @@ static int add_to_format(char *s, char *alias,unsigned int *fourcc, unsigned int for (i = 0; i < CODECS_MAX_FOURCC && fourcc[i] != 0xffffffff; i++) /* NOTHING */; if (i == CODECS_MAX_FOURCC) { - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_TooManyFourccs); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"too many FourCCs/formats..."); return 0; } fourcc[i]=strtoul(s,&endptr,0); if (*endptr != '\0') { - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_ParseErrorFIDNotNumber); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"parse error (format ID not a number?)"); return 0; } if(alias){ fourccmap[i]=strtoul(alias,&endptr,0); if (*endptr != '\0') { - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_ParseErrorFIDAliasNotNumber); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"parse error (format ID alias not a number?)"); return 0; } } else @@ -134,7 +134,7 @@ static int add_to_format(char *s, char *alias,unsigned int *fourcc, unsigned int for (j = 0; j < i; j++) if (fourcc[j] == fourcc[i]) { - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_DuplicateFID); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"duplicated format ID"); return 0; } @@ -254,10 +254,10 @@ static int add_to_inout(char *sfmt, char *sflags, unsigned int *outfmt, return 1; err_out_too_many: - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_TooManyOut); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"too many out..."); return 0; err_out_parse_error: - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_ParseError); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"parse error"); return 0; } @@ -338,7 +338,7 @@ static int validate_codec(codecs_t *c, int type) /* NOTHING */; if (i < strlen(tmp_name)) { - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_InvalidCodecName, c->name); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"\ncodec(%s) name is not valid!\n", c->name); return 0; } @@ -347,13 +347,13 @@ static int validate_codec(codecs_t *c, int type) #if 0 if (c->fourcc[0] == 0xffffffff) { - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecLacksFourcc, c->name); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"\ncodec(%s) does not have FourCC/format!\n", c->name); return 0; } #endif if (!c->drv) { - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecLacksDriver, c->name); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"\ncodec(%s) does not have a driver!\n", c->name); return 0; } @@ -362,7 +362,7 @@ static int validate_codec(codecs_t *c, int type) #warning Where are they defined ???????????? if (!c->dll && (c->driver == 4 || (c->driver == 2 && type == TYPE_VIDEO))) { - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecNeedsDLL, c->name); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"\ncodec(%s) needs a 'dll'!\n", c->name); return 0; } #warning Can guid.f1 be 0? How does one know that it was not given? @@ -370,7 +370,7 @@ static int validate_codec(codecs_t *c, int type) if (type == TYPE_VIDEO) if (c->outfmt[0] == 0xffffffff) { - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecNeedsOutfmt, c->name); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"\ncodec(%s) needs an 'outfmt'!\n", c->name); return 0; } #endif @@ -388,7 +388,7 @@ static int add_comment(char *s, char **d) (*d)[pos++] = '\n'; } if (!(*d = realloc(*d, pos + strlen(s) + 1))) { - mp_tmsg(MSGT_CODECCFG,MSGL_FATAL,MSGTR_CantAllocateComment); + mp_tmsg(MSGT_CODECCFG,MSGL_FATAL,"Can't allocate memory for comment. "); return 0; } strcpy(*d + pos, s); @@ -437,7 +437,7 @@ static int get_token(int min, int max) char c; if (max >= MAX_NR_TOKEN) { - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"get_token(): max >= MAX_MR_TOKEN!"); goto out_eof; } @@ -521,15 +521,15 @@ int parse_codec_cfg(const char *cfgfile) #endif } - mp_tmsg(MSGT_CODECCFG,MSGL_V,MSGTR_ReadingFile, cfgfile); + mp_tmsg(MSGT_CODECCFG,MSGL_V,"Reading %s: ", cfgfile); if ((fp = fopen(cfgfile, "r")) == NULL) { - mp_tmsg(MSGT_CODECCFG,MSGL_V,MSGTR_CantOpenFileError, cfgfile, strerror(errno)); + mp_tmsg(MSGT_CODECCFG,MSGL_V,"Can't open '%s': %s\n", cfgfile, strerror(errno)); return 0; } if ((line = malloc(MAX_LINE_LEN + 1)) == NULL) { - mp_tmsg(MSGT_CODECCFG,MSGL_FATAL,MSGTR_CantGetMemoryForLine, strerror(errno)); + mp_tmsg(MSGT_CODECCFG,MSGL_FATAL,"Can't get memory for 'line': %s\n", strerror(errno)); return 0; } read_nextline = 1; @@ -587,7 +587,7 @@ int parse_codec_cfg(const char *cfgfile) } if (!(*codecsp = realloc(*codecsp, sizeof(codecs_t) * (*nr_codecsp + 2)))) { - mp_tmsg(MSGT_CODECCFG,MSGL_FATAL,MSGTR_CantReallocCodecsp, strerror(errno)); + mp_tmsg(MSGT_CODECCFG,MSGL_FATAL,"Can't realloc '*codecsp': %s\n", strerror(errno)); goto err_out; } codec=*codecsp + *nr_codecsp; @@ -602,19 +602,19 @@ int parse_codec_cfg(const char *cfgfile) for (i = 0; i < *nr_codecsp - 1; i++) { if(( (*codecsp)[i].name!=NULL) && (!strcmp(token[0], (*codecsp)[i].name)) ) { - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecNameNotUnique, token[0]); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"Codec name '%s' isn't unique.", token[0]); goto err_out_print_linenum; } } if (!(codec->name = strdup(token[0]))) { - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CantStrdupName, strerror(errno)); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"Can't strdup -> 'name': %s\n", strerror(errno)); goto err_out; } } else if (!strcmp(token[0], "info")) { if (codec->info || get_token(1, 1) < 0) goto err_out_parse_error; if (!(codec->info = strdup(token[0]))) { - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CantStrdupInfo, strerror(errno)); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"Can't strdup -> 'info': %s\n", strerror(errno)); goto err_out; } } else if (!strcmp(token[0], "comment")) { @@ -638,14 +638,14 @@ int parse_codec_cfg(const char *cfgfile) if (get_token(1, 1) < 0) goto err_out_parse_error; if (!(codec->drv = strdup(token[0]))) { - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CantStrdupDriver, strerror(errno)); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"Can't strdup -> 'driver': %s\n", strerror(errno)); goto err_out; } } else if (!strcmp(token[0], "dll")) { if (get_token(1, 1) < 0) goto err_out_parse_error; if (!(codec->dll = strdup(token[0]))) { - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CantStrdupDLL, strerror(errno)); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"Can't strdup -> 'dll': %s", strerror(errno)); goto err_out; } } else if (!strcmp(token[0], "guid")) { @@ -714,7 +714,7 @@ int parse_codec_cfg(const char *cfgfile) } if (!validate_codec(codec, codec_type)) goto err_out_not_valid; - mp_tmsg(MSGT_CODECCFG,MSGL_INFO,MSGTR_AudioVideoCodecTotals, nr_acodecs, nr_vcodecs); + mp_tmsg(MSGT_CODECCFG,MSGL_INFO,"%d audio & %d video codecs\n", nr_acodecs, nr_vcodecs); if(video_codecs) video_codecs[nr_vcodecs].name = NULL; if(audio_codecs) audio_codecs[nr_acodecs].name = NULL; out: @@ -724,7 +724,7 @@ out: return 1; err_out_parse_error: - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_ParseError); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"parse error"); err_out_print_linenum: PRINT_LINENUM; err_out: @@ -736,10 +736,10 @@ err_out: fclose(fp); return 0; err_out_not_valid: - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecDefinitionIncorrect); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"Codec is not defined correctly."); goto err_out_print_linenum; err_out_release_num: - mp_tmsg(MSGT_CODECCFG,MSGL_ERR,MSGTR_OutdatedCodecsConf); + mp_tmsg(MSGT_CODECCFG,MSGL_ERR,"This codecs.conf is too old and incompatible with this MPlayer release!"); goto err_out_print_linenum; } @@ -442,13 +442,13 @@ static int mp_property_chapter(m_option_t *prop, int action, void *arg, } if (chapter_name) set_osd_msg(OSD_MSG_TEXT, 1, opts->osd_duration, - _(MSGTR_OSDChapter), chapter + 1, chapter_name); + _("Chapter: (%d) %s"), chapter + 1, chapter_name); } else if (step_all > 0) mpctx->rel_seek_secs = 1000000000.; else set_osd_msg(OSD_MSG_TEXT, 1, opts->osd_duration, - _(MSGTR_OSDChapter), 0, _(MSGTR_Unknown)); + _("Chapter: (%d) %s"), 0, _("unknown")); if (chapter_name) talloc_free(chapter_name); return M_PROPERTY_OK; @@ -522,7 +522,7 @@ static int mp_property_angle(m_option_t *prop, int action, void *arg, } angle = demuxer_set_angle(mpctx->demuxer, angle); set_osd_msg(OSD_MSG_TEXT, 1, opts->osd_duration, - _(MSGTR_OSDAngle), angle, angles); + _("Angle: %d/%d"), angle, angles); if (angle_name) free(angle_name); return M_PROPERTY_OK; @@ -681,7 +681,7 @@ static int mp_property_mute(m_option_t *prop, int action, void *arg, if (!arg) return M_PROPERTY_ERROR; if (mpctx->edl_muted) { - *(char **) arg = strdup(_(MSGTR_EnabledEdl)); + *(char **) arg = strdup(_("enabled (EDL)")); return M_PROPERTY_OK; } default: @@ -856,9 +856,9 @@ static int mp_property_audio(m_option_t *prop, int action, void *arg, return M_PROPERTY_ERROR; if (opts->audio_id < 0) - *(char **) arg = strdup(_(MSGTR_Disabled)); + *(char **) arg = strdup(_("disabled")); else { - char lang[40] = _(MSGTR_Unknown); + char lang[40] = _("unknown"); sh_audio_t* sh = mpctx->sh_audio; if (sh && sh->lang) av_strlcpy(lang, sh->lang, 40); @@ -935,9 +935,9 @@ static int mp_property_video(m_option_t *prop, int action, void *arg, return M_PROPERTY_ERROR; if (opts->video_id < 0) - *(char **) arg = strdup(_(MSGTR_Disabled)); + *(char **) arg = strdup(_("disabled")); else { - char lang[40] = _(MSGTR_Unknown); + char lang[40] = _("unknown"); *(char **) arg = malloc(64); snprintf(*(char **) arg, 64, "(%d) %s", opts->video_id, lang); } @@ -1161,9 +1161,9 @@ static int mp_property_framedropping(m_option_t *prop, int action, case M_PROPERTY_PRINT: if (!arg) return M_PROPERTY_ERROR; - *(char **) arg = strdup(frame_dropping == 1 ? _(MSGTR_Enabled) : - (frame_dropping == 2 ? _(MSGTR_HardFrameDrop) : - _(MSGTR_Disabled))); + *(char **) arg = strdup(frame_dropping == 1 ? _("enabled") : + (frame_dropping == 2 ? _("hard") : + _("disabled"))); return M_PROPERTY_OK; default: return m_property_choice(prop, action, arg, &frame_dropping); @@ -1411,16 +1411,16 @@ static int mp_property_sub(m_option_t *prop, int action, void *arg, || mpctx->demuxer->type == DEMUXER_TYPE_OGG) && d_sub && d_sub->sh && opts->sub_id >= 0) { const char* lang = ((sh_sub_t*)d_sub->sh)->lang; - if (!lang) lang = _(MSGTR_Unknown); + if (!lang) lang = _("unknown"); snprintf(*(char **) arg, 63, "(%d) %s", opts->sub_id, lang); return M_PROPERTY_OK; } if (vo_vobsub && vobsub_id >= 0) { - const char *language = _(MSGTR_Unknown); + const char *language = _("unknown"); language = vobsub_get_id(vo_vobsub, (unsigned int) vobsub_id); snprintf(*(char **) arg, 63, "(%d) %s", - vobsub_id, language ? language : _(MSGTR_Unknown)); + vobsub_id, language ? language : _("unknown")); return M_PROPERTY_OK; } #ifdef CONFIG_DVDREAD @@ -1436,10 +1436,10 @@ static int mp_property_sub(m_option_t *prop, int action, void *arg, } #endif if (opts->sub_id >= 0) { - snprintf(*(char **) arg, 63, "(%d) %s", opts->sub_id, _(MSGTR_Unknown)); + snprintf(*(char **) arg, 63, "(%d) %s", opts->sub_id, _("unknown")); return M_PROPERTY_OK; } - snprintf(*(char **) arg, 63, _(MSGTR_Disabled)); + snprintf(*(char **) arg, 63, _("disabled")); return M_PROPERTY_OK; case M_PROPERTY_SET: @@ -1571,16 +1571,16 @@ static int mp_property_sub_source(m_option_t *prop, int action, void *arg, switch (sub_source(mpctx)) { case SUB_SOURCE_SUBS: - snprintf(*(char **) arg, 63, _(MSGTR_SubSourceFile)); + snprintf(*(char **) arg, 63, _("file")); break; case SUB_SOURCE_VOBSUB: - snprintf(*(char **) arg, 63, _(MSGTR_SubSourceVobsub)); + snprintf(*(char **) arg, 63, _("vobsub")); break; case SUB_SOURCE_DEMUX: - snprintf(*(char **) arg, 63, _(MSGTR_SubSourceDemux)); + snprintf(*(char **) arg, 63, _("embedded")); break; default: - snprintf(*(char **) arg, 63, _(MSGTR_Disabled)); + snprintf(*(char **) arg, 63, _("disabled")); } return M_PROPERTY_OK; case M_PROPERTY_SET: @@ -1668,7 +1668,7 @@ static int mp_property_sub_by_type(m_option_t *prop, int action, void *arg, return mp_property_sub(prop, M_PROPERTY_PRINT, arg, mpctx); *(char **) arg = malloc(64); (*(char **) arg)[63] = 0; - snprintf(*(char **) arg, 63, _(MSGTR_Disabled)); + snprintf(*(char **) arg, 63, _("disabled")); return M_PROPERTY_OK; case M_PROPERTY_SET: if (!arg) @@ -1740,7 +1740,7 @@ static int mp_property_sub_delay(m_option_t *prop, int action, void *arg, static int mp_property_sub_alignment(m_option_t *prop, int action, void *arg, MPContext *mpctx) { - char *name[] = { _(MSGTR_Top), _(MSGTR_Center), _(MSGTR_Bottom) }; + char *name[] = { _("top"), _("center"), _("bottom") }; if (!mpctx->sh_video || mpctx->global_sub_pos < 0 || sub_source(mpctx) != SUB_SOURCE_SUBS) @@ -2234,51 +2234,51 @@ static struct { const char *osd_msg; } set_prop_cmd[] = { // general - { "loop", MP_CMD_LOOP, 0, 0, -1, _(MSGTR_LoopStatus) }, + { "loop", MP_CMD_LOOP, 0, 0, -1, _("Loop: %s") }, { "chapter", MP_CMD_SEEK_CHAPTER, 0, -1, -1, NULL }, { "angle", MP_CMD_SWITCH_ANGLE, 0, 0, -1, NULL }, { "pause", MP_CMD_PAUSE, 0, 0, -1, NULL }, // audio - { "volume", MP_CMD_VOLUME, 0, OSD_VOLUME, -1, _(MSGTR_Volume) }, - { "mute", MP_CMD_MUTE, 1, 0, -1, _(MSGTR_MuteStatus) }, - { "audio_delay", MP_CMD_AUDIO_DELAY, 0, 0, -1, _(MSGTR_AVDelayStatus) }, - { "switch_audio", MP_CMD_SWITCH_AUDIO, 1, 0, -1, _(MSGTR_OSDAudio) }, - { "balance", MP_CMD_BALANCE, 0, OSD_BALANCE, -1, _(MSGTR_Balance) }, + { "volume", MP_CMD_VOLUME, 0, OSD_VOLUME, -1, _("Volume") }, + { "mute", MP_CMD_MUTE, 1, 0, -1, _("Mute: %s") }, + { "audio_delay", MP_CMD_AUDIO_DELAY, 0, 0, -1, _("A-V delay: %s") }, + { "switch_audio", MP_CMD_SWITCH_AUDIO, 1, 0, -1, _("Audio: %s") }, + { "balance", MP_CMD_BALANCE, 0, OSD_BALANCE, -1, _("Balance") }, // video { "fullscreen", MP_CMD_VO_FULLSCREEN, 1, 0, -1, NULL }, - { "panscan", MP_CMD_PANSCAN, 0, OSD_PANSCAN, -1, _(MSGTR_Panscan) }, - { "ontop", MP_CMD_VO_ONTOP, 1, 0, -1, _(MSGTR_OnTopStatus) }, - { "rootwin", MP_CMD_VO_ROOTWIN, 1, 0, -1, _(MSGTR_RootwinStatus) }, - { "border", MP_CMD_VO_BORDER, 1, 0, -1, _(MSGTR_BorderStatus) }, - { "framedropping", MP_CMD_FRAMEDROPPING, 1, 0, -1, _(MSGTR_FramedroppingStatus) }, - { "gamma", MP_CMD_GAMMA, 0, OSD_BRIGHTNESS, -1, _(MSGTR_Gamma) }, - { "brightness", MP_CMD_BRIGHTNESS, 0, OSD_BRIGHTNESS, -1, _(MSGTR_Brightness) }, - { "contrast", MP_CMD_CONTRAST, 0, OSD_CONTRAST, -1, _(MSGTR_Contrast) }, - { "saturation", MP_CMD_SATURATION, 0, OSD_SATURATION, -1, _(MSGTR_Saturation) }, - { "hue", MP_CMD_HUE, 0, OSD_HUE, -1, _(MSGTR_Hue) }, - { "vsync", MP_CMD_SWITCH_VSYNC, 1, 0, -1, _(MSGTR_VSyncStatus) }, + { "panscan", MP_CMD_PANSCAN, 0, OSD_PANSCAN, -1, _("Panscan") }, + { "ontop", MP_CMD_VO_ONTOP, 1, 0, -1, _("Stay on top: %s") }, + { "rootwin", MP_CMD_VO_ROOTWIN, 1, 0, -1, _("Rootwin: %s") }, + { "border", MP_CMD_VO_BORDER, 1, 0, -1, _("Border: %s") }, + { "framedropping", MP_CMD_FRAMEDROPPING, 1, 0, -1, _("Framedropping: %s") }, + { "gamma", MP_CMD_GAMMA, 0, OSD_BRIGHTNESS, -1, _("Gamma") }, + { "brightness", MP_CMD_BRIGHTNESS, 0, OSD_BRIGHTNESS, -1, _("Brightness") }, + { "contrast", MP_CMD_CONTRAST, 0, OSD_CONTRAST, -1, _("Contrast") }, + { "saturation", MP_CMD_SATURATION, 0, OSD_SATURATION, -1, _("Saturation") }, + { "hue", MP_CMD_HUE, 0, OSD_HUE, -1, _("Hue") }, + { "vsync", MP_CMD_SWITCH_VSYNC, 1, 0, -1, _("VSync: %s") }, // subs - { "sub", MP_CMD_SUB_SELECT, 1, 0, -1, _(MSGTR_SubSelectStatus) }, - { "sub_source", MP_CMD_SUB_SOURCE, 1, 0, -1, _(MSGTR_SubSourceStatus) }, - { "sub_vob", MP_CMD_SUB_VOB, 1, 0, -1, _(MSGTR_SubSelectStatus) }, - { "sub_demux", MP_CMD_SUB_DEMUX, 1, 0, -1, _(MSGTR_SubSelectStatus) }, - { "sub_file", MP_CMD_SUB_FILE, 1, 0, -1, _(MSGTR_SubSelectStatus) }, - { "sub_pos", MP_CMD_SUB_POS, 0, 0, -1, _(MSGTR_SubPosStatus) }, - { "sub_alignment", MP_CMD_SUB_ALIGNMENT, 1, 0, -1, _(MSGTR_SubAlignStatus) }, - { "sub_delay", MP_CMD_SUB_DELAY, 0, 0, OSD_MSG_SUB_DELAY, _(MSGTR_SubDelayStatus) }, - { "sub_visibility", MP_CMD_SUB_VISIBILITY, 1, 0, -1, _(MSGTR_SubVisibleStatus) }, - { "sub_forced_only", MP_CMD_SUB_FORCED_ONLY, 1, 0, -1, _(MSGTR_SubForcedOnlyStatus) }, + { "sub", MP_CMD_SUB_SELECT, 1, 0, -1, _("Subtitles: %s") }, + { "sub_source", MP_CMD_SUB_SOURCE, 1, 0, -1, _("Sub source: %s") }, + { "sub_vob", MP_CMD_SUB_VOB, 1, 0, -1, _("Subtitles: %s") }, + { "sub_demux", MP_CMD_SUB_DEMUX, 1, 0, -1, _("Subtitles: %s") }, + { "sub_file", MP_CMD_SUB_FILE, 1, 0, -1, _("Subtitles: %s") }, + { "sub_pos", MP_CMD_SUB_POS, 0, 0, -1, _("Sub position: %s/100") }, + { "sub_alignment", MP_CMD_SUB_ALIGNMENT, 1, 0, -1, _("Sub alignment: %s") }, + { "sub_delay", MP_CMD_SUB_DELAY, 0, 0, OSD_MSG_SUB_DELAY, _("Sub delay: %s") }, + { "sub_visibility", MP_CMD_SUB_VISIBILITY, 1, 0, -1, _("Subtitles: %s") }, + { "sub_forced_only", MP_CMD_SUB_FORCED_ONLY, 1, 0, -1, _("Forced sub only: %s") }, #ifdef CONFIG_FREETYPE - { "sub_scale", MP_CMD_SUB_SCALE, 0, 0, -1, _(MSGTR_SubScale)}, + { "sub_scale", MP_CMD_SUB_SCALE, 0, 0, -1, _("Sub Scale: %s")}, #endif #ifdef CONFIG_ASS { "ass_use_margins", MP_CMD_ASS_USE_MARGINS, 1, 0, -1, NULL }, #endif #ifdef CONFIG_TV - { "tv_brightness", MP_CMD_TV_SET_BRIGHTNESS, 0, OSD_BRIGHTNESS, -1, _(MSGTR_Brightness) }, - { "tv_hue", MP_CMD_TV_SET_HUE, 0, OSD_HUE, -1, _(MSGTR_Hue) }, - { "tv_saturation", MP_CMD_TV_SET_SATURATION, 0, OSD_SATURATION, -1, _(MSGTR_Saturation) }, - { "tv_contrast", MP_CMD_TV_SET_CONTRAST, 0, OSD_CONTRAST, -1, _(MSGTR_Contrast) }, + { "tv_brightness", MP_CMD_TV_SET_BRIGHTNESS, 0, OSD_BRIGHTNESS, -1, _("Brightness") }, + { "tv_hue", MP_CMD_TV_SET_HUE, 0, OSD_HUE, -1, _("Hue") }, + { "tv_saturation", MP_CMD_TV_SET_SATURATION, 0, OSD_SATURATION, -1, _("Saturation") }, + { "tv_contrast", MP_CMD_TV_SET_CONTRAST, 0, OSD_CONTRAST, -1, _("Contrast") }, #endif { NULL, 0, 0, 0, -1, NULL } }; @@ -2484,13 +2484,13 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) playing_audio_pts(mpctx); if (mpctx->begin_skip == MP_NOPTS_VALUE) { mpctx->begin_skip = v; - mp_tmsg(MSGT_CPLAYER, MSGL_INFO, MSGTR_EdloutStartSkip); + mp_tmsg(MSGT_CPLAYER, MSGL_INFO, "EDL skip start, press 'i' again to end block.\n"); } else { if (mpctx->begin_skip > v) - mp_tmsg(MSGT_CPLAYER, MSGL_WARN, MSGTR_EdloutBadStop); + mp_tmsg(MSGT_CPLAYER, MSGL_WARN, "EDL skip canceled, last start > stop\n"); else { fprintf(edl_fd, "%f %f %d\n", mpctx->begin_skip, v, 0); - mp_tmsg(MSGT_CPLAYER, MSGL_INFO, MSGTR_EdloutEndSkip); + mp_tmsg(MSGT_CPLAYER, MSGL_INFO, "EDL skip end, line written.\n"); } mpctx->begin_skip = MP_NOPTS_VALUE; } @@ -2511,7 +2511,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) float v = cmd->args[0].v.f; opts->playback_speed += v; build_afilter_chain(mpctx, sh_audio, &ao_data); - set_osd_msg(OSD_MSG_SPEED, 1, osd_duration, _(MSGTR_OSDSpeed), + set_osd_msg(OSD_MSG_SPEED, 1, osd_duration, _("Speed: x %6.2f"), opts->playback_speed); } break; @@ -2519,7 +2519,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) float v = cmd->args[0].v.f; opts->playback_speed *= v; build_afilter_chain(mpctx, sh_audio, &ao_data); - set_osd_msg(OSD_MSG_SPEED, 1, osd_duration, _(MSGTR_OSDSpeed), + set_osd_msg(OSD_MSG_SPEED, 1, osd_duration, _("Speed: x %6.2f"), opts->playback_speed); } break; @@ -2527,7 +2527,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) float v = cmd->args[0].v.f; opts->playback_speed = v; build_afilter_chain(mpctx, sh_audio, &ao_data); - set_osd_msg(OSD_MSG_SPEED, 1, osd_duration, _(MSGTR_OSDSpeed), + set_osd_msg(OSD_MSG_SPEED, 1, osd_duration, _("Speed: x %6.2f"), opts->playback_speed); } break; @@ -2614,7 +2614,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) sub_delay) * 1000 + .5, movement) / 1000.; #endif set_osd_msg(OSD_MSG_SUB_DELAY, 1, osd_duration, - _(MSGTR_OSDSubDelay), ROUND(sub_delay * 1000)); + _("Sub delay: %d ms"), ROUND(sub_delay * 1000)); } break; @@ -2636,9 +2636,9 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) argument is given to the OSD command, i.e. in slave mode. */ if (v == -1 && opts->osd_level <= 1) set_osd_msg(OSD_MSG_OSD_STATUS, 0, osd_duration, - _(MSGTR_OSDosd), - opts->osd_level ? _(MSGTR_OSDenabled) : - _(MSGTR_OSDdisabled)); + _("OSD: %s"), + opts->osd_level ? _("enabled") : + _("disabled")); else rm_osd_msg(OSD_MSG_OSD_STATUS); } @@ -2689,7 +2689,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) play_tree_t *e = parse_playlist_file(mpctx->mconfig, cmd->args[0].v.s); if (!e) mp_tmsg(MSGT_CPLAYER, MSGL_ERR, - MSGTR_PlaylistLoadUnable, cmd->args[0].v.s); + "\nUnable to load playlist %s.\n", cmd->args[0].v.s); else { if (cmd->args[1].v.i) // append play_tree_append_entry(mpctx->playtree->child, e); @@ -2728,7 +2728,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) RADIO_CHANNEL_LOWER); if (radio_get_channel_name(mpctx->demuxer->stream)) { set_osd_msg(OSD_MSG_RADIO_CHANNEL, 1, osd_duration, - _(MSGTR_OSDChannel), + _("Channel: %s"), radio_get_channel_name(mpctx->demuxer->stream)); } } @@ -2739,7 +2739,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) radio_set_channel(mpctx->demuxer->stream, cmd->args[0].v.s); if (radio_get_channel_name(mpctx->demuxer->stream)) { set_osd_msg(OSD_MSG_RADIO_CHANNEL, 1, osd_duration, - _(MSGTR_OSDChannel), + _("Channel: %s"), radio_get_channel_name(mpctx->demuxer->stream)); } } @@ -2809,7 +2809,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) } if (tv_channel_list) { set_osd_msg(OSD_MSG_TV_CHANNEL, 1, osd_duration, - _(MSGTR_OSDChannel), tv_channel_current->name); + _("Channel: %s"), tv_channel_current->name); //vo_osd_changed(OSDTYPE_SUBTITLE); } } @@ -2849,7 +2849,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) cmd->args[0].v.s); if (tv_channel_list) { set_osd_msg(OSD_MSG_TV_CHANNEL, 1, osd_duration, - _(MSGTR_OSDChannel), tv_channel_current->name); + _("Channel: %s"), tv_channel_current->name); //vo_osd_changed(OSDTYPE_SUBTITLE); } } @@ -2882,7 +2882,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) tv_last_channel((tvi_handle_t *) (mpctx->demuxer->priv)); if (tv_channel_list) { set_osd_msg(OSD_MSG_TV_CHANNEL, 1, osd_duration, - _(MSGTR_OSDChannel), tv_channel_current->name); + _("Channel: %s"), tv_channel_current->name); //vo_osd_changed(OSDTYPE_SUBTITLE); } } @@ -2944,7 +2944,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) for (v = 0; v < mpctx->set_of_sub_size; ++v) { subd = mpctx->set_of_subtitles[v]; mp_tmsg(MSGT_CPLAYER, MSGL_STATUS, - MSGTR_RemovedSubtitleFile, v + 1, + "SUB: Removed subtitle file (%d): %s\n", v + 1, filename_recode(subd->filename)); sub_free(subd); mpctx->set_of_subtitles[v] = NULL; @@ -2961,7 +2961,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) } else if (v < mpctx->set_of_sub_size) { subd = mpctx->set_of_subtitles[v]; mp_msg(MSGT_CPLAYER, MSGL_STATUS, - MSGTR_RemovedSubtitleFile, v + 1, + "SUB: Removed subtitle file (%d): %s\n", v + 1, filename_recode(subd->filename)); sub_free(subd); if (mpctx->set_of_sub_pos == v) { @@ -19,7 +19,7 @@ static edl_record_ptr edl_alloc_new(edl_record_ptr next_edl_record) { edl_record_ptr new_record = calloc(1, sizeof(struct edl_record)); if (!new_record) { - mp_tmsg(MSGT_CPLAYER, MSGL_FATAL, MSGTR_EdlOutOfMem); + mp_tmsg(MSGT_CPLAYER, MSGL_FATAL, "Can't allocate enough memory to hold EDL data.\n"); exit(1); } @@ -78,24 +78,26 @@ edl_record_ptr edl_parse_file(void) if ((sscanf(line, "%f %f %d", &start, &stop, &action)) != 3) { - mp_tmsg(MSGT_CPLAYER, MSGL_WARN, MSGTR_EdlBadlyFormattedLine, + mp_tmsg(MSGT_CPLAYER, MSGL_WARN, "Badly formatted EDL line [%d], discarding.\n", lineCount); continue; } if (next_edl_record && start <= next_edl_record->stop_sec) { - mp_tmsg(MSGT_CPLAYER, MSGL_WARN, MSGTR_EdlNOValidLine, line); - mp_tmsg(MSGT_CPLAYER, MSGL_WARN, MSGTR_EdlBadLineOverlap, + mp_tmsg(MSGT_CPLAYER, MSGL_WARN, "Invalid EDL line: %s\n", line); + mp_tmsg(MSGT_CPLAYER, MSGL_WARN, + "Last stop position was [%f]; next start is [%f].\n"\ + "Entries must be in chronological order, cannot overlap. Discarding.\n", next_edl_record->stop_sec, start); continue; } if (stop <= start) { - mp_tmsg(MSGT_CPLAYER, MSGL_WARN, MSGTR_EdlNOValidLine, + mp_tmsg(MSGT_CPLAYER, MSGL_WARN, "Invalid EDL line: %s\n", line); - mp_tmsg(MSGT_CPLAYER, MSGL_WARN, MSGTR_EdlBadLineBadStop); + mp_tmsg(MSGT_CPLAYER, MSGL_WARN, "Stop time has to be after start time.\n"); continue; } @@ -131,9 +133,9 @@ edl_record_ptr edl_parse_file(void) } if (edl_records) - mp_tmsg(MSGT_CPLAYER, MSGL_INFO, MSGTR_EdlRecordsNo, record_count); + mp_tmsg(MSGT_CPLAYER, MSGL_INFO, "Read %d EDL actions.\n", record_count); else - mp_tmsg(MSGT_CPLAYER, MSGL_INFO, MSGTR_EdlQueueEmpty); + mp_tmsg(MSGT_CPLAYER, MSGL_INFO, "There are no EDL actions to take care of.\n"); return edl_records; } diff --git a/input/appleir.c b/input/appleir.c index f0b848ceff..855c3d7397 100644 --- a/input/appleir.c +++ b/input/appleir.c @@ -79,12 +79,12 @@ int mp_input_appleir_init (char *dev) if (dev) { - mp_tmsg (MSGT_INPUT, MSGL_V, MSGTR_INPUT_APPLE_IR_Init, dev); + mp_tmsg (MSGT_INPUT, MSGL_V, "Initializing Apple IR on %s\n", dev); fd = open (dev, O_RDONLY | O_NONBLOCK); if (fd < 0) { mp_tmsg (MSGT_INPUT, MSGL_ERR, - MSGTR_INPUT_APPLE_IR_CantOpen, strerror (errno)); + "Can't open Apple IR device: %s\n", strerror (errno)); return -1; } @@ -108,14 +108,14 @@ int mp_input_appleir_init (char *dev) id.vendor == USB_VENDOR_APPLE && (id.product == USB_DEV_APPLE_IR ||id.product == USB_DEV_APPLE_IR_2)) { - mp_tmsg (MSGT_INPUT, MSGL_V, MSGTR_INPUT_APPLE_IR_Detect, file); + mp_tmsg (MSGT_INPUT, MSGL_V, "Detected Apple IR on %s\n", file); return fd; } close (fd); } mp_tmsg (MSGT_INPUT, MSGL_ERR, - MSGTR_INPUT_APPLE_IR_CantOpen, strerror (errno)); + "Can't open Apple IR device: %s\n", strerror (errno)); } return -1; diff --git a/input/input.c b/input/input.c index 9009293daf..cbd7e6a0db 100644 --- a/input/input.c +++ b/input/input.c @@ -650,7 +650,7 @@ int mp_input_add_cmd_fd(struct input_ctx *ictx, int fd, int select, mp_cmd_func_t read_func, mp_close_func_t close_func) { if (ictx->num_cmd_fd == MP_MAX_CMD_FD) { - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrCantRegister2ManyCmdFds,fd); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Too many command file descriptors, cannot register file descriptor %d.\n",fd); return 0; } if (select && fd < 0) { @@ -716,7 +716,7 @@ int mp_input_add_key_fd(struct input_ctx *ictx, int fd, int select, void *ctx) { if (ictx->num_key_fd == MP_MAX_KEY_FD) { - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrCantRegister2ManyKeyFds,fd); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Too many key file descriptors, cannot register file descriptor %d.\n",fd); return 0; } if (select && fd < 0) { @@ -829,7 +829,7 @@ mp_input_parse_cmd(char* str) { errno = 0; cmd->args[i].v.i = atoi(ptr); if(errno != 0) { - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrArgMustBeInt,cmd_def->name,i+1); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Command %s: argument %d isn't an integer.\n",cmd_def->name,i+1); ptr = NULL; } break; @@ -837,7 +837,7 @@ mp_input_parse_cmd(char* str) { errno = 0; cmd->args[i].v.f = atof(ptr); if(errno != 0) { - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrArgMustBeFloat,cmd_def->name,i+1); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Command %s: argument %d isn't a float.\n",cmd_def->name,i+1); ptr = NULL; } break; @@ -859,7 +859,7 @@ mp_input_parse_cmd(char* str) { } if(term != ' ' && (!e || e[0] == '\0')) { - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrUnterminatedArg,cmd_def->name,i+1); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Command %s: argument %d is unterminated.\n",cmd_def->name,i+1); ptr = NULL; break; } else if(!e) e = ptr+strlen(ptr); @@ -877,14 +877,14 @@ mp_input_parse_cmd(char* str) { ptr = NULL; break; default : - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrUnknownArg,i); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Unknown argument %d\n",i); } } cmd->nargs = i; if(cmd_def->nargs > cmd->nargs) { /* mp_msg(MSGT_INPUT,MSGL_ERR,"Got command '%s' but\n",str); */ - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_Err2FewArgs,cmd_def->name,cmd_def->nargs,cmd->nargs); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Command %s requires at least %d arguments, we found only %d so far.\n",cmd_def->name,cmd_def->nargs,cmd->nargs); mp_cmd_free(cmd); return NULL; } @@ -924,7 +924,7 @@ static int read_cmd(mp_input_fd_t* mp_fd, char** ret) switch(r) { case MP_INPUT_ERROR: case MP_INPUT_DEAD: - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrReadingCmdFd,mp_fd->fd,strerror(errno)); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Error while reading command file descriptor %d: %s\n",mp_fd->fd,strerror(errno)); case MP_INPUT_NOTHING: return r; case MP_INPUT_RETRY: @@ -950,7 +950,7 @@ static int read_cmd(mp_input_fd_t* mp_fd, char** ret) if(!end) { // If buffer is full we must drop all until the next \n if(mp_fd->size - mp_fd->pos <= 1) { - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrCmdBufferFullDroppingContent,mp_fd->fd); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Command buffer of file descriptor %d is full: dropping content.\n",mp_fd->fd); mp_fd->pos = 0; mp_fd->drop = 1; } @@ -1067,7 +1067,7 @@ static mp_cmd_t *get_cmd_from_keys(struct input_ctx *ictx, int n, int *keys, cmd = find_bind_for_key(def_cmd_binds,n,keys); if(cmd == NULL) { - mp_tmsg(MSGT_INPUT,MSGL_WARN,MSGTR_NoBindFound, get_key_name(keys[0], + mp_tmsg(MSGT_INPUT,MSGL_WARN,"No bind found for key '%s'.", get_key_name(keys[0], key_buf)); if(n > 1) { int s; @@ -1080,7 +1080,7 @@ static mp_cmd_t *get_cmd_from_keys(struct input_ctx *ictx, int n, int *keys, if (strcmp(cmd, "ignore") == 0) return NULL; ret = mp_input_parse_cmd(cmd); if(!ret) { - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrInvalidCommandForKey, + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Invalid command for bound key %s", get_key_name(ictx->key_down[0], key_buf)); if (ictx->num_key_down > 1) { unsigned int s; @@ -1109,7 +1109,7 @@ static mp_cmd_t* interpret_key(struct input_ctx *ictx, int code, int paused) if(code & MP_KEY_DOWN) { if (ictx->num_key_down > MP_MAX_KEY_DOWN) { - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_Err2ManyKeyDowns); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Too many key down events at the same time\n"); return NULL; } code &= ~MP_KEY_DOWN; @@ -1135,7 +1135,7 @@ static mp_cmd_t* interpret_key(struct input_ctx *ictx, int code, int paused) } if (j == ictx->num_key_down) { // key was not in the down keys : add it if (ictx->num_key_down > MP_MAX_KEY_DOWN) { - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_Err2ManyKeyDowns); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Too many key down events at the same time\n"); return NULL; } ictx->key_down[ictx->num_key_down] = code; @@ -1239,7 +1239,7 @@ static mp_cmd_t *read_events(struct input_ctx *ictx, int time, int paused) time_val = NULL; if (select(max_fd + 1, &fds, NULL, NULL, time_val) < 0) { if (errno != EINTR) - mp_tmsg(MSGT_INPUT, MSGL_ERR, MSGTR_INPUT_INPUT_ErrSelect, + mp_tmsg(MSGT_INPUT, MSGL_ERR, "Select error: %s\n", strerror(errno)); FD_ZERO(&fds); } @@ -1264,10 +1264,10 @@ static mp_cmd_t *read_events(struct input_ctx *ictx, int time, int paused) return ret; } else if (code == MP_INPUT_ERROR) - mp_tmsg(MSGT_INPUT, MSGL_ERR, MSGTR_INPUT_INPUT_ErrOnKeyInFd, + mp_tmsg(MSGT_INPUT, MSGL_ERR, "Error on key input file descriptor %d\n", key_fds[i].fd); else if (code == MP_INPUT_DEAD) { - mp_tmsg(MSGT_INPUT, MSGL_ERR, MSGTR_INPUT_INPUT_ErrDeadKeyOnFd, + mp_tmsg(MSGT_INPUT, MSGL_ERR, "Dead key input on file descriptor %d\n", key_fds[i].fd); key_fds[i].dead = 1; } @@ -1291,7 +1291,7 @@ static mp_cmd_t *read_events(struct input_ctx *ictx, int time, int paused) return ret; } else if (r == MP_INPUT_ERROR) - mp_tmsg(MSGT_INPUT, MSGL_ERR, MSGTR_INPUT_INPUT_ErrOnCmdFd, + mp_tmsg(MSGT_INPUT, MSGL_ERR, "Error on command file descriptor %d\n", cmd_fds[i].fd); else if (r == MP_INPUT_DEAD) cmd_fds[i].dead = 1; @@ -1538,7 +1538,7 @@ static int parse_config(struct input_ctx *ictx, char *file) if(r < 0) { if(errno == EINTR) continue; - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrReadingInputConfig,file,strerror(errno)); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Error while reading input config file %s: %s\n",file,strerror(errno)); close(fd); return 0; } else if(r == 0) { @@ -1591,9 +1591,9 @@ static int parse_config(struct input_ctx *ictx, char *file) if(end[0] == '\0') { // Key name doesn't fit in the buffer if(buffer == iter) { if(eof && (buffer-iter) == bs) - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrUnfinishedBinding,iter); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Unfinished binding %s\n",iter); else - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrBuffer2SmallForKeyName,iter); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Buffer is too small for this key name: %s\n",iter); return 0; } memmove(buffer,iter,end-iter); @@ -1605,7 +1605,7 @@ static int parse_config(struct input_ctx *ictx, char *file) strncpy(name,iter,end-iter); name[end-iter] = '\0'; if (!get_input_from_name(name,keys)) { - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrUnknownKey,name); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Unknown key '%s'\n",name); close(fd); return 0; } @@ -1620,7 +1620,7 @@ static int parse_config(struct input_ctx *ictx, char *file) if(iter[0] == '\n' || iter[0] == '\r') { int i; char key_buf[12]; - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrNoCmdForKey, get_key_name(keys[0], key_buf)); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"No command found for key %s", get_key_name(keys[0], key_buf)); for(i = 1; keys[i] != 0 ; i++) mp_msg(MSGT_INPUT,MSGL_ERR,"-%s", get_key_name(keys[i], key_buf)); mp_msg(MSGT_INPUT,MSGL_ERR,"\n"); @@ -1635,7 +1635,7 @@ static int parse_config(struct input_ctx *ictx, char *file) /* NOTHING */; if(end[0] == '\0' && ! (eof && ((end+1) - buffer) == bs)) { if(iter == buffer) { - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrBuffer2SmallForCmd,buffer); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Buffer is too small for command %s\n",buffer); close(fd); return 0; } @@ -1660,7 +1660,7 @@ static int parse_config(struct input_ctx *ictx, char *file) continue; } } - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrWhyHere); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"What are we doing here?\n"); close(fd); mp_input_set_section(ictx, NULL); return 0; @@ -1736,7 +1736,7 @@ struct input_ctx *mp_input_init(struct input_conf *input_conf, int use_gui) if (input_conf->use_joystick) { int fd = mp_input_joystick_init(input_conf->js_dev); if(fd < 0) - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrCantInitJoystick); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Can't init input joystick\n"); else mp_input_add_key_fd(ictx, fd, 1, mp_input_joystick_read, (mp_close_func_t)close,NULL); @@ -1763,7 +1763,7 @@ struct input_ctx *mp_input_init(struct input_conf *input_conf, int use_gui) #ifdef CONFIG_APPLE_REMOTE if (input_conf->use_ar) { if(mp_input_ar_init() < 0) - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrCantInitAppleRemote); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Can't init Apple Remote.\n"); else mp_input_add_key_fd(ictx, -1, 0, mp_input_ar_read, mp_input_ar_close, NULL); @@ -1774,7 +1774,7 @@ struct input_ctx *mp_input_init(struct input_conf *input_conf, int use_gui) if (input_conf->use_ar) { int fd = mp_input_appleir_init(input_conf->ar_dev); if(fd < 0) - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrCantInitAppleRemote); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Can't init Apple Remote.\n"); else mp_input_add_key_fd(ictx, fd, 1, mp_input_appleir_read, (mp_close_func_t)close, NULL); @@ -1784,7 +1784,7 @@ struct input_ctx *mp_input_init(struct input_conf *input_conf, int use_gui) if (input_conf->in_file) { struct stat st; if (stat(input_conf->in_file, &st)) - mp_tmsg(MSGT_INPUT, MSGL_ERR, MSGTR_INPUT_INPUT_ErrCantStatFile, input_conf->in_file, strerror(errno)); + mp_tmsg(MSGT_INPUT, MSGL_ERR, "Can't stat %s: %s\n", input_conf->in_file, strerror(errno)); else { int in_file_fd = open(input_conf->in_file, S_ISFIFO(st.st_mode) ? O_RDWR : O_RDONLY); @@ -1792,7 +1792,7 @@ struct input_ctx *mp_input_init(struct input_conf *input_conf, int use_gui) mp_input_add_cmd_fd(ictx, in_file_fd, 1, NULL, (mp_close_func_t)close); else - mp_tmsg(MSGT_INPUT, MSGL_ERR, MSGTR_INPUT_INPUT_ErrCantOpenFile, + mp_tmsg(MSGT_INPUT, MSGL_ERR, "Can't open %s: %s\n", input_conf->in_file, strerror(errno)); } } diff --git a/input/joystick.c b/input/joystick.c index c2a1e91de1..b6e5e43784 100644 --- a/input/joystick.c +++ b/input/joystick.c @@ -51,11 +51,11 @@ int mp_input_joystick_init(char* dev) { int initialized = 0; struct js_event ev; - mp_tmsg(MSGT_INPUT,MSGL_V,MSGTR_INPUT_JOYSTICK_Opening,dev ? dev : JS_DEV); + mp_tmsg(MSGT_INPUT,MSGL_V,"Opening joystick device %s\n",dev ? dev : JS_DEV); fd = open( dev ? dev : JS_DEV , O_RDONLY | O_NONBLOCK ); if(fd < 0) { - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_JOYSTICK_CantOpen,dev ? dev : JS_DEV,strerror(errno)); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Can't open joystick device %s: %s\n",dev ? dev : JS_DEV,strerror(errno)); return -1; } @@ -70,7 +70,7 @@ int mp_input_joystick_init(char* dev) { initialized = 1; break; } - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_JOYSTICK_ErrReading,strerror(errno)); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Error while reading joystick device: %s\n",strerror(errno)); close(fd); return -1; } @@ -78,7 +78,7 @@ int mp_input_joystick_init(char* dev) { } if((unsigned int)l < sizeof(struct js_event)) { if(l > 0) - mp_tmsg(MSGT_INPUT,MSGL_WARN,MSGTR_INPUT_JOYSTICK_LoosingBytes,l); + mp_tmsg(MSGT_INPUT,MSGL_WARN,"Joystick: We lose %d bytes of data\n",l); break; } if(ev.type == JS_EVENT_BUTTON) @@ -102,9 +102,9 @@ int mp_input_joystick_read(void *ctx, int fd) { else if(errno == EAGAIN) return MP_INPUT_NOTHING; if( r < 0) - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_JOYSTICK_ErrReading,strerror(errno)); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Error while reading joystick device: %s\n",strerror(errno)); else - mp_tmsg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_JOYSTICK_ErrReading,"EOF"); + mp_tmsg(MSGT_INPUT,MSGL_ERR,"Error while reading joystick device: %s\n","EOF"); return MP_INPUT_DEAD; } l += r; @@ -112,12 +112,12 @@ int mp_input_joystick_read(void *ctx, int fd) { if((unsigned int)l < sizeof(struct js_event)) { if(l > 0) - mp_tmsg(MSGT_INPUT,MSGL_WARN,MSGTR_INPUT_JOYSTICK_LoosingBytes,l); + mp_tmsg(MSGT_INPUT,MSGL_WARN,"Joystick: We lose %d bytes of data\n",l); return MP_INPUT_NOTHING; } if(ev.type & JS_EVENT_INIT) { - mp_tmsg(MSGT_INPUT,MSGL_WARN,MSGTR_INPUT_JOYSTICK_WarnLostSync); + mp_tmsg(MSGT_INPUT,MSGL_WARN,"Joystick: warning init event, we have lost sync with driver.\n"); ev.type &= ~JS_EVENT_INIT; if(ev.type == JS_EVENT_BUTTON) { int s = (btns >> ev.number) & 1; @@ -154,7 +154,7 @@ int mp_input_joystick_read(void *ctx, int fd) { } else return MP_INPUT_NOTHING; } else { - mp_tmsg(MSGT_INPUT,MSGL_WARN,MSGTR_INPUT_JOYSTICK_WarnUnknownEvent,ev.type); + mp_tmsg(MSGT_INPUT,MSGL_WARN,"Joystick warning unknown event type %d\n",ev.type); return MP_INPUT_ERROR; } diff --git a/input/lirc.c b/input/lirc.c index 3af77d536f..acc8f73dcb 100644 --- a/input/lirc.c +++ b/input/lirc.c @@ -40,9 +40,9 @@ mp_input_lirc_init(void) { int lirc_sock; int mode; - mp_tmsg(MSGT_LIRC,MSGL_V,MSGTR_SettingUpLIRC); + mp_tmsg(MSGT_LIRC,MSGL_V,"Setting up LIRC support...\n"); if((lirc_sock=lirc_init("mplayer",1))==-1){ - mp_tmsg(MSGT_LIRC,MSGL_ERR,MSGTR_LIRCopenfailed); + mp_tmsg(MSGT_LIRC,MSGL_ERR,"Failed to open LIRC support. You will not be able to use your remote control.\n"); return -1; } @@ -55,7 +55,7 @@ mp_input_lirc_init(void) { } if(lirc_readconfig( lirc_configfile,&lirc_config,NULL )!=0 ){ - mp_tmsg(MSGT_LIRC,MSGL_ERR,MSGTR_LIRCcfgerr, + mp_tmsg(MSGT_LIRC,MSGL_ERR,"Failed to read LIRC config file %s.\n", lirc_configfile == NULL ? "~/.lircrc" : lirc_configfile); lirc_deinit(); return -1; diff --git a/libaf/af_ladspa.c b/libaf/af_ladspa.c index 5d43784c21..547dd6816e 100644 --- a/libaf/af_ladspa.c +++ b/libaf/af_ladspa.c @@ -213,7 +213,7 @@ static int af_ladspa_parse_plugin(af_ladspa_t *setup) { if (setup->ninputs == 0) { mp_msg(MSGT_AFILTER, MSGL_WARN, "%s: %s\n", setup->myname, - _(MSGTR_AF_LADSPA_WarnNoInputs)); + _("WARNING! This LADSPA plugin has no audio inputs.\n The incoming audio signal will be lost.")); } else if (setup->ninputs == 1) { mp_msg(MSGT_AFILTER, MSGL_V, "%s: this is a mono effect\n", setup->myname); } else if (setup->ninputs == 2) { @@ -225,13 +225,13 @@ static int af_ladspa_parse_plugin(af_ladspa_t *setup) { if (setup->noutputs == 0) { mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname, - _(MSGTR_AF_LADSPA_ErrNoOutputs)); + _("This LADSPA plugin has no audio outputs.")); return AF_ERROR; } if (setup->noutputs != setup->ninputs ) { mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname, - _(MSGTR_AF_LADSPA_ErrInOutDiff)); + _("The number of audio inputs and audio outputs of the LADSPA plugin differ.")); return AF_ERROR; } @@ -391,7 +391,7 @@ static int af_ladspa_load_plugin(af_ladspa_t *setup) { if (!setup->libhandle) { mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s %s\n\t%s\n", setup->myname, - _(MSGTR_AF_LADSPA_ErrFailedToLoad), setup->file, dlerror() ); + _("failed to load"), setup->file, dlerror() ); return AF_ERROR; } @@ -404,7 +404,7 @@ static int af_ladspa_load_plugin(af_ladspa_t *setup) { if (!descriptor_function) { mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n\t%s\n", setup->myname, - _(MSGTR_AF_LADSPA_ErrNoDescriptor), dlerror()); + _("Couldn't find ladspa_descriptor() function in the specified library file."), dlerror()); return AF_ERROR; } @@ -412,7 +412,7 @@ static int af_ladspa_load_plugin(af_ladspa_t *setup) { if (strcmp(setup->label, "help") == 0) { mp_msg(MSGT_AFILTER, MSGL_INFO, "%s: %s %s:\n", setup->myname, - _(MSGTR_AF_LADSPA_AvailableLabels), setup->file); + _("available labels in"), setup->file); for (i=0; ; i++) { ladspa_descriptor = descriptor_function(i); if (ladspa_descriptor == NULL) { @@ -432,7 +432,7 @@ static int af_ladspa_load_plugin(af_ladspa_t *setup) { ladspa_descriptor = descriptor_function(i); if (ladspa_descriptor == NULL) { mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname, - _(MSGTR_AF_LADSPA_ErrLabelNotFound)); + _("Couldn't find label in plugin library.")); return AF_ERROR; } if (strcmp(ladspa_descriptor->Label, setup->label) == 0) { @@ -458,7 +458,7 @@ static int af_ladspa_load_plugin(af_ladspa_t *setup) { */ static int af_ladspa_malloc_failed(char *myname) { - mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s", myname, MSGTR_MemAllocFailed); + mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s", myname, "Memory allocation failed.\n"); return AF_ERROR; } @@ -520,7 +520,7 @@ static int control(struct af_instance_s *af, int cmd, void *arg) { if (!arg) { mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname, - _(MSGTR_AF_LADSPA_ErrNoSuboptions)); + _("No suboptions specified.")); return AF_ERROR; } @@ -532,7 +532,7 @@ static int control(struct af_instance_s *af, int cmd, void *arg) { sscanf(arg, "%[^:]", buf); if (buf[0] == '\0') { mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname, - _(MSGTR_AF_LADSPA_ErrNoLibFile)); + _("No library file specified.")); free(buf); return AF_ERROR; } @@ -548,7 +548,7 @@ static int control(struct af_instance_s *af, int cmd, void *arg) { sscanf(arg, "%[^:]", buf); if (buf[0] == '\0') { mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname, - _(MSGTR_AF_LADSPA_ErrNoLabel)); + _("No filter label specified.")); free(buf); return AF_ERROR; } @@ -584,14 +584,14 @@ static int control(struct af_instance_s *af, int cmd, void *arg) { for(i=0; i<setup->ninputcontrols; i++) { if (!arg || (*(char*)arg != ':') ) { mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname, - _(MSGTR_AF_LADSPA_ErrNotEnoughControls)); + _("Not enough controls specified on the command line.")); return AF_ERROR; } arg++; r = sscanf(arg, "%f", &val); if (r!=1) { mp_msg(MSGT_AFILTER, MSGL_ERR, "%s: %s\n", setup->myname, - _(MSGTR_AF_LADSPA_ErrNotEnoughControls)); + _("Not enough controls specified on the command line.")); return AF_ERROR; } setup->inputcontrols[setup->inputcontrolsmap[i]] = val; @@ -617,13 +617,13 @@ static int control(struct af_instance_s *af, int cmd, void *arg) { if (LADSPA_IS_HINT_BOUNDED_BELOW(hint.HintDescriptor) && val < hint.LowerBound) { - mp_tmsg(MSGT_AFILTER, MSGL_ERR, MSGTR_AF_LADSPA_ErrControlBelow, + mp_tmsg(MSGT_AFILTER, MSGL_ERR, "%s: Input control #%d is below lower boundary of %0.4f.\n", setup->myname, i, hint.LowerBound); return AF_ERROR; } if (LADSPA_IS_HINT_BOUNDED_ABOVE(hint.HintDescriptor) && val > hint.UpperBound) { - mp_tmsg(MSGT_AFILTER, MSGL_ERR, MSGTR_AF_LADSPA_ErrControlAbove, + mp_tmsg(MSGT_AFILTER, MSGL_ERR, "%s: Input control #%d is above upper boundary of %0.4f.\n", setup->myname, i, hint.UpperBound); return AF_ERROR; } diff --git a/libaf/af_lavcac3enc.c b/libaf/af_lavcac3enc.c index dde841c9a1..761debec01 100644 --- a/libaf/af_lavcac3enc.c +++ b/libaf/af_lavcac3enc.c @@ -98,7 +98,7 @@ static int control(struct af_instance_s *af, int cmd, void *arg) s->lavc_actx->bit_rate = bit_rate; if(avcodec_open(s->lavc_actx, s->lavc_acodec) < 0) { - mp_tmsg(MSGT_AFILTER, MSGL_ERR, MSGTR_CouldntOpenCodec, "ac3", bit_rate); + mp_tmsg(MSGT_AFILTER, MSGL_ERR, "Couldn't open codec %s, br=%d.\n", "ac3", bit_rate); return AF_ERROR; } } @@ -295,13 +295,13 @@ static int af_open(af_instance_t* af){ s->lavc_acodec = avcodec_find_encoder_by_name("ac3"); if (!s->lavc_acodec) { - mp_tmsg(MSGT_AFILTER, MSGL_ERR, MSGTR_LavcAudioCodecNotFound, "ac3"); + mp_tmsg(MSGT_AFILTER, MSGL_ERR, "Audio LAVC, couldn't find encoder for codec %s.\n", "ac3"); return AF_ERROR; } s->lavc_actx = avcodec_alloc_context(); if (!s->lavc_actx) { - mp_tmsg(MSGT_AFILTER, MSGL_ERR, MSGTR_CouldntAllocateLavcContext); + mp_tmsg(MSGT_AFILTER, MSGL_ERR, "Audio LAVC, couldn't allocate context!\n"); return AF_ERROR; } diff --git a/libaf/af_scaletempo.c b/libaf/af_scaletempo.c index 2d420784c6..a7926712cb 100644 --- a/libaf/af_scaletempo.c +++ b/libaf/af_scaletempo.c @@ -471,25 +471,25 @@ static int control(struct af_instance_s* af, int cmd, void* arg) } if (s->scale_nominal <= 0) { mp_tmsg(MSGT_AFILTER, MSGL_ERR, "[scaletempo] " - _(MSGTR_ErrorParsingCommandLine) ": " _(MSGTR_AF_ValueOutOfRange) + _("error parsing command line") ": " _("value out of range") ": scale > 0\n"); return AF_ERROR; } if (s->ms_stride <= 0) { mp_tmsg(MSGT_AFILTER, MSGL_ERR, "[scaletempo] " - _(MSGTR_ErrorParsingCommandLine) ": " _(MSGTR_AF_ValueOutOfRange) + _("error parsing command line") ": " _("value out of range") ": stride > 0\n"); return AF_ERROR; } if (s->percent_overlap < 0 || s->percent_overlap > 1) { mp_tmsg(MSGT_AFILTER, MSGL_ERR, "[scaletempo] " - _(MSGTR_ErrorParsingCommandLine) ": " _(MSGTR_AF_ValueOutOfRange) + _("error parsing command line") ": " _("value out of range") ": 0 <= overlap <= 1\n"); return AF_ERROR; } if (s->ms_search < 0) { mp_tmsg(MSGT_AFILTER, MSGL_ERR, "[scaletempo] " - _(MSGTR_ErrorParsingCommandLine) ": " _(MSGTR_AF_ValueOutOfRange) + _("error parsing command line") ": " _("value out of range") ": search >= 0\n"); return AF_ERROR; } @@ -508,7 +508,7 @@ static int control(struct af_instance_s* af, int cmd, void* arg) s->speed_pitch = 1; } else { mp_tmsg(MSGT_AFILTER, MSGL_ERR, "[scaletempo] " - _(MSGTR_ErrorParsingCommandLine) ": " _(MSGTR_AF_ValueOutOfRange) + _("error parsing command line") ": " _("value out of range") ": speed=[pitch|tempo|none|both]\n"); return AF_ERROR; } diff --git a/libaf/format.c b/libaf/format.c index 4f53f10159..7dc677f5af 100644 --- a/libaf/format.c +++ b/libaf/format.c @@ -123,7 +123,7 @@ char* af_fmt2str(int format, char* str, int size) case(AF_FORMAT_IMA_ADPCM): i+=snprintf(&str[i],size-i,"IMA-ADPCM "); break; default: - i+=snprintf(&str[i],size-i,mp_gtext(MSGTR_AF_FORMAT_UnknownFormat)); + i+=snprintf(&str[i],size-i,mp_gtext("unknown format ")); } } else{ diff --git a/libao2/ao_alsa.c b/libao2/ao_alsa.c index cc92754051..c95aed4cf7 100644 --- a/libao2/ao_alsa.c +++ b/libao2/ao_alsa.c @@ -148,7 +148,7 @@ static int control(int cmd, void *arg) if (*test_mix_index){ mp_tmsg(MSGT_AO,MSGL_ERR, - MSGTR_AO_ALSA_InvalidMixerIndexDefaultingToZero); + "[AO_ALSA] Invalid mixer index. Defaulting to 0.\n"); mix_index = 0 ; } } @@ -168,32 +168,32 @@ static int control(int cmd, void *arg) } if ((err = snd_mixer_open(&handle, 0)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_MixerOpenError, snd_strerror(err)); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Mixer open error: %s\n", snd_strerror(err)); return CONTROL_ERROR; } if ((err = snd_mixer_attach(handle, card)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_MixerAttachError, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Mixer attach %s error: %s\n", card, snd_strerror(err)); snd_mixer_close(handle); return CONTROL_ERROR; } if ((err = snd_mixer_selem_register(handle, NULL, NULL)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_MixerRegisterError, snd_strerror(err)); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Mixer register error: %s\n", snd_strerror(err)); snd_mixer_close(handle); return CONTROL_ERROR; } err = snd_mixer_load(handle); if (err < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_MixerLoadError, snd_strerror(err)); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Mixer load error: %s\n", snd_strerror(err)); snd_mixer_close(handle); return CONTROL_ERROR; } elem = snd_mixer_find_selem(handle, sid); if (!elem) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToFindSimpleControl, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Unable to find simple control '%s',%i.\n", snd_mixer_selem_id_get_name(sid), snd_mixer_selem_id_get_index(sid)); snd_mixer_close(handle); return CONTROL_ERROR; @@ -208,7 +208,7 @@ static int control(int cmd, void *arg) //setting channels if ((err = snd_mixer_selem_set_playback_volume(elem, SND_MIXER_SCHN_FRONT_LEFT, set_vol)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_ErrorSettingLeftChannel, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Error setting left channel, %s\n", snd_strerror(err)); return CONTROL_ERROR; } @@ -217,7 +217,7 @@ static int control(int cmd, void *arg) set_vol = vol->right / f_multi + pmin + 0.5; if ((err = snd_mixer_selem_set_playback_volume(elem, SND_MIXER_SCHN_FRONT_RIGHT, set_vol)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_ErrorSettingRightChannel, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Error setting right channel, %s\n", snd_strerror(err)); return CONTROL_ERROR; } @@ -265,7 +265,14 @@ static void parse_device (char *dest, const char *src, int len) static void print_help (void) { mp_tmsg (MSGT_AO, MSGL_FATAL, - MSGTR_AO_ALSA_CommandlineHelp); + "\n[AO_ALSA] -ao alsa commandline help:\n"\ + "[AO_ALSA] Example: mplayer -ao alsa:device=hw=0.3\n"\ + "[AO_ALSA] Sets first card fourth hardware device.\n\n"\ + "[AO_ALSA] Options:\n"\ + "[AO_ALSA] noblock\n"\ + "[AO_ALSA] Opens device in non-blocking mode.\n"\ + "[AO_ALSA] device=<device-name>\n"\ + "[AO_ALSA] Sets device (change , to . and : to =)\n"); } static int str_maxlen(strarg_t *str) { @@ -453,7 +460,7 @@ static int init(int rate_hz, int channels, int format, int flags) break; default: device.str = "default"; - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_ChannelsNotSupported,channels); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] %d channels are not supported.\n",channels); } device.len = strlen(device.str); if (subopt_parse(ao_subdevice, subopts) != 0) { @@ -513,19 +520,19 @@ static int init(int rate_hz, int channels, int format, int flags) if ((err = try_open_device(alsa_device, open_mode, format == AF_FORMAT_AC3)) < 0) { if (err != -EBUSY && ao_noblock) { - mp_tmsg(MSGT_AO,MSGL_INFO,MSGTR_AO_ALSA_OpenInNonblockModeFailed); + mp_tmsg(MSGT_AO,MSGL_INFO,"[AO_ALSA] Open in nonblock-mode failed, trying to open in block-mode.\n"); if ((err = try_open_device(alsa_device, 0, format == AF_FORMAT_AC3)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PlaybackOpenError, snd_strerror(err)); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Playback open error: %s\n", snd_strerror(err)); return 0; } } else { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PlaybackOpenError, snd_strerror(err)); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Playback open error: %s\n", snd_strerror(err)); return 0; } } if ((err = snd_pcm_nonblock(alsa_handler, 0)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_ErrorSetBlockMode, snd_strerror(err)); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AL_ALSA] Error setting block-mode %s.\n", snd_strerror(err)); } else { mp_msg(MSGT_AO,MSGL_V,"alsa-init: pcm opened in blocking mode\n"); } @@ -536,7 +543,7 @@ static int init(int rate_hz, int channels, int format, int flags) // setting hw-parameters if ((err = snd_pcm_hw_params_any(alsa_handler, alsa_hwparams)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToGetInitialParameters, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Unable to get initial parameters: %s\n", snd_strerror(err)); return 0; } @@ -544,7 +551,7 @@ static int init(int rate_hz, int channels, int format, int flags) err = snd_pcm_hw_params_set_access(alsa_handler, alsa_hwparams, SND_PCM_ACCESS_RW_INTERLEAVED); if (err < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetAccessType, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Unable to set access type: %s\n", snd_strerror(err)); return 0; } @@ -555,7 +562,7 @@ static int init(int rate_hz, int channels, int format, int flags) alsa_format)) < 0) { mp_tmsg(MSGT_AO,MSGL_INFO, - MSGTR_AO_ALSA_FormatNotSupportedByHardware, af_fmt2str_short(format)); + "[AO_ALSA] Format %s is not supported by hardware, trying default.\n", af_fmt2str_short(format)); alsa_format = SND_PCM_FORMAT_S16_LE; ao_data.format = AF_FORMAT_S16_LE; } @@ -563,7 +570,7 @@ static int init(int rate_hz, int channels, int format, int flags) if ((err = snd_pcm_hw_params_set_format(alsa_handler, alsa_hwparams, alsa_format)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetFormat, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Unable to set format: %s\n", snd_strerror(err)); return 0; } @@ -571,7 +578,7 @@ static int init(int rate_hz, int channels, int format, int flags) if ((err = snd_pcm_hw_params_set_channels_near(alsa_handler, alsa_hwparams, &ao_data.channels)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetChannels, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Unable to set channels: %s\n", snd_strerror(err)); return 0; } @@ -582,7 +589,7 @@ static int init(int rate_hz, int channels, int format, int flags) if ((err = snd_pcm_hw_params_set_rate_resample(alsa_handler, alsa_hwparams, 0)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToDisableResampling, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Unable to disable resampling: %s\n", snd_strerror(err)); return 0; } @@ -591,7 +598,7 @@ static int init(int rate_hz, int channels, int format, int flags) if ((err = snd_pcm_hw_params_set_rate_near(alsa_handler, alsa_hwparams, &ao_data.samplerate, NULL)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetSamplerate2, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Unable to set samplerate-2: %s\n", snd_strerror(err)); return 0; } @@ -608,7 +615,7 @@ static int init(int rate_hz, int channels, int format, int flags) if ((err = snd_pcm_hw_params_set_buffer_time_near(alsa_handler, alsa_hwparams, &alsa_buffer_time, NULL)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetBufferTimeNear, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Unable to set buffer time near: %s\n", snd_strerror(err)); return 0; } else @@ -618,11 +625,11 @@ static int init(int rate_hz, int channels, int format, int flags) &alsa_period_time, NULL)) < 0) /* original: alsa_buffer_time/ao_data.bps */ { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetPeriodTime, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Unable to set period time: %s\n", snd_strerror(err)); return 0; } - mp_tmsg(MSGT_AO,MSGL_INFO,MSGTR_AO_ALSA_BufferTimePeriodTime, + mp_tmsg(MSGT_AO,MSGL_INFO,"[AO_ALSA] buffer_time: %d, period_time :%d\n", alsa_buffer_time, err); } #endif//end SET_BUFFERTIME @@ -633,7 +640,7 @@ static int init(int rate_hz, int channels, int format, int flags) if ((err = snd_pcm_hw_params_set_period_size_near(alsa_handler, alsa_hwparams, &chunk_size, NULL)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetPeriodSize, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO ALSA] Unable to set period size(%ld): %s\n", chunk_size, snd_strerror(err)); return 0; } @@ -642,7 +649,7 @@ static int init(int rate_hz, int channels, int format, int flags) } if ((err = snd_pcm_hw_params_set_periods_near(alsa_handler, alsa_hwparams, &alsa_fragcount, NULL)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetPeriods, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Unable to set periods: %s\n", snd_strerror(err)); return 0; } @@ -655,7 +662,7 @@ static int init(int rate_hz, int channels, int format, int flags) /* finally install hardware parameters */ if ((err = snd_pcm_hw_params(alsa_handler, alsa_hwparams)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetHwParameters, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Unable to set hw-parameters: %s\n", snd_strerror(err)); return 0; } @@ -665,7 +672,7 @@ static int init(int rate_hz, int channels, int format, int flags) // gets buffersize for control if ((err = snd_pcm_hw_params_get_buffer_size(alsa_hwparams, &bufsize)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToGetBufferSize, snd_strerror(err)); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Unable to get buffersize: %s\n", snd_strerror(err)); return 0; } else { @@ -674,7 +681,7 @@ static int init(int rate_hz, int channels, int format, int flags) } if ((err = snd_pcm_hw_params_get_period_size(alsa_hwparams, &chunk_size, NULL)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToGetPeriodSize, snd_strerror(err)); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO ALSA] Unable to get period size: %s\n", snd_strerror(err)); return 0; } else { mp_msg(MSGT_AO,MSGL_V,"alsa-init: got period size %li\n", chunk_size); @@ -683,13 +690,13 @@ static int init(int rate_hz, int channels, int format, int flags) /* setting software parameters */ if ((err = snd_pcm_sw_params_current(alsa_handler, alsa_swparams)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToGetSwParameters, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Unable to get sw-parameters: %s\n", snd_strerror(err)); return 0; } #if SND_LIB_VERSION >= 0x000901 if ((err = snd_pcm_sw_params_get_boundary(alsa_swparams, &boundary)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToGetBoundary, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Unable to get boundary: %s\n", snd_strerror(err)); return 0; } @@ -698,26 +705,26 @@ static int init(int rate_hz, int channels, int format, int flags) #endif /* start playing when one period has been written */ if ((err = snd_pcm_sw_params_set_start_threshold(alsa_handler, alsa_swparams, chunk_size)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetStartThreshold, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Unable to set start threshold: %s\n", snd_strerror(err)); return 0; } /* disable underrun reporting */ if ((err = snd_pcm_sw_params_set_stop_threshold(alsa_handler, alsa_swparams, boundary)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetStopThreshold, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Unable to set stop threshold: %s\n", snd_strerror(err)); return 0; } #if SND_LIB_VERSION >= 0x000901 /* play silence when there is an underrun */ if ((err = snd_pcm_sw_params_set_silence_size(alsa_handler, alsa_swparams, boundary)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetSilenceSize, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Unable to set silence size: %s\n", snd_strerror(err)); return 0; } #endif if ((err = snd_pcm_sw_params(alsa_handler, alsa_swparams)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToGetSwParameters, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Unable to get sw-parameters: %s\n", snd_strerror(err)); return 0; } @@ -745,7 +752,7 @@ static void uninit(int immed) if ((err = snd_pcm_close(alsa_handler)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmCloseError, snd_strerror(err)); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] pcm close error: %s\n", snd_strerror(err)); return; } else { @@ -754,7 +761,7 @@ static void uninit(int immed) } } else { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_NoHandlerDefined); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] No handler defined!\n"); } } @@ -765,7 +772,7 @@ static void audio_pause(void) if (alsa_can_pause) { if ((err = snd_pcm_pause(alsa_handler, 1)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmPauseError, snd_strerror(err)); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] pcm pause error: %s\n", snd_strerror(err)); return; } mp_msg(MSGT_AO,MSGL_V,"alsa-pause: pause supported by hardware\n"); @@ -776,7 +783,7 @@ static void audio_pause(void) if ((err = snd_pcm_drop(alsa_handler)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmDropError, snd_strerror(err)); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] pcm drop error: %s\n", snd_strerror(err)); return; } } @@ -787,20 +794,20 @@ static void audio_resume(void) int err; if (snd_pcm_state(alsa_handler) == SND_PCM_STATE_SUSPENDED) { - mp_tmsg(MSGT_AO,MSGL_INFO,MSGTR_AO_ALSA_PcmInSuspendModeTryingResume); + mp_tmsg(MSGT_AO,MSGL_INFO,"[AO_ALSA] Pcm in suspend mode, trying to resume.\n"); while ((err = snd_pcm_resume(alsa_handler)) == -EAGAIN) sleep(1); } if (alsa_can_pause) { if ((err = snd_pcm_pause(alsa_handler, 0)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmResumeError, snd_strerror(err)); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] pcm resume error: %s\n", snd_strerror(err)); return; } mp_msg(MSGT_AO,MSGL_V,"alsa-resume: resume supported by hardware\n"); } else { if ((err = snd_pcm_prepare(alsa_handler)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmPrepareError, snd_strerror(err)); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] pcm prepare error: %s\n", snd_strerror(err)); return; } if (prepause_frames) { @@ -819,12 +826,12 @@ static void reset(void) prepause_frames = 0; if ((err = snd_pcm_drop(alsa_handler)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmPrepareError, snd_strerror(err)); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] pcm prepare error: %s\n", snd_strerror(err)); return; } if ((err = snd_pcm_prepare(alsa_handler)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmPrepareError, snd_strerror(err)); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] pcm prepare error: %s\n", snd_strerror(err)); return; } return; @@ -845,7 +852,7 @@ static int play(void* data, int len, int flags) //mp_msg(MSGT_AO,MSGL_ERR,"alsa-play: frames=%i, len=%i\n",num_frames,len); if (!alsa_handler) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_DeviceConfigurationError); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Device configuration error."); return 0; } @@ -860,15 +867,15 @@ static int play(void* data, int len, int flags) res = 0; } else if (res == -ESTRPIPE) { /* suspend */ - mp_tmsg(MSGT_AO,MSGL_INFO,MSGTR_AO_ALSA_PcmInSuspendModeTryingResume); + mp_tmsg(MSGT_AO,MSGL_INFO,"[AO_ALSA] Pcm in suspend mode, trying to resume.\n"); while ((res = snd_pcm_resume(alsa_handler)) == -EAGAIN) sleep(1); } if (res < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_WriteError, snd_strerror(res)); - mp_tmsg(MSGT_AO,MSGL_INFO,MSGTR_AO_ALSA_TryingToResetSoundcard); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Write error: %s\n", snd_strerror(res)); + mp_tmsg(MSGT_AO,MSGL_INFO,"[AO_ALSA] Trying to reset soundcard.\n"); if ((res = snd_pcm_prepare(alsa_handler)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmPrepareError, snd_strerror(res)); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] pcm prepare error: %s\n", snd_strerror(res)); return 0; break; } @@ -888,7 +895,7 @@ static int get_space(void) if ((ret = snd_pcm_status(alsa_handler, status)) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_CannotGetPcmStatus, snd_strerror(ret)); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] Cannot get pcm status: %s\n", snd_strerror(ret)); return 0; } diff --git a/libao2/ao_alsa5.c b/libao2/ao_alsa5.c index 310725d88d..bca4e93ed8 100644 --- a/libao2/ao_alsa5.c +++ b/libao2/ao_alsa5.c @@ -65,7 +65,7 @@ static int init(int rate_hz, int channels, int format, int flags) snd_pcm_info_t info; snd_pcm_channel_info_t chninfo; - mp_tmsg(MSGT_AO, MSGL_INFO, MSGTR_AO_ALSA5_InitInfo, rate_hz, + mp_tmsg(MSGT_AO, MSGL_INFO, "[AO ALSA5] alsa-init: requested format: %d Hz, %d channels, %s\n", rate_hz, channels, af_fmt2str_short(format)); alsa_handler = NULL; @@ -75,7 +75,7 @@ static int init(int rate_hz, int channels, int format, int flags) if ((cards = snd_cards()) < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_SoundCardNotFound); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-init: no soundcards found.\n"); return 0; } @@ -125,7 +125,7 @@ static int init(int rate_hz, int channels, int format, int flags) ao_data.bps *= 2; break; case -1: - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_InvalidFormatReq,af_fmt2str_short(format)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-init: invalid format (%s) requested - output disabled.\n",af_fmt2str_short(format)); return 0; default: break; @@ -177,17 +177,17 @@ static int init(int rate_hz, int channels, int format, int flags) if ((err = snd_pcm_open(&alsa_handler, 0, 0, SND_PCM_OPEN_PLAYBACK)) < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_PlayBackError, snd_strerror(err)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-init: playback open error: %s\n", snd_strerror(err)); return 0; } if ((err = snd_pcm_info(alsa_handler, &info)) < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_PcmInfoError, snd_strerror(err)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-init: PCM info error: %s\n", snd_strerror(err)); return 0; } - mp_tmsg(MSGT_AO, MSGL_INFO, MSGTR_AO_ALSA5_SoundcardsFound, + mp_tmsg(MSGT_AO, MSGL_INFO, "[AO ALSA5] alsa-init: %d soundcard(s) found, using: %s\n", cards, info.name); if (info.flags & SND_PCM_INFO_PLAYBACK) @@ -196,7 +196,7 @@ static int init(int rate_hz, int channels, int format, int flags) chninfo.channel = SND_PCM_CHANNEL_PLAYBACK; if ((err = snd_pcm_channel_info(alsa_handler, &chninfo)) < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_PcmChanInfoError, snd_strerror(err)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-init: PCM channel info error: %s\n", snd_strerror(err)); return 0; } @@ -220,7 +220,7 @@ static int init(int rate_hz, int channels, int format, int flags) if ((err = snd_pcm_channel_params(alsa_handler, ¶ms)) < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_CantSetParms, snd_strerror(err)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-init: error setting parameters: %s\n", snd_strerror(err)); return 0; } @@ -233,13 +233,13 @@ static int init(int rate_hz, int channels, int format, int flags) if ((err = snd_pcm_channel_setup(alsa_handler, &setup)) < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_CantSetChan, snd_strerror(err)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-init: error setting up channel: %s\n", snd_strerror(err)); return 0; } if ((err = snd_pcm_channel_prepare(alsa_handler, SND_PCM_CHANNEL_PLAYBACK)) < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_ChanPrepareError, snd_strerror(err)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-init: channel prepare error: %s\n", snd_strerror(err)); return 0; } @@ -256,19 +256,19 @@ static void uninit(int immed) if ((err = snd_pcm_playback_drain(alsa_handler)) < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_DrainError, snd_strerror(err)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-uninit: playback drain error: %s\n", snd_strerror(err)); return; } if ((err = snd_pcm_channel_flush(alsa_handler, SND_PCM_CHANNEL_PLAYBACK)) < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_FlushError, snd_strerror(err)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-uninit: playback flush error: %s\n", snd_strerror(err)); return; } if ((err = snd_pcm_close(alsa_handler)) < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_PcmCloseError, snd_strerror(err)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-uninit: PCM close error: %s\n", snd_strerror(err)); return; } } @@ -280,19 +280,19 @@ static void reset(void) if ((err = snd_pcm_playback_drain(alsa_handler)) < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_ResetDrainError, snd_strerror(err)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-reset: playback drain error: %s\n", snd_strerror(err)); return; } if ((err = snd_pcm_channel_flush(alsa_handler, SND_PCM_CHANNEL_PLAYBACK)) < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_ResetFlushError, snd_strerror(err)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-reset: playback flush error: %s\n", snd_strerror(err)); return; } if ((err = snd_pcm_channel_prepare(alsa_handler, SND_PCM_CHANNEL_PLAYBACK)) < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_ResetChanPrepareError, snd_strerror(err)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-reset: channel prepare error: %s\n", snd_strerror(err)); return; } } @@ -304,13 +304,13 @@ static void audio_pause(void) if ((err = snd_pcm_playback_drain(alsa_handler)) < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_PauseDrainError, snd_strerror(err)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-pause: playback drain error: %s\n", snd_strerror(err)); return; } if ((err = snd_pcm_channel_flush(alsa_handler, SND_PCM_CHANNEL_PLAYBACK)) < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_PauseFlushError, snd_strerror(err)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-pause: playback flush error: %s\n", snd_strerror(err)); return; } } @@ -321,7 +321,7 @@ static void audio_resume(void) int err; if ((err = snd_pcm_channel_prepare(alsa_handler, SND_PCM_CHANNEL_PLAYBACK)) < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_ResumePrepareError, snd_strerror(err)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-resume: channel prepare error: %s\n", snd_strerror(err)); return; } } @@ -341,21 +341,21 @@ static int play(void* data, int len, int flags) { if (got_len == -EPIPE) /* underrun? */ { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_Underrun); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-play: alsa underrun, resetting stream.\n"); if ((got_len = snd_pcm_channel_prepare(alsa_handler, SND_PCM_CHANNEL_PLAYBACK)) < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_PlaybackPrepareError, snd_strerror(got_len)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-play: playback prepare error: %s\n", snd_strerror(got_len)); return 0; } if ((got_len = snd_pcm_write(alsa_handler, data, len)) < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_WriteErrorAfterReset, + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-play: write error after reset: %s - giving up.\n", snd_strerror(got_len)); return 0; } return got_len; /* 2nd write was ok */ } - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_OutPutError, snd_strerror(got_len)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ALSA5] alsa-play: output error: %s\n", snd_strerror(got_len)); return 0; } return got_len; diff --git a/libao2/ao_arts.c b/libao2/ao_arts.c index 38f3d8d4a4..1d1638ba2d 100644 --- a/libao2/ao_arts.c +++ b/libao2/ao_arts.c @@ -59,10 +59,10 @@ static int init(int rate_hz, int channels, int format, int flags) int frag_spec; if( (err=arts_init()) ) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ARTS_CantInit, arts_error_text(err)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ARTS] %s\n", arts_error_text(err)); return 0; } - mp_tmsg(MSGT_AO, MSGL_INFO, MSGTR_AO_ARTS_ServerConnect); + mp_tmsg(MSGT_AO, MSGL_INFO, "[AO ARTS] Connected to sound server.\n"); /* * arts supports 8bit unsigned and 16bit signed sample formats @@ -93,7 +93,7 @@ static int init(int rate_hz, int channels, int format, int flags) stream=arts_play_stream(rate_hz, OBTAIN_BITRATE(format), channels, "MPlayer"); if(stream == NULL) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ARTS_CantOpenStream); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ARTS] Unable to open a stream.\n"); arts_free(); return 0; } @@ -104,11 +104,11 @@ static int init(int rate_hz, int channels, int format, int flags) frag_spec = ARTS_PACKET_SIZE_LOG2 | ARTS_PACKETS << 16; arts_stream_set(stream, ARTS_P_PACKET_SETTINGS, frag_spec); ao_data.buffersize = arts_stream_get(stream, ARTS_P_BUFFER_SIZE); - mp_tmsg(MSGT_AO, MSGL_INFO, MSGTR_AO_ARTS_StreamOpen); + mp_tmsg(MSGT_AO, MSGL_INFO, "[AO ARTS] Stream opened.\n"); - mp_tmsg(MSGT_AO, MSGL_INFO, MSGTR_AO_ARTS_BufferSize, + mp_tmsg(MSGT_AO, MSGL_INFO, "[AO ARTS] buffer size: %d\n", ao_data.buffersize); - mp_tmsg(MSGT_AO, MSGL_INFO, MSGTR_AO_ARTS_BufferSize, + mp_tmsg(MSGT_AO, MSGL_INFO, "[AO ARTS] buffer size: %d\n", arts_stream_get(stream, ARTS_P_PACKET_SIZE)); return 1; diff --git a/libao2/ao_dxr2.c b/libao2/ao_dxr2.c index 57926dac0b..51cd1a0d01 100644 --- a/libao2/ao_dxr2.c +++ b/libao2/ao_dxr2.c @@ -73,7 +73,7 @@ static int control(int cmd,void *arg){ if(v.arg != volume) { volume = v.arg; if( ioctl(dxr2_fd,DXR2_IOC_SET_AUDIO_VOLUME,&v) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_DXR2_SetVolFailed,volume); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO DXR2] Setting volume to %d failed.\n",volume); return CONTROL_ERROR; } } @@ -135,7 +135,7 @@ static int init(int rate,int channels,int format,int flags){ break; #endif default: - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_DXR2_UnsupSamplerate,rate); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO DXR2] %d Hz not supported, try to resample.\n",rate); return 0; } diff --git a/libao2/ao_esd.c b/libao2/ao_esd.c index 9d9e594cec..7a9ad96170 100644 --- a/libao2/ao_esd.c +++ b/libao2/ao_esd.c @@ -168,7 +168,7 @@ static int init(int rate_hz, int channels, int format, int flags) if (esd_fd < 0) { esd_fd = esd_open_sound(server); if (esd_fd < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ESD_CantOpenSound, + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ESD] esd_open_sound failed: %s\n", strerror(errno)); return 0; } @@ -245,14 +245,14 @@ static int init(int rate_hz, int channels, int format, int flags) lag_serv = (esd_latency * 4.0f) / (bytes_per_sample * rate_hz); lag_seconds = lag_net + lag_serv; audio_delay += lag_seconds; - mp_tmsg(MSGT_AO, MSGL_INFO,MSGTR_AO_ESD_LatencyInfo, + mp_tmsg(MSGT_AO, MSGL_INFO,"[AO ESD] latency: [server: %0.2fs, net: %0.2fs] (adjust %0.2fs)\n", lag_serv, lag_net, lag_seconds); } esd_play_fd = esd_play_stream_fallback(esd_fmt, rate_hz, server, ESD_CLIENT_NAME); if (esd_play_fd < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_ESD_CantOpenPBStream, strerror(errno)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO ESD] failed to open ESD playback stream: %s\n", strerror(errno)); return 0; } diff --git a/libao2/ao_ivtv.c b/libao2/ao_ivtv.c index adeefb464e..22e2f49a74 100644 --- a/libao2/ao_ivtv.c +++ b/libao2/ao_ivtv.c @@ -86,7 +86,7 @@ init (int rate, int channels, int format, int flags) /* check for supported audio rate */ if (rate != 32000 || rate != 41000 || rate != 48000) { - mp_tmsg (MSGT_AO, MSGL_ERR, MSGTR_AO_MPEGPES_UnsupSamplerate, rate); + mp_tmsg (MSGT_AO, MSGL_ERR, "[AO MPEGPES] %d Hz not supported, try to resample.\n", rate); rate = 48000; } diff --git a/libao2/ao_mpegpes.c b/libao2/ao_mpegpes.c index 3d66aca814..e8c0f01d14 100644 --- a/libao2/ao_mpegpes.c +++ b/libao2/ao_mpegpes.c @@ -97,7 +97,7 @@ static int control(int cmd,void *arg){ if(dvb_mixer.volume_right>255) dvb_mixer.volume_right=255; // printf("Setting DVB volume: %d ; %d \n",dvb_mixer.volume_left,dvb_mixer.volume_right); if ( (ioctl(vo_mpegpes_fd2,AUDIO_SET_MIXER, &dvb_mixer) < 0)){ - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_MPEGPES_CantSetMixer, + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO MPEGPES] DVB audio set mixer failed: %s.\n", strerror(errno)); return CONTROL_ERROR; } @@ -263,7 +263,7 @@ static int init(int rate,int channels,int format,int flags){ case 44100: freq_id=2;break; case 32000: freq_id=3;break; default: - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_MPEGPES_UnsupSamplerate, rate); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO MPEGPES] %d Hz not supported, try to resample.\n", rate); #if 0 if(rate>48000) rate=96000; else if(rate>44100) rate=48000; else diff --git a/libao2/ao_oss.c b/libao2/ao_oss.c index ad2a595c47..c331f8331b 100644 --- a/libao2/ao_oss.c +++ b/libao2/ao_oss.c @@ -160,7 +160,7 @@ static int oss2format(int format) case AFMT_AC3: return AF_FORMAT_AC3; #endif } - mp_tmsg(MSGT_GLOBAL,MSGL_ERR,MSGTR_AO_OSS_UnknownUnsupportedFormat, format); + mp_tmsg(MSGT_GLOBAL,MSGL_ERR,"[AO OSS] Unknown/Unsupported OSS format: %x.\n", format); return -1; } @@ -294,7 +294,7 @@ static int init(int rate,int channels,int format,int flags){ int fd, devs, i; if ((fd = open(oss_mixer_device, O_RDONLY)) == -1){ - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_OSS_CantOpenMixer, + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO OSS] audio_setup: Can't open mixer device %s: %s\n", oss_mixer_device, strerror(errno)); }else{ ioctl(fd, SOUND_MIXER_READ_DEVMASK, &devs); @@ -303,7 +303,7 @@ static int init(int rate,int channels,int format,int flags){ for (i=0; i<SOUND_MIXER_NRDEVICES; i++){ if(!strcasecmp(mixer_channels[i], mchan)){ if(!(devs & (1 << i))){ - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_OSS_ChanNotFound,mchan); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO OSS] audio_setup: Audio card mixer does not have channel '%s', using default.\n",mchan); i = SOUND_MIXER_NRDEVICES+1; break; } @@ -312,7 +312,7 @@ static int init(int rate,int channels,int format,int flags){ } } if(i==SOUND_MIXER_NRDEVICES){ - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_OSS_ChanNotFound,mchan); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO OSS] audio_setup: Audio card mixer does not have channel '%s', using default.\n",mchan); } } } else @@ -328,14 +328,14 @@ static int init(int rate,int channels,int format,int flags){ audio_fd=open(dsp, O_WRONLY); #endif if(audio_fd<0){ - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_OSS_CantOpenDev, dsp, strerror(errno)); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO OSS] audio_setup: Can't open audio device %s: %s\n", dsp, strerror(errno)); return 0; } #ifdef __linux__ /* Remove the non-blocking flag */ if(fcntl(audio_fd, F_SETFL, 0) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_OSS_CantMakeFd, strerror(errno)); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO OSS] audio_setup: Can't make file descriptor blocking: %s\n", strerror(errno)); return 0; } #endif @@ -362,7 +362,7 @@ ac3_retry: } if( ioctl(audio_fd, SNDCTL_DSP_SETFMT, &oss_format)<0 || oss_format != format2oss(format)) { - mp_tmsg(MSGT_AO,MSGL_WARN, MSGTR_AO_OSS_CantSet, dsp, + mp_tmsg(MSGT_AO,MSGL_WARN, "[AO OSS] Can't set audio device %s to %s output, trying %s...\n", dsp, af_fmt2str_short(format), af_fmt2str_short(AF_FORMAT_S16_NE) ); format=AF_FORMAT_S16_NE; goto ac3_retry; @@ -384,14 +384,14 @@ ac3_retry: if (ao_data.channels > 2) { if ( ioctl(audio_fd, SNDCTL_DSP_CHANNELS, &ao_data.channels) == -1 || ao_data.channels != channels ) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_OSS_CantSetChans, channels); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO OSS] audio_setup: Failed to set audio device to %d channels.\n", channels); return 0; } } else { int c = ao_data.channels-1; if (ioctl (audio_fd, SNDCTL_DSP_STEREO, &c) == -1) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_OSS_CantSetChans, ao_data.channels); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO OSS] audio_setup: Failed to set audio device to %d channels.\n", ao_data.channels); return 0; } ao_data.channels=c+1; @@ -405,7 +405,7 @@ ac3_retry: if(ioctl(audio_fd, SNDCTL_DSP_GETOSPACE, &zz)==-1){ int r=0; - mp_tmsg(MSGT_AO,MSGL_WARN,MSGTR_AO_OSS_CantUseGetospace); + mp_tmsg(MSGT_AO,MSGL_WARN,"[AO OSS] audio_setup: driver doesn't support SNDCTL_DSP_GETOSPACE :-(\n"); if(ioctl(audio_fd, SNDCTL_DSP_GETBLKSIZE, &r)==-1){ mp_msg(MSGT_AO,MSGL_V,"audio_setup: %d bytes/frag (config.h)\n",ao_data.outburst); } else { @@ -436,7 +436,7 @@ ac3_retry: } free(data); if(ao_data.buffersize==0){ - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_OSS_CantUseSelect); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO OSS]\n *** Your audio driver DOES NOT support select() ***\n Recompile MPlayer with #undef HAVE_AUDIO_SELECT in config.h !\n\n"); return 0; } #endif @@ -474,7 +474,7 @@ static void reset(void){ uninit(1); audio_fd=open(dsp, O_WRONLY); if(audio_fd < 0){ - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_OSS_CantReopen, strerror(errno)); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO OSS]\nFatal error: *** CANNOT RE-OPEN / RESET AUDIO DEVICE *** %s\n", strerror(errno)); return; } diff --git a/libao2/ao_pcm.c b/libao2/ao_pcm.c index d5be3b9cf6..8940107eec 100644 --- a/libao2/ao_pcm.c +++ b/libao2/ao_pcm.c @@ -154,10 +154,10 @@ static int init(int rate,int channels,int format,int flags){ wavhdr.data_length=le2me_32(0x7ffff000); wavhdr.file_length = wavhdr.data_length + sizeof(wavhdr) - 8; - mp_tmsg(MSGT_AO, MSGL_INFO, MSGTR_AO_PCM_FileInfo, ao_outputfilename, + mp_tmsg(MSGT_AO, MSGL_INFO, "[AO PCM] File: %s (%s)\nPCM: Samplerate: %iHz Channels: %s Format %s\n", ao_outputfilename, (ao_pcm_waveheader?"WAVE":"RAW PCM"), rate, (channels > 1) ? "Stereo" : "Mono", af_fmt2str_short(format)); - mp_tmsg(MSGT_AO, MSGL_INFO, MSGTR_AO_PCM_HintInfo); + mp_tmsg(MSGT_AO, MSGL_INFO, "[AO PCM] Info: Faster dumping is achieved with -vc null -vo null -ao pcm:fast\n[AO PCM] Info: To write WAVE files use -ao pcm:waveheader (default).\n"); fp = fopen(ao_outputfilename, "wb"); if(fp) { @@ -166,7 +166,7 @@ static int init(int rate,int channels,int format,int flags){ } return 1; } - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_PCM_CantOpenOutputFile, + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO PCM] Failed to open %s for writing!\n", ao_outputfilename); return 0; } diff --git a/libao2/ao_sdl.c b/libao2/ao_sdl.c index 13a9a95447..66d37eae77 100644 --- a/libao2/ao_sdl.c +++ b/libao2/ao_sdl.c @@ -133,11 +133,11 @@ static int init(int rate,int channels,int format,int flags){ /* Allocate ring-buffer memory */ buffer = av_fifo_alloc(BUFFSIZE); - mp_tmsg(MSGT_AO,MSGL_INFO,MSGTR_AO_SDL_INFO, rate, (channels > 1) ? "Stereo" : "Mono", af_fmt2str_short(format)); + mp_tmsg(MSGT_AO,MSGL_INFO,"[AO SDL] Samplerate: %iHz Channels: %s Format %s\n", rate, (channels > 1) ? "Stereo" : "Mono", af_fmt2str_short(format)); if(ao_subdevice) { setenv("SDL_AUDIODRIVER", ao_subdevice, 1); - mp_tmsg(MSGT_AO,MSGL_INFO,MSGTR_AO_SDL_DriverInfo, ao_subdevice); + mp_tmsg(MSGT_AO,MSGL_INFO,"[AO SDL] using %s audio driver.\n", ao_subdevice); } ao_data.channels=channels; @@ -171,7 +171,7 @@ static int init(int rate,int channels,int format,int flags){ default: aspec.format = AUDIO_S16LSB; ao_data.format = AF_FORMAT_S16_LE; - mp_tmsg(MSGT_AO,MSGL_WARN,MSGTR_AO_SDL_UnsupportedAudioFmt, format); + mp_tmsg(MSGT_AO,MSGL_WARN,"[AO SDL] Unsupported audio format: 0x%x.\n", format); } /* The desired audio frequency in samples-per-second. */ @@ -192,13 +192,13 @@ void callback(void *userdata, Uint8 *stream, int len); userdata is the pointer s /* initialize the SDL Audio system */ if (SDL_Init (SDL_INIT_AUDIO/*|SDL_INIT_NOPARACHUTE*/)) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_SDL_CantInit, SDL_GetError()); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO SDL] SDL Audio initialization failed: %s\n", SDL_GetError()); return 0; } /* Open the audio device and start playing sound! */ if(SDL_OpenAudio(&aspec, &obtained) < 0) { - mp_tmsg(MSGT_AO,MSGL_ERR,MSGTR_AO_SDL_CantOpenAudio, SDL_GetError()); + mp_tmsg(MSGT_AO,MSGL_ERR,"[AO SDL] Unable to open audio: %s\n", SDL_GetError()); return 0; } @@ -226,7 +226,7 @@ void callback(void *userdata, Uint8 *stream, int len); userdata is the pointer s ao_data.format = AF_FORMAT_U16_BE; break; default: - mp_tmsg(MSGT_AO,MSGL_WARN,MSGTR_AO_SDL_UnsupportedAudioFmt, obtained.format); + mp_tmsg(MSGT_AO,MSGL_WARN,"[AO SDL] Unsupported audio format: 0x%x.\n", obtained.format); return 0; } diff --git a/libao2/ao_sgi.c b/libao2/ao_sgi.c index 89d4176889..8a2899d915 100644 --- a/libao2/ao_sgi.c +++ b/libao2/ao_sgi.c @@ -117,7 +117,7 @@ static int fmt2sgial(int *format, int *width) { // to set/get/query special features/parameters static int control(int cmd, void *arg){ - mp_tmsg(MSGT_AO, MSGL_INFO, MSGTR_AO_SGI_INFO); + mp_tmsg(MSGT_AO, MSGL_INFO, "[AO SGI] control.\n"); switch(cmd) { case AOCONTROL_QUERY_FORMAT: @@ -138,7 +138,7 @@ static int init(int rate, int channels, int format, int flags) { smpfmt = fmt2sgial(&format, &smpwidth); - mp_tmsg(MSGT_AO, MSGL_INFO, MSGTR_AO_SGI_InitInfo, rate, (channels > 1) ? "Stereo" : "Mono", af_fmt2str_short(format)); + mp_tmsg(MSGT_AO, MSGL_INFO, "[AO SGI] init: Samplerate: %iHz Channels: %s Format %s\n", rate, (channels > 1) ? "Stereo" : "Mono", af_fmt2str_short(format)); { /* from /usr/share/src/dmedia/audio/setrate.c */ @@ -148,7 +148,7 @@ static int init(int rate, int channels, int format, int flags) { if(ao_subdevice) { rv = alGetResourceByName(AL_SYSTEM, ao_subdevice, AL_OUTPUT_DEVICE_TYPE); if (!rv) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_SGI_InvalidDevice); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO SGI] play: invalid device.\n"); return 0; } } @@ -161,20 +161,20 @@ static int init(int rate, int channels, int format, int flags) { x[1].value.i = AL_CRYSTAL_MCLK_TYPE; if (alSetParams(rv,x, 2)<0) { - mp_tmsg(MSGT_AO, MSGL_WARN, MSGTR_AO_SGI_CantSetParms_Samplerate, alGetErrorString(oserror())); + mp_tmsg(MSGT_AO, MSGL_WARN, "[AO SGI] init: setparams failed: %s\nCould not set desired samplerate.\n", alGetErrorString(oserror())); } if (x[0].sizeOut < 0) { - mp_tmsg(MSGT_AO, MSGL_WARN, MSGTR_AO_SGI_CantSetAlRate); + mp_tmsg(MSGT_AO, MSGL_WARN, "[AO SGI] init: AL_RATE was not accepted on the given resource.\n"); } if (alGetParams(rv,x, 1)<0) { - mp_tmsg(MSGT_AO, MSGL_WARN, MSGTR_AO_SGI_CantGetParms, alGetErrorString(oserror())); + mp_tmsg(MSGT_AO, MSGL_WARN, "[AO SGI] init: getparams failed: %s\n", alGetErrorString(oserror())); } realrate = alFixedToDouble(x[0].value.ll); if (frate != realrate) { - mp_tmsg(MSGT_AO, MSGL_INFO, MSGTR_AO_SGI_SampleRateInfo, realrate, frate); + mp_tmsg(MSGT_AO, MSGL_INFO, "[AO SGI] init: samplerate is now %lf (desired rate is %lf)\n", realrate, frate); } sample_rate = (int)realrate; } @@ -191,7 +191,7 @@ static int init(int rate, int channels, int format, int flags) { ao_config = alNewConfig(); if (!ao_config) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_SGI_InitConfigError, alGetErrorString(oserror())); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO SGI] init: %s\n", alGetErrorString(oserror())); return 0; } @@ -200,14 +200,14 @@ static int init(int rate, int channels, int format, int flags) { alSetSampFmt(ao_config, smpfmt) < 0 || alSetQueueSize(ao_config, sample_rate) < 0 || alSetDevice(ao_config, rv) < 0) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_SGI_InitConfigError, alGetErrorString(oserror())); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO SGI] init: %s\n", alGetErrorString(oserror())); return 0; } ao_port = alOpenPort("mplayer", "w", ao_config); if (!ao_port) { - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_SGI_InitOpenAudioFailed, alGetErrorString(oserror())); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO SGI] init: Unable to open audio channel: %s\n", alGetErrorString(oserror())); return 0; } @@ -222,7 +222,7 @@ static void uninit(int immed) { /* TODO: samplerate should be set back to the value before mplayer was started! */ - mp_tmsg(MSGT_AO, MSGL_INFO, MSGTR_AO_SGI_Uninit); + mp_tmsg(MSGT_AO, MSGL_INFO, "[AO SGI] uninit: ...\n"); if (ao_config) { alFreeConfig(ao_config); @@ -241,7 +241,7 @@ static void uninit(int immed) { // stop playing and empty buffers (for seeking/pause) static void reset(void) { - mp_tmsg(MSGT_AO, MSGL_INFO, MSGTR_AO_SGI_Reset); + mp_tmsg(MSGT_AO, MSGL_INFO, "[AO SGI] reset: ...\n"); alDiscardFrames(ao_port, queue_size); } @@ -249,14 +249,14 @@ static void reset(void) { // stop playing, keep buffers (for pause) static void audio_pause(void) { - mp_tmsg(MSGT_AO, MSGL_INFO, MSGTR_AO_SGI_PauseInfo); + mp_tmsg(MSGT_AO, MSGL_INFO, "[AO SGI] audio_pause: ...\n"); } // resume playing, after audio_pause() static void audio_resume(void) { - mp_tmsg(MSGT_AO, MSGL_INFO, MSGTR_AO_SGI_ResumeInfo); + mp_tmsg(MSGT_AO, MSGL_INFO, "[AO SGI] audio_resume: ...\n"); } diff --git a/libao2/ao_sun.c b/libao2/ao_sun.c index f1b002feb1..d2da673177 100644 --- a/libao2/ao_sun.c +++ b/libao2/ao_sun.c @@ -154,13 +154,13 @@ static int realtime_samplecounter_available(char *dev) info.play.samples = 0; if (ioctl(fd, AUDIO_SETINFO, &info)) { if ( mp_msg_test(MSGT_AO,MSGL_V) ) - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_SUN_RtscSetinfoFailed); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO SUN] rtsc: SETINFO failed.\n"); goto error; } if (write(fd, silence, len) != len) { if ( mp_msg_test(MSGT_AO,MSGL_V) ) - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_SUN_RtscWriteFailed); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO SUN] rtsc: write failed.\n"); goto error; } @@ -494,7 +494,7 @@ static int init(int rate,int channels,int format,int flags){ audio_fd=open(audio_dev, O_WRONLY); if(audio_fd<0){ - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_SUN_CantOpenAudioDev, audio_dev, strerror(errno)); + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO SUN] Can't open audio device %s, %s -> nosound.\n", audio_dev, strerror(errno)); return 0; } @@ -572,7 +572,7 @@ static int init(int rate,int channels,int format,int flags){ if (!ok) { char buf[128]; - mp_tmsg(MSGT_AO, MSGL_ERR, MSGTR_AO_SUN_UnsupSampleRate, + mp_tmsg(MSGT_AO, MSGL_ERR, "[AO SUN] audio_setup: your card doesn't support %d channel, %s, %d Hz samplerate.\n", channels, af_fmt2str(format, buf, 128), rate); return 0; } diff --git a/libao2/ao_v4l2.c b/libao2/ao_v4l2.c index fddc7c9450..c1e0671835 100644 --- a/libao2/ao_v4l2.c +++ b/libao2/ao_v4l2.c @@ -83,7 +83,7 @@ init (int rate, int channels, int format, int flags) /* check for supported audio rate */ if (rate != 32000 || rate != 41000 || rate != 48000) { - mp_tmsg (MSGT_AO, MSGL_ERR, MSGTR_AO_MPEGPES_UnsupSamplerate, rate); + mp_tmsg (MSGT_AO, MSGL_ERR, "[AO MPEGPES] %d Hz not supported, try to resample.\n", rate); rate = 48000; } diff --git a/libao2/audio_out.c b/libao2/audio_out.c index 76ccbbb045..ab40121d76 100644 --- a/libao2/audio_out.c +++ b/libao2/audio_out.c @@ -124,7 +124,7 @@ const ao_functions_t* const audio_out_drivers[] = void list_audio_out(void){ int i=0; - mp_tmsg(MSGT_AO, MSGL_INFO, MSGTR_AvailableAudioOutputDrivers); + mp_tmsg(MSGT_AO, MSGL_INFO, "Available audio output drivers:\n"); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AUDIO_OUTPUTS\n"); while (audio_out_drivers[i]) { const ao_info_t *info = audio_out_drivers[i++]->info; @@ -152,7 +152,7 @@ const ao_functions_t* init_best_audio_out(char** ao_list,int use_plugin,int rate else ao_len = strlen(ao); - mp_tmsg(MSGT_AO, MSGL_V, MSGTR_AO_TryingPreferredAudioDriver, + mp_tmsg(MSGT_AO, MSGL_V, "Trying preferred audio driver '%.*s', options '%s'\n", ao_len, ao, ao_subdevice ? ao_subdevice : "[none]"); for(i=0;audio_out_drivers[i];i++){ @@ -162,12 +162,12 @@ const ao_functions_t* init_best_audio_out(char** ao_list,int use_plugin,int rate if(audio_out->init(rate,channels,format,flags)) return audio_out; // success! else - mp_tmsg(MSGT_AO, MSGL_WARN, MSGTR_AO_FailedInit, ao); + mp_tmsg(MSGT_AO, MSGL_WARN, "Failed to initialize audio driver '%s'\n", ao); break; } } if (!audio_out_drivers[i]) // we searched through the entire list - mp_tmsg(MSGT_AO, MSGL_WARN, MSGTR_AO_NoSuchDriver, ao_len, ao); + mp_tmsg(MSGT_AO, MSGL_WARN, "No such audio driver '%.*s'\n", ao_len, ao); // continue... ++ao_list; if(!(ao_list[0])) return NULL; // do NOT fallback to others @@ -177,7 +177,7 @@ const ao_functions_t* init_best_audio_out(char** ao_list,int use_plugin,int rate ao_subdevice = NULL; } - mp_tmsg(MSGT_AO, MSGL_V, MSGTR_AO_TryingEveryKnown); + mp_tmsg(MSGT_AO, MSGL_V, "Trying every known audio driver...\n"); // now try the rest... for(i=0;audio_out_drivers[i];i++){ diff --git a/libmenu/menu.c b/libmenu/menu.c index 5c65bd02f0..ed67cc9f2e 100644 --- a/libmenu/menu.c +++ b/libmenu/menu.c @@ -114,7 +114,7 @@ static int menu_parse_config(char* buffer, struct m_config *mconfig) while(1) { r = asx_get_element(parser,&buffer,&element,&body,&attribs); if(r < 0) { - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_SyntaxErrorAtLine,parser->line); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] syntax error at line: %d\n",parser->line); asx_parser_free(parser); return 0; } else if(r == 0) { @@ -124,7 +124,7 @@ static int menu_parse_config(char* buffer, struct m_config *mconfig) // Has it a name ? name = asx_get_attrib("name",attribs); if(!name) { - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_MenuDefinitionsNeedANameAttrib,parser->line); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] Menu definitions need a name attribute (line %d).\n",parser->line); free(element); if(body) free(body); asx_free_attribs(attribs); @@ -156,7 +156,7 @@ static int menu_parse_config(char* buffer, struct m_config *mconfig) for(;;) { r = asx_get_element(parser,&bd,&element,&b,&attribs); if(r < 0) { - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_SyntaxErrorAtLine, + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] syntax error at line: %d\n", parser->line); free(body); asx_parser_free(parser); @@ -209,13 +209,13 @@ static int menu_parse_config(char* buffer, struct m_config *mconfig) for(i = 0 ; attribs[2*i] ; i++) { if(strcasecmp(attribs[2*i],"name") == 0) continue; if(!m_struct_set(&minfo->priv_st,menu_list[menu_count].cfg,attribs[2*i], attribs[2*i+1])) - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_BadAttrib,attribs[2*i],attribs[2*i+1], + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] bad attribute %s=%s in menu '%s' at line %d\n",attribs[2*i],attribs[2*i+1], name,parser->line); } menu_count++; memset(&menu_list[menu_count],0,sizeof(menu_def_t)); } else { - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_UnknownMenuType,element,parser->line); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] unknown menu type '%s' at line %d\n",element,parser->line); free(name); if(body) free(body); } @@ -243,7 +243,7 @@ int menu_init(struct MPContext *mpctx, struct m_config *mconfig, #endif fd = open(cfg_file, O_RDONLY); if(fd < 0) { - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_CantOpenConfigFile,cfg_file); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] Can't open menu config file: %s\n",cfg_file); return 0; } buffer = malloc(bl); @@ -251,7 +251,7 @@ int menu_init(struct MPContext *mpctx, struct m_config *mconfig, int r; if(bl - br < BUF_MIN) { if(bl >= BUF_MAX) { - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_ConfigFileIsTooBig,BUF_MAX/1024); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] Config file is too big (> %d KB)\n",BUF_MAX/1024); close(fd); free(buffer); return 0; @@ -264,7 +264,7 @@ int menu_init(struct MPContext *mpctx, struct m_config *mconfig, br += r; } if(!br) { - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_ConfigFileIsEmpty); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] Config file is empty.\n"); return 0; } buffer[br-1] = '\0'; @@ -329,7 +329,7 @@ menu_t* menu_open(char *name) { break; } if(menu_list[i].name == NULL) { - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_MenuNotFound,name); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] Menu %s not found.\n",name); return NULL; } m = calloc(1,sizeof(menu_t)); @@ -344,7 +344,7 @@ menu_t* menu_open(char *name) { if(m->priv) m_struct_free(m->priv_st,m->priv); free(m); - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_MenuInitFailed,name); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] Menu '%s': Init failed.\n",name); return NULL; } @@ -482,7 +482,7 @@ void menu_draw_text(mp_image_t* mpi,char* txt, int x, int y) { int font; if(!draw_alpha) { - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_UnsupportedOutformat); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] Unsupported output format!!!!\n"); return; } @@ -516,7 +516,7 @@ void menu_draw_text_full(mp_image_t* mpi,char* txt, draw_alpha_f draw_alpha = get_draw_alpha(mpi->imgfmt); if(!draw_alpha) { - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_UnsupportedOutformat); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] Unsupported output format!!!!\n"); return; } @@ -758,7 +758,7 @@ void menu_draw_box(mp_image_t* mpi,unsigned char grey,unsigned char alpha, int x int g; if(!draw_alpha) { - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_UnsupportedOutformat); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] Unsupported output format!!!!\n"); return; } diff --git a/libmenu/menu_cmdlist.c b/libmenu/menu_cmdlist.c index e4896866fc..5516af1ff6 100644 --- a/libmenu/menu_cmdlist.c +++ b/libmenu/menu_cmdlist.c @@ -119,19 +119,19 @@ static int parse_args(menu_t* menu,char* args) { while(1) { r = asx_get_element(parser,&args,&element,&body,&attribs); if(r < 0) { - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_SyntaxErrorAtLine,parser->line); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] syntax error at line: %d\n",parser->line); asx_parser_free(parser); return -1; } else if(r == 0) { asx_parser_free(parser); if(!m) - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_NoEntryFoundInTheMenuDefinition); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] No entry found in the menu definition.\n"); return m ? 1 : 0; } // Has it a name ? name = asx_get_attrib("name",attribs); if(!name) { - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_ListMenuEntryDefinitionsNeedAName,parser->line); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] List menu entry definitions need a name (line %d).\n",parser->line); free(element); if(body) free(body); asx_free_attribs(attribs); @@ -157,7 +157,7 @@ static int open_cmdlist(menu_t* menu, char* args) { menu->close = close_menu; if(!args) { - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_ListMenuNeedsAnArgument); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] List menu needs an argument.\n"); return 0; } diff --git a/libmenu/menu_console.c b/libmenu/menu_console.c index c83872f789..85aa7a9234 100644 --- a/libmenu/menu_console.c +++ b/libmenu/menu_console.c @@ -265,10 +265,10 @@ static void check_child(menu_t* menu) { mpriv->prompt = mpriv->mp_prompt; //add_line(mpriv,"Child process exited"); } - else mp_tmsg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_WaitPidError,strerror(errno)); + else mp_tmsg(MSGT_GLOBAL,MSGL_ERR,"[MENU] Waitpid error: %s.\n",strerror(errno)); } } else if(r < 0) { - mp_tmsg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_SelectError); + mp_tmsg(MSGT_GLOBAL,MSGL_ERR,"[MENU] Select error.\n"); return; } @@ -278,7 +278,7 @@ static void check_child(menu_t* menu) { if(w) mpriv->add_line = 1; r = read(mpriv->child_fd[i],buffer,255); if(r < 0) - mp_tmsg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_ReadErrorOnChildFD, i == 1 ? "stdout":"stderr"); + mp_tmsg(MSGT_GLOBAL,MSGL_ERR,"[MENU] Read error on child's file descriptor: %s.\n", i == 1 ? "stdout":"stderr"); else if(r>0) { buffer[r] = '\0'; add_string(mpriv,buffer); @@ -296,9 +296,9 @@ static int run_shell_cmd(menu_t* menu, char* cmd) { #ifndef __MINGW32__ int in[2],out[2],err[2]; - mp_tmsg(MSGT_GLOBAL,MSGL_INFO,MSGTR_LIBMENU_ConsoleRun,cmd); + mp_tmsg(MSGT_GLOBAL,MSGL_INFO,"[MENU] Console run: %s ...\n",cmd); if(mpriv->child) { - mp_tmsg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_AChildIsAlreadyRunning); + mp_tmsg(MSGT_GLOBAL,MSGL_ERR,"[MENU] A child is already running.\n"); return 0; } @@ -308,7 +308,7 @@ static int run_shell_cmd(menu_t* menu, char* cmd) { mpriv->child = fork(); if(mpriv->child < 0) { - mp_tmsg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_ForkFailed); + mp_tmsg(MSGT_GLOBAL,MSGL_ERR,"[MENU] Fork failed !!!\n"); close_pipe(in); close_pipe(out); close_pipe(err); @@ -382,14 +382,14 @@ static void read_cmd(menu_t* menu,int cmd) { while(l > 0) { int w = write(mpriv->child_fd[0],str,l); if(w < 0) { - mp_tmsg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_WriteError); + mp_tmsg(MSGT_GLOBAL,MSGL_ERR,"[MENU] write error\n"); break; } l -= w; str += w; } if(write(mpriv->child_fd[0],"\n",1) < 0) - mp_tmsg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_WriteError); + mp_tmsg(MSGT_GLOBAL,MSGL_ERR,"[MENU] write error\n"); enter_cmd(menu); return; } diff --git a/libmenu/menu_filesel.c b/libmenu/menu_filesel.c index 734e61bbb4..8c562e0871 100644 --- a/libmenu/menu_filesel.c +++ b/libmenu/menu_filesel.c @@ -249,7 +249,7 @@ static int open_dir(menu_t* menu,char* args) { mpriv->p.title = replace_path(mpriv->title,mpriv->dir,0); if ((dirp = opendir (mpriv->dir)) == NULL){ - mp_tmsg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_OpendirError, strerror(errno)); + mp_tmsg(MSGT_GLOBAL,MSGL_ERR,"[MENU] opendir error: %s\n", strerror(errno)); return 0; } @@ -291,7 +291,7 @@ static int open_dir(menu_t* menu,char* args) { if(n%20 == 0){ // Get some more mem if((tp = (char **) realloc(namelist, (n+20) * sizeof (char *))) == NULL) { - mp_tmsg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_ReallocError, strerror(errno)); + mp_tmsg(MSGT_GLOBAL,MSGL_ERR,"[MENU] realloc error: %s\n", strerror(errno)); n--; goto bailout; } @@ -300,7 +300,7 @@ static int open_dir(menu_t* menu,char* args) { namelist[n] = (char *) malloc(strlen(dp->d_name) + 2); if(namelist[n] == NULL){ - mp_tmsg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_MallocError, strerror(errno)); + mp_tmsg(MSGT_GLOBAL,MSGL_ERR,"[MENU] memory allocation error: %s\n", strerror(errno)); n--; goto bailout; } @@ -318,7 +318,7 @@ bailout: qsort(namelist, n, sizeof(char *), (kill_warn)compare); if (n < 0) { - mp_tmsg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_ReaddirError,strerror(errno)); + mp_tmsg(MSGT_GLOBAL,MSGL_ERR,"[MENU] readdir error: %s\n",strerror(errno)); return 0; } while(n--) { @@ -329,7 +329,7 @@ bailout: e->d = 1; menu_list_add_entry(menu,e); }else{ - mp_tmsg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_MallocError, strerror(errno)); + mp_tmsg(MSGT_GLOBAL,MSGL_ERR,"[MENU] memory allocation error: %s\n", strerror(errno)); } free(namelist[n]); } @@ -368,7 +368,7 @@ static void read_cmd(menu_t* menu,int cmd) { } menu_list_uninit(menu,free_entry); if(!open_dir(menu,p)) { - mp_tmsg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_CantOpenDirectory,p); + mp_tmsg(MSGT_GLOBAL,MSGL_ERR,"[MENU] Can't open directory %s.\n",p); menu->cl = 1; } free(p); diff --git a/libmenu/menu_param.c b/libmenu/menu_param.c index af828c20f0..7e3a4f1a1c 100644 --- a/libmenu/menu_param.c +++ b/libmenu/menu_param.c @@ -117,13 +117,13 @@ static int parse_args(menu_t* menu,char* args) { while(1) { r = asx_get_element(parser,&args,&element,&body,&attribs); if(r < 0) { - mp_tmsg(MSGT_OSD_MENU,MSGL_ERR,MSGTR_LIBMENU_SyntaxErrorAtLine,parser->line); + mp_tmsg(MSGT_OSD_MENU,MSGL_ERR,"[MENU] syntax error at line: %d\n",parser->line); asx_parser_free(parser); return -1; } else if(r == 0) { asx_parser_free(parser); if(!m) - mp_tmsg(MSGT_OSD_MENU,MSGL_WARN,MSGTR_LIBMENU_NoEntryFoundInTheMenuDefinition); + mp_tmsg(MSGT_OSD_MENU,MSGL_WARN,"[MENU] No entry found in the menu definition.\n"); m = calloc(1,sizeof(struct list_entry_s)); m->p.txt = strdup("Back"); menu_list_add_entry(menu,m); @@ -132,7 +132,7 @@ static int parse_args(menu_t* menu,char* args) { if(!strcmp(element,"menu")) { name = asx_get_attrib("menu",attribs); if(!name) { - mp_tmsg(MSGT_OSD_MENU,MSGL_WARN,MSGTR_LIBMENU_SubmenuDefinitionNeedAMenuAttribut); + mp_tmsg(MSGT_OSD_MENU,MSGL_WARN,"[MENU] Submenu definition needs a 'menu' attribute.\n"); goto next_element; } m = calloc(1,sizeof(struct list_entry_s)); @@ -147,13 +147,13 @@ static int parse_args(menu_t* menu,char* args) { name = asx_get_attrib("property",attribs); opt = NULL; if(name && mp_property_do(name,M_PROPERTY_GET_TYPE,&opt,menu->ctx) <= 0) { - mp_tmsg(MSGT_OSD_MENU,MSGL_WARN,MSGTR_LIBMENU_InvalidProperty, + mp_tmsg(MSGT_OSD_MENU,MSGL_WARN,"[MENU] Invalid property '%s' in pref menu entry. (line %d).\n", name,parser->line); goto next_element; } txt = asx_get_attrib("txt",attribs); if(!(name || txt)) { - mp_tmsg(MSGT_OSD_MENU,MSGL_WARN,MSGTR_LIBMENU_PrefMenuEntryDefinitionsNeed,parser->line); + mp_tmsg(MSGT_OSD_MENU,MSGL_WARN,"[MENU] Pref menu entry definitions need a valid 'property' or 'txt' attribute (line %d).\n",parser->line); if(txt) free(txt), txt = NULL; goto next_element; } @@ -278,7 +278,7 @@ static int openMenu(menu_t* menu, char* args) { if(!args) { - mp_tmsg(MSGT_OSD_MENU,MSGL_ERR,MSGTR_LIBMENU_PrefMenuNeedsAnArgument); + mp_tmsg(MSGT_OSD_MENU,MSGL_ERR,"[MENU] Pref menu needs an argument.\n"); return 0; } diff --git a/libmenu/menu_pt.c b/libmenu/menu_pt.c index 67e129d7ca..3378d93d64 100644 --- a/libmenu/menu_pt.c +++ b/libmenu/menu_pt.c @@ -98,7 +98,7 @@ static void read_cmd(menu_t* menu,int cmd) { d--; } if(i == NULL) { - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_CantfindTheTargetItem); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] Can't find the target item ????\n"); break; } } @@ -111,7 +111,7 @@ static void read_cmd(menu_t* menu,int cmd) { mp_input_queue_cmd(menu->input_ctx, c); } else - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_FailedToBuildCommand,str); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] Failed to build command: %s.\n",str); } break; default: menu_list_read_cmd(menu,cmd); diff --git a/libmenu/menu_txt.c b/libmenu/menu_txt.c index 4ebc4e3355..4ce2ce487c 100644 --- a/libmenu/menu_txt.c +++ b/libmenu/menu_txt.c @@ -141,13 +141,13 @@ static int open_txt(menu_t* menu, char* args) { menu->read_cmd = read_cmd; if(!mpriv->file) { - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_MenuTxtNeedATxtFileName); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] Text menu needs a textfile name (parameter file).\n"); return 0; } fd = fopen(mpriv->file,"r"); if(!fd) { - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_MenuTxtCantOpen,mpriv->file); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] Can't open %s.\n",mpriv->file); return 0; } @@ -178,7 +178,7 @@ static int open_txt(menu_t* menu, char* args) { mpriv->num_lines++; } if(pos >= BUF_SIZE-1) { - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_WarningTooLongLineSplitting); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] Warning, line too long. Splitting it.\n"); mpriv->lines = realloc(mpriv->lines,(mpriv->num_lines + 1)*sizeof(char*)); mpriv->lines[mpriv->num_lines] = strdup(buf); mpriv->num_lines++; @@ -186,7 +186,7 @@ static int open_txt(menu_t* menu, char* args) { } } - mp_tmsg(MSGT_GLOBAL,MSGL_INFO,MSGTR_LIBMENU_ParsedLines,mpriv->num_lines); + mp_tmsg(MSGT_GLOBAL,MSGL_INFO,"[MENU] Parsed %d lines.\n",mpriv->num_lines); return 1; } diff --git a/libmenu/vf_menu.c b/libmenu/vf_menu.c index 2eadad6741..84b9197aa7 100644 --- a/libmenu/vf_menu.c +++ b/libmenu/vf_menu.c @@ -99,7 +99,7 @@ static int cmd_filter(mp_cmd_t* cmd, int paused, struct vf_priv_s * priv) { else if(strcmp(arg,"hide") == 0 || strcmp(arg,"toggle") == 0) priv->current->show = 0; else - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_UnknownMenuCommand,arg); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] Unknown command: '%s'.\n",arg); return 1; } case MP_CMD_SET_MENU : { @@ -107,7 +107,7 @@ static int cmd_filter(mp_cmd_t* cmd, int paused, struct vf_priv_s * priv) { menu_t* l = priv->current; priv->current = menu_open(menu); if(!priv->current) { - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_FailedToOpenMenu,menu); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] Failed to open menu: '%s'.\n",menu); priv->current = l; priv->current->show = 0; } else { diff --git a/libmpcodecs/ad_acm.c b/libmpcodecs/ad_acm.c index 16f6f11623..870c9a986f 100644 --- a/libmpcodecs/ad_acm.c +++ b/libmpcodecs/ad_acm.c @@ -59,7 +59,7 @@ static int preinit(sh_audio_t *sh_audio) priv->o_wf = malloc(sizeof(WAVEFORMATEX)); if (!priv->o_wf) { - mp_tmsg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_ACMiniterror); + mp_tmsg(MSGT_DECAUDIO,MSGL_ERR,"Could not load/initialize Win32/ACM audio codec (missing DLL file?).\n"); return 0; } @@ -90,7 +90,7 @@ static int preinit(sh_audio_t *sh_audio) else mp_msg(MSGT_WIN32, MSGL_ERR, "ACM_Decoder: acmStreamOpen error: %d\n", (int)ret); - mp_tmsg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_ACMiniterror); + mp_tmsg(MSGT_DECAUDIO,MSGL_ERR,"Could not load/initialize Win32/ACM audio codec (missing DLL file?).\n"); return 0; } mp_msg(MSGT_WIN32, MSGL_V, "Audio codec opened OK! ;-)\n"); diff --git a/libmpcodecs/ad_dmo.c b/libmpcodecs/ad_dmo.c index 4b520ad8c1..d329caadaf 100644 --- a/libmpcodecs/ad_dmo.c +++ b/libmpcodecs/ad_dmo.c @@ -34,7 +34,7 @@ static int preinit(sh_audio_t *sh_audio) audio_output_channels : (sh_audio->wf->nChannels>=2 ? 2 : 1); if(!(ds_adec=DMO_AudioDecoder_Open(sh_audio->codec->dll,&sh_audio->codec->guid,sh_audio->wf,chans))) { - mp_tmsg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_MissingDLLcodec,sh_audio->codec->dll); + mp_tmsg(MSGT_DECAUDIO,MSGL_ERR,"ERROR: Could not open required DirectShow codec %s.\n",sh_audio->codec->dll); return 0; } sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec; diff --git a/libmpcodecs/ad_dshow.c b/libmpcodecs/ad_dshow.c index 5811efef03..db6a98cbee 100644 --- a/libmpcodecs/ad_dshow.c +++ b/libmpcodecs/ad_dshow.c @@ -31,7 +31,7 @@ static int preinit(sh_audio_t *sh_audio) DS_AudioDecoder* ds_adec; if(!(ds_adec=DS_AudioDecoder_Open(sh_audio->codec->dll,&sh_audio->codec->guid,sh_audio->wf))) { - mp_tmsg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_MissingDLLcodec,sh_audio->codec->dll); + mp_tmsg(MSGT_DECAUDIO,MSGL_ERR,"ERROR: Could not open required DirectShow codec %s.\n",sh_audio->codec->dll); return 0; } sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec; diff --git a/libmpcodecs/ad_dvdpcm.c b/libmpcodecs/ad_dvdpcm.c index cb61b8e24d..943ce73bf0 100644 --- a/libmpcodecs/ad_dvdpcm.c +++ b/libmpcodecs/ad_dvdpcm.c @@ -38,7 +38,7 @@ static int init(sh_audio_t *sh) sh->samplesize = 2; break; case 1: - mp_tmsg(MSGT_DECAUDIO, MSGL_INFO, MSGTR_SamplesWanted); + mp_tmsg(MSGT_DECAUDIO, MSGL_INFO, "Samples of this format are needed to improve support. Please contact the developers.\n"); sh->i_bps = sh->channels * sh->samplerate * 5 / 2; case 2: sh->sample_format = AF_FORMAT_S24_BE; diff --git a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c index 2e2d6c67b1..af512368a5 100644 --- a/libmpcodecs/ad_ffmpeg.c +++ b/libmpcodecs/ad_ffmpeg.c @@ -49,7 +49,7 @@ static int init(sh_audio_t *sh_audio) lavc_codec = (AVCodec *)avcodec_find_decoder_by_name(sh_audio->codec->dll); if(!lavc_codec){ - mp_tmsg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_MissingLAVCcodec,sh_audio->codec->dll); + mp_tmsg(MSGT_DECAUDIO,MSGL_ERR,"Cannot find codec '%s' in libavcodec...\n",sh_audio->codec->dll); return 0; } @@ -88,7 +88,7 @@ static int init(sh_audio_t *sh_audio) /* open it */ if (avcodec_open(lavc_context, lavc_codec) < 0) { - mp_tmsg(MSGT_DECAUDIO,MSGL_ERR, MSGTR_CantOpenCodec); + mp_tmsg(MSGT_DECAUDIO,MSGL_ERR, "Could not open codec.\n"); return 0; } mp_msg(MSGT_DECAUDIO,MSGL_V,"INFO: libavcodec init OK!\n"); @@ -138,7 +138,7 @@ static void uninit(sh_audio_t *sh) AVCodecContext *lavc_context = sh->context; if (avcodec_close(lavc_context) < 0) - mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, MSGTR_CantCloseCodec); + mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, "Could not close codec.\n"); av_freep(&lavc_context->extradata); av_freep(&lavc_context); } diff --git a/libmpcodecs/ad_libdv.c b/libmpcodecs/ad_libdv.c index 364facbc07..b6f077b844 100644 --- a/libmpcodecs/ad_libdv.c +++ b/libmpcodecs/ad_libdv.c @@ -86,7 +86,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) - mp_tmsg(MSGT_GLOBAL,MSGL_WARN,MSGTR_MPCODECS_AudioFramesizeDiffers, + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[AD_LIBDV] Warning! Audio framesize differs! read=%d hdr=%d.\n", xx, decoder->frame_size); if (dv_decode_full_audio(decoder, dv_audio_frame,(int16_t**) audioBuffers)) diff --git a/libmpcodecs/ad_realaud.c b/libmpcodecs/ad_realaud.c index 4d964db4d4..e5cab0763e 100644 --- a/libmpcodecs/ad_realaud.c +++ b/libmpcodecs/ad_realaud.c @@ -218,7 +218,7 @@ static int preinit(sh_audio_t *sh){ if (!load_syms_windows(sh->codec->dll)) #endif { - mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, MSGTR_MissingDLLcodec, sh->codec->dll); + mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, "ERROR: Could not open required DirectShow codec %s.\n", sh->codec->dll); mp_msg(MSGT_DECVIDEO, MSGL_HINT, "Read the RealAudio section of the DOCS!\n"); free(path); return 0; diff --git a/libmpcodecs/ae_lame.c b/libmpcodecs/ae_lame.c index 663f619649..6300a68efb 100644 --- a/libmpcodecs/ae_lame.c +++ b/libmpcodecs/ae_lame.c @@ -39,6 +39,55 @@ static char* lame_param_preset=NULL; // unset static int lame_presets_set( lame_t gfp, int fast, int cbr, const char* preset_name ); #endif +#define MEncoderMP3LameHelp _("\n\n"\ +" vbr=<0-4> variable bitrate method\n"\ +" 0: cbr (constant bitrate)\n"\ +" 1: mt (Mark Taylor VBR algorithm)\n"\ +" 2: rh (Robert Hegemann VBR algorithm - default)\n"\ +" 3: abr (average bitrate)\n"\ +" 4: mtrh (Mark Taylor Robert Hegemann VBR algorithm)\n"\ +"\n"\ +" abr average bitrate\n"\ +"\n"\ +" cbr constant bitrate\n"\ +" Also forces CBR mode encoding on subsequent ABR presets modes.\n"\ +"\n"\ +" br=<0-1024> specify bitrate in kBit (CBR and ABR only)\n"\ +"\n"\ +" q=<0-9> quality (0-highest, 9-lowest) (only for VBR)\n"\ +"\n"\ +" aq=<0-9> algorithmic quality (0-best/slowest, 9-worst/fastest)\n"\ +"\n"\ +" ratio=<1-100> compression ratio\n"\ +"\n"\ +" vol=<0-10> set audio input gain\n"\ +"\n"\ +" mode=<0-3> (default: auto)\n"\ +" 0: stereo\n"\ +" 1: joint-stereo\n"\ +" 2: dualchannel\n"\ +" 3: mono\n"\ +"\n"\ +" padding=<0-2>\n"\ +" 0: no\n"\ +" 1: all\n"\ +" 2: adjust\n"\ +"\n"\ +" fast Switch on faster encoding on subsequent VBR presets modes,\n"\ +" slightly lower quality and higher bitrates.\n"\ +"\n"\ +" preset=<value> Provide the highest possible quality settings.\n"\ +" medium: VBR encoding, good quality\n"\ +" (150-180 kbps bitrate range)\n"\ +" standard: VBR encoding, high quality\n"\ +" (170-210 kbps bitrate range)\n"\ +" extreme: VBR encoding, very high quality\n"\ +" (200-240 kbps bitrate range)\n"\ +" insane: CBR encoding, highest preset quality\n"\ +" (320 kbps bitrate)\n"\ +" <8-320>: ABR encoding at average given kbps bitrate.\n\n") + + m_option_t lameopts_conf[]={ {"q", &lame_param_quality, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL}, @@ -64,18 +113,18 @@ m_option_t lameopts_conf[]={ {"fast", "MPlayer was built without -lameopts fast support (requires libmp3lame >=3.92).\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, {"preset", "MPlayer was built without -lameopts preset support (requires libmp3lame >=3.92).\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, #endif - {"help", _(MSGTR_MEncoderMP3LameHelp), CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, + {"help", MEncoderMP3LameHelp, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, {NULL, NULL, 0, 0, 0, 0, NULL} }; static int bind_lame(audio_encoder_t *encoder, muxer_stream_t *mux_a) { - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_MP3AudioSelected); + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "MP3 audio selected.\n"); mux_a->h.dwSampleSize=0; // VBR mux_a->h.dwRate=encoder->params.sample_rate; mux_a->h.dwScale=encoder->params.samples_per_frame; // samples/frame - if(sizeof(MPEGLAYER3WAVEFORMAT)!=30) mp_tmsg(MSGT_MENCODER,MSGL_WARN,MSGTR_MP3WaveFormatSizeNot30,sizeof(MPEGLAYER3WAVEFORMAT)); + if(sizeof(MPEGLAYER3WAVEFORMAT)!=30) mp_tmsg(MSGT_MENCODER,MSGL_WARN,"sizeof(MPEGLAYER3WAVEFORMAT)==%d!=30, maybe broken C compiler?\n",sizeof(MPEGLAYER3WAVEFORMAT)); mux_a->wf=malloc(sizeof(MPEGLAYER3WAVEFORMAT)); // should be 30 mux_a->wf->wFormatTag=0x55; // MP3 mux_a->wf->nChannels= (lame_param_mode<0) ? encoder->params.channels : ((lame_param_mode==3) ? 1 : 2); @@ -143,7 +192,7 @@ static void fixup(audio_encoder_t *encoder) encoder->stream->h.dwRate=encoder->stream->wf->nAvgBytesPerSec; encoder->stream->h.dwScale=1; encoder->stream->wf->nBlockAlign=1; - mp_tmsg(MSGT_MENCODER, MSGL_V, MSGTR_CBRAudioByterate, + mp_tmsg(MSGT_MENCODER, MSGL_V, "\n\nCBR audio: %d bytes/sec, %d bytes/block\n", encoder->stream->h.dwRate,((MPEGLAYER3WAVEFORMAT*)(encoder->stream->wf))->nBlockSize); } } @@ -174,20 +223,23 @@ int mpae_init_lame(audio_encoder_t *encoder) if(lame_param_mode>=0) lame_set_mode(lame,lame_param_mode); // j-st if(lame_param_ratio>0) lame_set_compression_ratio(lame,lame_param_ratio); if(lame_param_scale>0) { - mp_tmsg(MSGT_MENCODER, MSGL_V, MSGTR_SettingAudioInputGain, lame_param_scale); + mp_tmsg(MSGT_MENCODER, MSGL_V, "Setting audio input gain to %f.\n", lame_param_scale); lame_set_scale(lame,lame_param_scale); } if(lame_param_lowpassfreq>=-1) lame_set_lowpassfreq(lame,lame_param_lowpassfreq); if(lame_param_highpassfreq>=-1) lame_set_highpassfreq(lame,lame_param_highpassfreq); #ifdef CONFIG_MP3LAME_PRESET if(lame_param_preset != NULL) { - mp_tmsg(MSGT_MENCODER, MSGL_V, MSGTR_LamePresetEquals,lame_param_preset); + mp_tmsg(MSGT_MENCODER, MSGL_V, "\npreset=%s\n\n",lame_param_preset); if(lame_presets_set(lame,lame_param_fast, (lame_param_vbr==0), lame_param_preset) < 0) return 0; } #endif if(lame_init_params(lame) == -1) { - mp_tmsg(MSGT_MENCODER, MSGL_FATAL, MSGTR_LameCantInit); + mp_tmsg(MSGT_MENCODER, MSGL_FATAL, + "Cannot set LAME options, check bitrate/samplerate, some very low bitrates\n"\ + "(<32) need lower samplerates (i.e. -srate 8000).\n"\ + "If everything else fails, try a preset."); return 0; } if( mp_msg_test(MSGT_MENCODER,MSGL_V) ) { @@ -211,8 +263,87 @@ static int lame_presets_set( lame_t gfp, int fast, int cbr, const char* preset_ int mono = 0; if (strcmp(preset_name, "help") == 0) { - mp_tmsg(MSGT_MENCODER, MSGL_FATAL, MSGTR_LameVersion, get_lame_version(), get_lame_url()); - mp_tmsg(MSGT_MENCODER, MSGL_FATAL, MSGTR_LamePresetsLongInfo); + mp_tmsg(MSGT_MENCODER, MSGL_FATAL, "LAME version %s (%s)\n\n", get_lame_version(), get_lame_url()); + +#define LamePresetsLongInfo _("\n"\ +"The preset switches are designed to provide the highest possible quality.\n"\ +"\n"\ +"They have for the most part been subjected to and tuned via rigorous double\n"\ +"blind listening tests to verify and achieve this objective.\n"\ +"\n"\ +"These are continually updated to coincide with the latest developments that\n"\ +"occur and as a result should provide you with nearly the best quality\n"\ +"currently possible from LAME.\n"\ +"\n"\ +"To activate these presets:\n"\ +"\n"\ +" For VBR modes (generally highest quality):\n"\ +"\n"\ +" \"preset=standard\" This preset should generally be transparent\n"\ +" to most people on most music and is already\n"\ +" quite high in quality.\n"\ +"\n"\ +" \"preset=extreme\" If you have extremely good hearing and similar\n"\ +" equipment, this preset will generally provide\n"\ +" slightly higher quality than the \"standard\"\n"\ +" mode.\n"\ +"\n"\ +" For CBR 320kbps (highest quality possible from the preset switches):\n"\ +"\n"\ +" \"preset=insane\" This preset will usually be overkill for most\n"\ +" people and most situations, but if you must\n"\ +" have the absolute highest quality with no\n"\ +" regard to filesize, this is the way to go.\n"\ +"\n"\ +" For ABR modes (high quality per given bitrate but not as high as VBR):\n"\ +"\n"\ +" \"preset=<kbps>\" Using this preset will usually give you good\n"\ +" quality at a specified bitrate. Depending on the\n"\ +" bitrate entered, this preset will determine the\n"\ +" optimal settings for that particular situation.\n"\ +" While this approach works, it is not nearly as\n"\ +" flexible as VBR, and usually will not attain the\n"\ +" same level of quality as VBR at higher bitrates.\n"\ +"\n"\ +"The following options are also available for the corresponding profiles:\n"\ +"\n"\ +" <fast> standard\n"\ +" <fast> extreme\n"\ +" insane\n"\ +" <cbr> (ABR Mode) - The ABR Mode is implied. To use it,\n"\ +" simply specify a bitrate. For example:\n"\ +" \"preset=185\" activates this\n"\ +" preset and uses 185 as an average kbps.\n"\ +"\n"\ +" \"fast\" - Enables the new fast VBR for a particular profile. The\n"\ +" disadvantage to the speed switch is that often times the\n"\ +" bitrate will be slightly higher than with the normal mode\n"\ +" and quality may be slightly lower also.\n"\ +" Warning: with the current version fast presets might result in too\n"\ +" high bitrate compared to regular presets.\n"\ +"\n"\ +" \"cbr\" - If you use the ABR mode (read above) with a significant\n"\ +" bitrate such as 80, 96, 112, 128, 160, 192, 224, 256, 320,\n"\ +" you can use the \"cbr\" option to force CBR mode encoding\n"\ +" instead of the standard abr mode. ABR does provide higher\n"\ +" quality but CBR may be useful in situations such as when\n"\ +" streaming an MP3 over the internet may be important.\n"\ +"\n"\ +" For example:\n"\ +"\n"\ +" \"-lameopts fast:preset=standard \"\n"\ +" or \"-lameopts cbr:preset=192 \"\n"\ +" or \"-lameopts preset=172 \"\n"\ +" or \"-lameopts preset=extreme \"\n"\ +"\n"\ +"\n"\ +"A few aliases are available for ABR mode:\n"\ +"phone => 16kbps/mono phon+/lw/mw-eu/sw => 24kbps/mono\n"\ +"mw-us => 40kbps/mono voice => 56kbps/mono\n"\ +"fm/radio/tape => 112kbps hifi => 160kbps\n"\ +"cd => 192kbps studio => 256kbps") + + mp_tmsg(MSGT_MENCODER, MSGL_FATAL, LamePresetsLongInfo); return -1; } @@ -307,14 +438,39 @@ static int lame_presets_set( lame_t gfp, int fast, int cbr, const char* preset_ } else { - mp_tmsg(MSGT_MENCODER, MSGL_FATAL, MSGTR_LameVersion, get_lame_version(), get_lame_url()); - mp_tmsg(MSGT_MENCODER, MSGL_FATAL, MSGTR_InvalidBitrateForLamePreset); + mp_tmsg(MSGT_MENCODER, MSGL_FATAL, "LAME version %s (%s)\n\n", get_lame_version(), get_lame_url()); + mp_tmsg(MSGT_MENCODER, MSGL_FATAL, + "Error: The bitrate specified is out of the valid range for this preset.\n"\ + "\n"\ + "When using this mode you must enter a value between \"8\" and \"320\".\n"\ + "\n"\ + "For further information try: \"-lameopts preset=help\"\n"); return -1; } } - mp_tmsg(MSGT_MENCODER, MSGL_FATAL, MSGTR_LameVersion, get_lame_version(), get_lame_url()); - mp_tmsg(MSGT_MENCODER, MSGL_FATAL, MSGTR_InvalidLamePresetOptions); + mp_tmsg(MSGT_MENCODER, MSGL_FATAL, "LAME version %s (%s)\n\n", get_lame_version(), get_lame_url()); +#define InvalidLamePresetOptions _("Error: You did not enter a valid profile and/or options with preset.\n"\ +"\n"\ +"Available profiles are:\n"\ +"\n"\ +" <fast> standard\n"\ +" <fast> extreme\n"\ +" insane\n"\ +" <cbr> (ABR Mode) - The ABR Mode is implied. To use it,\n"\ +" simply specify a bitrate. For example:\n"\ +" \"preset=185\" activates this\n"\ +" preset and uses 185 as an average kbps.\n"\ +"\n"\ +" Some examples:\n"\ +"\n"\ +" \"-lameopts fast:preset=standard \"\n"\ +" or \"-lameopts cbr:preset=192 \"\n"\ +" or \"-lameopts preset=172 \"\n"\ +" or \"-lameopts preset=extreme \"\n"\ +"\n"\ +"For further information try: \"-lameopts preset=help\"\n") + mp_tmsg(MSGT_MENCODER, MSGL_FATAL, InvalidLamePresetOptions); return -1; } #endif diff --git a/libmpcodecs/ae_lavc.c b/libmpcodecs/ae_lavc.c index cd46fdb71c..57f3c29a50 100644 --- a/libmpcodecs/ae_lavc.c +++ b/libmpcodecs/ae_lavc.c @@ -166,7 +166,7 @@ int mpae_init_lavc(audio_encoder_t *encoder) if(!lavc_param_acodec) { - mp_tmsg(MSGT_MENCODER, MSGL_FATAL, MSGTR_NoLavcAudioCodecName); + mp_tmsg(MSGT_MENCODER, MSGL_FATAL, "Audio LAVC, Missing codec name!\n"); return 0; } @@ -179,7 +179,7 @@ int mpae_init_lavc(audio_encoder_t *encoder) lavc_acodec = avcodec_find_encoder_by_name(lavc_param_acodec); if (!lavc_acodec) { - mp_tmsg(MSGT_MENCODER, MSGL_FATAL, MSGTR_LavcAudioCodecNotFound, lavc_param_acodec); + mp_tmsg(MSGT_MENCODER, MSGL_FATAL, "Audio LAVC, couldn't find encoder for codec %s.\n", lavc_param_acodec); return 0; } if(lavc_param_atag == 0) @@ -199,7 +199,7 @@ int mpae_init_lavc(audio_encoder_t *encoder) lavc_actx = avcodec_alloc_context(); if(lavc_actx == NULL) { - mp_tmsg(MSGT_MENCODER, MSGL_FATAL, MSGTR_CouldntAllocateLavcContext); + mp_tmsg(MSGT_MENCODER, MSGL_FATAL, "Audio LAVC, couldn't allocate context!\n"); return 0; } @@ -238,7 +238,7 @@ int mpae_init_lavc(audio_encoder_t *encoder) if(avcodec_open(lavc_actx, lavc_acodec) < 0) { - mp_tmsg(MSGT_MENCODER, MSGL_FATAL, MSGTR_CouldntOpenCodec, lavc_param_acodec, lavc_param_abitrate); + mp_tmsg(MSGT_MENCODER, MSGL_FATAL, "Couldn't open codec %s, br=%d.\n", lavc_param_acodec, lavc_param_abitrate); return 0; } diff --git a/libmpcodecs/dec_audio.c b/libmpcodecs/dec_audio.c index 5525610ca2..78dddbf05f 100644 --- a/libmpcodecs/dec_audio.c +++ b/libmpcodecs/dec_audio.c @@ -34,7 +34,7 @@ af_cfg_t af_cfg = { 1, NULL }; // Configuration for audio filters void afm_help(void) { int i; - mp_tmsg(MSGT_DECAUDIO, MSGL_INFO, MSGTR_AvailableAudioFm); + mp_tmsg(MSGT_DECAUDIO, MSGL_INFO, "Available (compiled-in) audio codec families/drivers:\n"); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AUDIO_DRIVERS\n"); mp_msg(MSGT_DECAUDIO, MSGL_INFO, " afm: info: (comment)\n"); for (i = 0; mpcodecs_ad_drivers[i] != NULL; i++) @@ -61,14 +61,14 @@ static int init_audio_codec(sh_audio_t *sh_audio) } } if (!sh_audio->ad_driver->preinit(sh_audio)) { - mp_tmsg(MSGT_DECAUDIO, MSGL_ERR, MSGTR_ADecoderPreinitFailed); + mp_tmsg(MSGT_DECAUDIO, MSGL_ERR, "ADecoder preinit failed :(\n"); return 0; } /* allocate audio in buffer: */ if (sh_audio->audio_in_minsize > 0) { sh_audio->a_in_buffer_size = sh_audio->audio_in_minsize; - mp_tmsg(MSGT_DECAUDIO, MSGL_V, MSGTR_AllocatingBytesForInputBuffer, + mp_tmsg(MSGT_DECAUDIO, MSGL_V, "dec_audio: Allocating %d bytes for input buffer.\n", sh_audio->a_in_buffer_size); sh_audio->a_in_buffer = av_mallocz(sh_audio->a_in_buffer_size); sh_audio->a_in_buffer_len = 0; @@ -76,18 +76,18 @@ static int init_audio_codec(sh_audio_t *sh_audio) sh_audio->a_buffer_size = sh_audio->audio_out_minsize + MAX_OUTBURST; - mp_tmsg(MSGT_DECAUDIO, MSGL_V, MSGTR_AllocatingBytesForOutputBuffer, + mp_tmsg(MSGT_DECAUDIO, MSGL_V, "dec_audio: Allocating %d + %d = %d bytes for output buffer.\n", sh_audio->audio_out_minsize, MAX_OUTBURST, sh_audio->a_buffer_size); sh_audio->a_buffer = av_mallocz(sh_audio->a_buffer_size); if (!sh_audio->a_buffer) { - mp_tmsg(MSGT_DECAUDIO, MSGL_ERR, MSGTR_CantAllocAudioBuf); + mp_tmsg(MSGT_DECAUDIO, MSGL_ERR, "Cannot allocate audio out buffer.\n"); return 0; } sh_audio->a_buffer_len = 0; if (!sh_audio->ad_driver->init(sh_audio)) { - mp_tmsg(MSGT_DECAUDIO, MSGL_WARN, MSGTR_ADecoderInitFailed); + mp_tmsg(MSGT_DECAUDIO, MSGL_WARN, "ADecoder init failed :(\n"); uninit_audio(sh_audio); // free buffers return 0; } @@ -95,7 +95,7 @@ static int init_audio_codec(sh_audio_t *sh_audio) sh_audio->initialized = 1; if (!sh_audio->channels || !sh_audio->samplerate) { - mp_tmsg(MSGT_DECAUDIO, MSGL_WARN, MSGTR_UnknownAudio); + mp_tmsg(MSGT_DECAUDIO, MSGL_WARN, "Unknown/missing audio format -> no sound\n"); uninit_audio(sh_audio); // free buffers return 0; } @@ -199,17 +199,17 @@ static int init_audio(sh_audio_t *sh_audio, char *codecname, char *afm, #endif if (!mpadec) { // driver not available (==compiled in) mp_tmsg(MSGT_DECAUDIO, MSGL_ERR, - MSGTR_AudioCodecFamilyNotAvailableStr, + "Requested audio codec family [%s] (afm=%s) not available.\nEnable it at compilation.\n", sh_audio->codec->name, sh_audio->codec->drv); continue; } // it's available, let's try to init! // init() - mp_tmsg(MSGT_DECAUDIO, MSGL_INFO, MSGTR_OpeningAudioDecoder, + mp_tmsg(MSGT_DECAUDIO, MSGL_INFO, "Opening audio decoder: [%s] %s\n", mpadec->info->short_name, mpadec->info->name); sh_audio->ad_driver = mpadec; if (!init_audio_codec(sh_audio)) { - mp_tmsg(MSGT_DECAUDIO, MSGL_INFO, MSGTR_ADecoderInitFailed); + mp_tmsg(MSGT_DECAUDIO, MSGL_INFO, "ADecoder init failed :(\n"); continue; // try next... } // Yeah! We got it! @@ -237,7 +237,7 @@ int init_best_audio_codec(sh_audio_t *sh_audio, char **audio_codec_list, stringset_add(&selected, audio_codec + 1); } else { // forced codec by name: - mp_tmsg(MSGT_DECAUDIO, MSGL_INFO, MSGTR_ForcedAudioCodec, + mp_tmsg(MSGT_DECAUDIO, MSGL_INFO, "Forced audio codec: %s\n", audio_codec); init_audio(sh_audio, audio_codec, NULL, -1, &selected); } @@ -250,7 +250,7 @@ int init_best_audio_codec(sh_audio_t *sh_audio, char **audio_codec_list, // try first the preferred codec families: while (!sh_audio->initialized && *fmlist) { char *audio_fm = *(fmlist++); - mp_tmsg(MSGT_DECAUDIO, MSGL_INFO, MSGTR_TryForceAudioFmtStr, + mp_tmsg(MSGT_DECAUDIO, MSGL_INFO, "Trying to force audio codec driver family %s...\n", audio_fm); for (status = CODECS_STATUS__MAX; status >= CODECS_STATUS__MIN; --status) @@ -268,12 +268,12 @@ int init_best_audio_codec(sh_audio_t *sh_audio, char **audio_codec_list, stringset_free(&selected); if (!sh_audio->initialized) { - mp_tmsg(MSGT_DECAUDIO, MSGL_ERR, MSGTR_CantFindAudioCodec, + mp_tmsg(MSGT_DECAUDIO, MSGL_ERR, "Cannot find codec for audio format 0x%X.\n", sh_audio->format); return 0; // failed } - mp_tmsg(MSGT_DECAUDIO, MSGL_INFO, MSGTR_SelectedAudioCodec, + mp_tmsg(MSGT_DECAUDIO, MSGL_INFO, "Selected audio codec: [%s] afm: %s (%s)\n", sh_audio->codec->name, sh_audio->codec->drv, sh_audio->codec->info); return 1; // success } @@ -287,7 +287,7 @@ void uninit_audio(sh_audio_t *sh_audio) sh_audio->afilter = NULL; } if (sh_audio->initialized) { - mp_tmsg(MSGT_DECAUDIO, MSGL_V, MSGTR_UninitAudioStr, + mp_tmsg(MSGT_DECAUDIO, MSGL_V, "Uninit audio: %s\n", sh_audio->codec->drv); sh_audio->ad_driver->uninit(sh_audio); #ifdef CONFIG_DYNAMIC_PLUGINS @@ -327,7 +327,7 @@ int init_audio_filters(sh_audio_t *sh_audio, int in_samplerate, // filter config: memcpy(&afs->cfg, &af_cfg, sizeof(af_cfg_t)); - mp_tmsg(MSGT_DECAUDIO, MSGL_V, MSGTR_BuildingAudioFilterChain, + mp_tmsg(MSGT_DECAUDIO, MSGL_V, "Building audio filter chain for %dHz/%dch/%s -> %dHz/%dch/%s...\n", afs->input.rate, afs->input.nch, af_fmt2str_short(afs->input.format), afs->output.rate, afs->output.nch, af_fmt2str_short(afs->output.format)); diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c index 23a47992f3..0a258fabcb 100644 --- a/libmpcodecs/dec_video.c +++ b/libmpcodecs/dec_video.c @@ -47,7 +47,7 @@ int get_video_quality_max(sh_video_t *sh_video) if (vf) { int ret = vf->control(vf, VFCTRL_QUERY_MAX_PP_LEVEL, NULL); if (ret > 0) { - mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_UsingExternalPP, ret); + mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, "[PP] Using external postprocessing filter, max q = %d.\n", ret); return ret; } } @@ -55,7 +55,7 @@ int get_video_quality_max(sh_video_t *sh_video) if (vd) { int ret = vd->control(sh_video, VDCTRL_QUERY_MAX_PP_LEVEL, NULL); if (ret > 0) { - mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_UsingCodecPP, ret); + mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, "[PP] Using codec's postprocessing, max q = %d.\n", ret); return ret; } } @@ -95,7 +95,7 @@ int set_video_colors(sh_video_t *sh_video, const char *item, int value) vd->control(sh_video, VDCTRL_SET_EQUALIZER, item, (int *) value) == CONTROL_OK) return 1; - mp_tmsg(MSGT_DECVIDEO, MSGL_V, MSGTR_VideoAttributeNotSupportedByVO_VD, + mp_tmsg(MSGT_DECVIDEO, MSGL_V, "Video attribute '%s' is not supported by selected vo & vd.\n", item); return 0; } @@ -166,7 +166,7 @@ void uninit_video(sh_video_t *sh_video) { if (!sh_video->initialized) return; - mp_tmsg(MSGT_DECVIDEO, MSGL_V, MSGTR_UninitVideoStr, sh_video->codec->drv); + mp_tmsg(MSGT_DECVIDEO, MSGL_V, "Uninit video: %s\n", sh_video->codec->drv); sh_video->vd_driver->uninit(sh_video); #ifdef CONFIG_DYNAMIC_PLUGINS if (sh_video->dec_handle) @@ -179,7 +179,7 @@ void uninit_video(sh_video_t *sh_video) void vfm_help(void) { int i; - mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_AvailableVideoFm); + mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, "Available (compiled-in) video codec families/drivers:\n"); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VIDEO_DRIVERS\n"); mp_msg(MSGT_DECVIDEO, MSGL_INFO, " vfm: info: (comment)\n"); for (i = 0; mpcodecs_vd_drivers[i] != NULL; i++) @@ -269,7 +269,7 @@ static int init_video(sh_video_t *sh_video, char *codecname, char *vfm, #endif if (!sh_video->vd_driver) { // driver not available (==compiled in) mp_tmsg(MSGT_DECVIDEO, MSGL_WARN, - _(MSGTR_VideoCodecFamilyNotAvailableStr), + _("Requested video codec family [%s] (vfm=%s) not available.\nEnable it at compilation.\n"), sh_video->codec->name, sh_video->codec->drv); continue; } @@ -290,13 +290,13 @@ static int init_video(sh_video_t *sh_video, char *codecname, char *vfm, // init() const struct vd_functions *vd = sh_video->vd_driver; - mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_OpeningVideoDecoder, + mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, "Opening video decoder: [%s] %s\n", vd->info->short_name, vd->info->name); // clear vf init error, it is no longer relevant if (sh_video->vf_initialized < 0) sh_video->vf_initialized = 0; if (!vd->init(sh_video)) { - mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_VDecoderInitFailed); + mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, "VDecoder init failed :(\n"); sh_video->disp_w = orig_w; sh_video->disp_h = orig_h; if (sh_video->bih) { @@ -331,7 +331,7 @@ int init_best_video_codec(sh_video_t *sh_video, char **video_codec_list, stringset_add(&selected, video_codec + 1); } else { // forced codec by name: - mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_ForcedVideoCodec, + mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, "Forced video codec: %s\n", video_codec); init_video(sh_video, video_codec, NULL, -1, &selected); } @@ -343,7 +343,7 @@ int init_best_video_codec(sh_video_t *sh_video, char **video_codec_list, // try first the preferred codec families: while (!sh_video->initialized && *fmlist) { char *video_fm = *(fmlist++); - mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_TryForceVideoFmtStr, + mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, "Trying to force video codec driver family %s...\n", video_fm); for (status = CODECS_STATUS__MAX; status >= CODECS_STATUS__MIN; --status) @@ -362,12 +362,12 @@ int init_best_video_codec(sh_video_t *sh_video, char **video_codec_list, stringset_free(&selected); if (!sh_video->initialized) { - mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, MSGTR_CantFindVideoCodec, + mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, "Cannot find codec matching selected -vo and video format 0x%X.\n", sh_video->format); return 0; // failed } - mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_SelectedVideoCodec, + mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, "Selected video codec: [%s] vfm: %s (%s)\n", sh_video->codec->name, sh_video->codec->drv, sh_video->codec->info); return 1; // success } diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c index 3c8391124c..62a3fcbdda 100644 --- a/libmpcodecs/vd.c +++ b/libmpcodecs/vd.c @@ -121,7 +121,7 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h, if (!sh->disp_w || !sh->disp_h) return 0; - mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_VoConfigRequest, w, h, + mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, "VDec: vo config request - %d x %d (preferred colorspace: %s)\n", w, h, vo_format_name(preferred_outfmt)); if (get_video_quality_max(sh) <= 0 && divx_quality) { @@ -177,7 +177,7 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h, if (j < 0) { // TODO: no match - we should use conversion... if (strcmp(vf->info->name, "scale") && palette != -1) { - mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_CouldNotFindColorspace); + mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, "Could not find matching colorspace - retrying with -vf scale...\n"); sc = vf = vf_open_filter(opts, vf, "scale", NULL); goto csp_again; } else if (palette == 1) { @@ -208,12 +208,15 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h, goto csp_again; } } - mp_tmsg(MSGT_CPLAYER, MSGL_WARN, MSGTR_VOincompCodec); + mp_tmsg(MSGT_CPLAYER, MSGL_WARN, + "The selected video_out device is incompatible with this codec.\n"\ + "Try appending the scale filter to your filter list,\n"\ + "e.g. -vf spp,scale instead of -vf spp.\n"); sh->vf_initialized = -1; return 0; // failed } out_fmt = sh->codec->outfmt[j]; - mp_tmsg(MSGT_CPLAYER, MSGL_INFO, MSGTR_UsingXAsOutputCspNoY, + mp_tmsg(MSGT_CPLAYER, MSGL_INFO, "VDec: using %s as output csp (no %d)\n", vo_format_name(out_fmt), j); sh->outfmtidx = j; sh->vfilter = vf; @@ -269,7 +272,7 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h, } if (sh->aspect > 0.01) { int w; - mp_tmsg(MSGT_CPLAYER, MSGL_INFO, MSGTR_MovieAspectIsSet, + mp_tmsg(MSGT_CPLAYER, MSGL_INFO, "Movie-Aspect is %.2f:1 - prescaling to correct movie aspect.\n", sh->aspect); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VIDEO_ASPECT=%1.4f\n", sh->aspect); @@ -283,7 +286,7 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h, } else screen_size_x = w; // keep new width } else { - mp_tmsg(MSGT_CPLAYER, MSGL_INFO, MSGTR_MovieAspectUndefined); + mp_tmsg(MSGT_CPLAYER, MSGL_INFO, "Movie-Aspect is undefined - no prescaling applied.\n"); } } @@ -303,7 +306,7 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h, if (vf_config_wrapper (vf, sh->disp_w, sh->disp_h, screen_size_x, screen_size_y, vocfg_flags, out_fmt) == 0) { - mp_tmsg(MSGT_CPLAYER, MSGL_WARN, MSGTR_CannotInitVO); + mp_tmsg(MSGT_CPLAYER, MSGL_WARN, "FATAL: Cannot initialize video driver.\n"); sh->vf_initialized = -1; return 0; } diff --git a/libmpcodecs/vd_dmo.c b/libmpcodecs/vd_dmo.c index bac4f1e0b0..4a91187782 100644 --- a/libmpcodecs/vd_dmo.c +++ b/libmpcodecs/vd_dmo.c @@ -30,8 +30,8 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){ static int init(sh_video_t *sh){ unsigned int out_fmt; if(!(sh->context=DMO_VideoDecoder_Open(sh->codec->dll,&sh->codec->guid, sh->bih, 0, 0))){ - mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_MissingDLLcodec,sh->codec->dll); - mp_tmsg(MSGT_DECVIDEO,MSGL_HINT,MSGTR_DownloadCodecPackage); + mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,"ERROR: Could not open required DirectShow codec %s.\n",sh->codec->dll); + mp_tmsg(MSGT_DECVIDEO,MSGL_HINT,"You need to upgrade/install the binary codecs package.\nGo to http://www.mplayerhq.hu/dload.html\n"); return 0; } if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YUY2)) return 0; @@ -50,7 +50,7 @@ static int init(sh_video_t *sh){ DMO_VideoDecoder_SetDestFmt(sh->context,out_fmt&255,0); // RGB/BGR } DMO_VideoDecoder_StartInternal(sh->context); - mp_tmsg(MSGT_DECVIDEO,MSGL_V,MSGTR_DMOInitOK); + mp_tmsg(MSGT_DECVIDEO,MSGL_V,"INFO: Win32/DMO video codec init OK.\n"); return 1; } @@ -76,7 +76,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! - mp_tmsg(MSGT_DECVIDEO,MSGL_WARN,MSGTR_MPCODECS_CouldntAllocateImageForCinepakCodec); + mp_tmsg(MSGT_DECVIDEO,MSGL_WARN,"[VD_DMO] Couldn't allocate image for cinepak codec.\n"); return NULL; } diff --git a/libmpcodecs/vd_dshow.c b/libmpcodecs/vd_dshow.c index 48b4f3d88d..db303c1db4 100644 --- a/libmpcodecs/vd_dshow.c +++ b/libmpcodecs/vd_dshow.c @@ -58,8 +58,8 @@ static int init(sh_video_t *sh){ return 0; if(!(sh->context=DS_VideoDecoder_Open(sh->codec->dll,&sh->codec->guid, sh->bih, 0, 0))){ - mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_MissingDLLcodec,sh->codec->dll); - mp_tmsg(MSGT_DECVIDEO,MSGL_HINT,MSGTR_DownloadCodecPackage); + mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,"ERROR: Could not open required DirectShow codec %s.\n",sh->codec->dll); + mp_tmsg(MSGT_DECVIDEO,MSGL_HINT,"You need to upgrade/install the binary codecs package.\nGo to http://www.mplayerhq.hu/dload.html\n"); return 0; } if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YUY2)) return 0; @@ -79,7 +79,7 @@ static int init(sh_video_t *sh){ } DS_SetAttr_DivX("Quality",divx_quality); DS_VideoDecoder_StartInternal(sh->context); - mp_tmsg(MSGT_DECVIDEO,MSGL_V,MSGTR_DShowInitOK); + mp_tmsg(MSGT_DECVIDEO,MSGL_V,"INFO: Win32/DShow video codec init OK.\n"); return 1; } @@ -105,7 +105,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! - mp_tmsg(MSGT_DECVIDEO,MSGL_WARN,MSGTR_MPCODECS_CouldntAllocateImageForCinepakCodec); + mp_tmsg(MSGT_DECVIDEO,MSGL_WARN,"[VD_DMO] Couldn't allocate image for cinepak codec.\n"); return NULL; } diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index cc8f9bf48e..78d3eb5b7a 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -201,7 +201,7 @@ static void set_format_params(struct AVCodecContext *avctx, enum PixelFormat fmt avctx->release_buffer = release_buffer; avctx->reget_buffer = get_buffer; avctx->draw_horiz_band = draw_slice; - mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_XVMCAcceleratedMPEG2); + mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, "[VD_FFMPEG] XVMC-accelerated MPEG-2.\n"); avctx->slice_flags = SLICE_FLAG_CODED_ORDER|SLICE_FLAG_ALLOW_FIELD; } } @@ -229,7 +229,7 @@ static int init(sh_video_t *sh){ lavc_codec = (AVCodec *)avcodec_find_decoder_by_name(sh->codec->dll); if(!lavc_codec){ - mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, MSGTR_MissingLAVCcodec, sh->codec->dll); + mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, "Cannot find codec '%s' in libavcodec...\n", sh->codec->dll); uninit(sh); return 0; } @@ -254,7 +254,7 @@ static int init(sh_video_t *sh){ #endif /* CONFIG_VDPAU */ #if CONFIG_XVMC if(lavc_codec->capabilities & CODEC_CAP_HWACCEL){ - mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_XVMCAcceleratedCodec); + mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, "[VD_FFMPEG] XVMC accelerated codec.\n"); avctx->get_format= get_format;//for now only this decoder will use it // HACK around badly placed checks in mpeg_mc_decode_init set_format_params(avctx, PIX_FMT_XVMC_MPEG2_IDCT); @@ -394,7 +394,7 @@ static int init(sh_video_t *sh){ avcodec_thread_init(avctx, lavc_param->threads); /* open it */ if (avcodec_open(avctx, lavc_codec) < 0) { - mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, MSGTR_CantOpenCodec); + mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, "Could not open codec.\n"); uninit(sh); return 0; } @@ -415,7 +415,7 @@ static void uninit(sh_video_t *sh){ for(i=1; i<32; i++){ mp_msg(MSGT_DECVIDEO, MSGL_INFO, "QP: %d, count: %d\n", i, ctx->qp_stat[i]); } - mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_ArithmeticMeanOfQP, + mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, "[VD_FFMPEG] Arithmetic mean of QP: %2.4f, Harmonic mean of QP: %2.4f\n", ctx->qp_sum / avctx->coded_frame->coded_picture_number, 1.0/(ctx->inv_qp_sum / avctx->coded_frame->coded_picture_number) ); @@ -423,7 +423,7 @@ static void uninit(sh_video_t *sh){ if (avctx) { if (avctx->codec && avcodec_close(avctx) < 0) - mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, MSGTR_CantCloseCodec); + mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, "Could not close codec.\n"); av_freep(&avctx->extradata); av_freep(&avctx->palctrl); @@ -567,7 +567,7 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){ } else if (!pic->buffer_hints) { if(ctx->b_count>1 || ctx->ip_count>2){ - mp_tmsg(MSGT_DECVIDEO, MSGL_WARN, MSGTR_MPCODECS_DRIFailure); + mp_tmsg(MSGT_DECVIDEO, MSGL_WARN, "[VD_FFMPEG] DRI failure.\n"); ctx->do_dr1=0; //FIXME avctx->get_buffer= avcodec_default_get_buffer; @@ -601,13 +601,13 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){ struct xvmc_pix_fmt *render = mpi->priv; //same as data[2] avctx->draw_horiz_band= draw_slice; if(!avctx->xvmc_acceleration) { - mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_McGetBufferShouldWorkOnlyWithXVMC); + mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, "[VD_FFMPEG] The mc_get_buffer should work only with XVMC acceleration!!"); assert(0); exit(1); // return -1;//!!fixme check error conditions in ffmpeg } if(!(mpi->flags & MP_IMGFLAG_DIRECT)) { - mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, MSGTR_MPCODECS_OnlyBuffersAllocatedByVoXvmcAllowed); + mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, "[VD_FFMPEG] Only buffers allocated by vo_xvmc allowed.\n"); assert(0); exit(1); // return -1;//!!fixme check error conditions in ffmpeg @@ -860,7 +860,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! - mp_tmsg(MSGT_DECVIDEO, MSGL_WARN, MSGTR_MPCODECS_CouldntAllocateImageForCodec); + mp_tmsg(MSGT_DECVIDEO, MSGL_WARN, "[VD_FFMPEG] Couldn't allocate image for codec.\n"); return NULL; } @@ -911,7 +911,7 @@ static enum PixelFormat get_format(struct AVCodecContext *avctx, for(i=0;fmt[i]!=PIX_FMT_NONE;i++){ imgfmt = pixfmt2imgfmt(fmt[i]); if(!IMGFMT_IS_XVMC(imgfmt) && !IMGFMT_IS_VDPAU(imgfmt)) continue; - mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_TryingPixfmt, i); + mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, "[VD_FFMPEG] Trying pixfmt=%d.\n", i); if(init_vo(sh, fmt[i]) >= 0) { break; } diff --git a/libmpcodecs/vd_realvid.c b/libmpcodecs/vd_realvid.c index d9af69f73f..867d1b857d 100644 --- a/libmpcodecs/vd_realvid.c +++ b/libmpcodecs/vd_realvid.c @@ -288,7 +288,7 @@ static int init(sh_video_t *sh){ if (!load_syms_windows(sh->codec->dll)) #endif { - mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_MissingDLLcodec,sh->codec->dll); + mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,"ERROR: Could not open required DirectShow codec %s.\n",sh->codec->dll); mp_msg(MSGT_DECVIDEO,MSGL_HINT,"Read the RealVideo section of the DOCS!\n"); free(path); return 0; diff --git a/libmpcodecs/vd_vfw.c b/libmpcodecs/vd_vfw.c index ec97630d33..0dd42d1ce5 100644 --- a/libmpcodecs/vd_vfw.c +++ b/libmpcodecs/vd_vfw.c @@ -304,7 +304,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! - mp_tmsg(MSGT_DECVIDEO,MSGL_WARN,MSGTR_MPCODECS_CouldntAllocateImageForCinepakCodec); + mp_tmsg(MSGT_DECVIDEO,MSGL_WARN,"[VD_DMO] Couldn't allocate image for cinepak codec.\n"); return NULL; } diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c index 3549c70dc8..44b1029443 100644 --- a/libmpcodecs/ve_lavc.c +++ b/libmpcodecs/ve_lavc.c @@ -531,7 +531,7 @@ static int config(struct vf_instance* vf, lavc_venc_context->flags = 0; if (lavc_param_mb_decision) { - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_MPCODECS_HighQualityEncodingSelected); + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "[VE_LAVC] High quality encoding selected (non-realtime)!\n"); lavc_venc_context->mb_decision= lavc_param_mb_decision; } @@ -683,7 +683,7 @@ static int config(struct vf_instance* vf, /* fixed qscale :p */ if (lavc_param_vqscale >= 0.0) { - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_MPCODECS_UsingConstantQscale, lavc_param_vqscale); + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "[VE_LAVC] Using constant qscale = %f (VBR).\n", lavc_param_vqscale); lavc_venc_context->flags |= CODEC_FLAG_QSCALE; lavc_venc_context->global_quality= vf->priv->pic->quality = (int)(FF_QP2LAMBDA * lavc_param_vqscale + 0.5); @@ -693,7 +693,7 @@ static int config(struct vf_instance* vf, avcodec_thread_init(lavc_venc_context, lavc_param_threads); if (avcodec_open(lavc_venc_context, vf->priv->codec) != 0) { - mp_tmsg(MSGT_MENCODER,MSGL_ERR,MSGTR_CantOpenCodec); + mp_tmsg(MSGT_MENCODER,MSGL_ERR,"Could not open codec.\n"); return 0; } @@ -1041,7 +1041,7 @@ static int vf_open(vf_instance_t *vf, char* args){ vf->priv->codec = (AVCodec *)avcodec_find_encoder_by_name(lavc_param_vcodec); if (!vf->priv->codec) { - mp_tmsg(MSGT_MENCODER,MSGL_ERR,MSGTR_MissingLAVCcodec, lavc_param_vcodec); + mp_tmsg(MSGT_MENCODER,MSGL_ERR,"Cannot find codec '%s' in libavcodec...\n", lavc_param_vcodec); return 0; } diff --git a/libmpcodecs/ve_raw.c b/libmpcodecs/ve_raw.c index f450560cdd..b3bb51b251 100644 --- a/libmpcodecs/ve_raw.c +++ b/libmpcodecs/ve_raw.c @@ -74,7 +74,7 @@ static int set_format(struct vf_instance *vf, unsigned int fmt) { mux_v->bih->biBitCount = 8; break; default: - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_MPCODECS_OutputWithFourccNotSupported, fmt); + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "[VE_RAW] Raw output with FourCC [%x] not supported!\n", fmt); mux_v->bih->biCompression = 0; return 0; } diff --git a/libmpcodecs/ve_vfw.c b/libmpcodecs/ve_vfw.c index 8d300d5ee0..0517666776 100644 --- a/libmpcodecs/ve_vfw.c +++ b/libmpcodecs/ve_vfw.c @@ -84,16 +84,16 @@ static BITMAPINFOHEADER* vfw_open_encoder(char *dll_name, char *compdatafile, BI ret = ICGetInfo(encoder_hic, &icinfo, sizeof(ICINFO)); mp_msg(MSGT_WIN32,MSGL_INFO,"%ld - %ld - %d\n", ret, icinfo.dwSize, sizeof(ICINFO)); - mp_tmsg(MSGT_WIN32,MSGL_INFO,MSGTR_MPCODECS_CompressorType, icinfo.fccType); - mp_tmsg(MSGT_WIN32,MSGL_INFO,MSGTR_MPCODECS_CompressorSubtype, icinfo.fccHandler); - mp_tmsg(MSGT_WIN32,MSGL_INFO,MSGTR_MPCODECS_CompressorFlags, + mp_tmsg(MSGT_WIN32,MSGL_INFO,"Compressor type: %.4lx\n", icinfo.fccType); + mp_tmsg(MSGT_WIN32,MSGL_INFO,"Compressor subtype: %.4lx\n", icinfo.fccHandler); + mp_tmsg(MSGT_WIN32,MSGL_INFO,"Compressor flags: %lu, version %lu, ICM version: %lu\n", icinfo.dwFlags, icinfo.dwVersion, icinfo.dwVersionICM); //printf("Compressor name: %s\n", icinfo.szName); //printf("Compressor description: %s\n", icinfo.szDescription); -mp_tmsg(MSGT_WIN32,MSGL_INFO,MSGTR_MPCODECS_Flags); +mp_tmsg(MSGT_WIN32,MSGL_INFO,"Flags:"); if (icinfo.dwFlags & VIDCF_QUALITY) - mp_tmsg(MSGT_WIN32,MSGL_INFO,MSGTR_MPCODECS_Quality); + mp_tmsg(MSGT_WIN32,MSGL_INFO," quality"); if (icinfo.dwFlags & VIDCF_FASTTEMPORALD) mp_msg(MSGT_WIN32,MSGL_INFO," fast-decompr"); if (icinfo.dwFlags & VIDCF_QUALITYTIME) @@ -340,7 +340,7 @@ static int vf_open(vf_instance_t *vf, char* args){ if (!vfw_param_codec) { - mp_tmsg(MSGT_WIN32,MSGL_WARN, MSGTR_MPCODECS_NoVfwCodecSpecified); + mp_tmsg(MSGT_WIN32,MSGL_WARN, "[VE_RAW] Required VfW codec not specified!!\n"); return 0; } // mux_v->bih=vfw_open_encoder("divxc32.dll",vfw_bih,mmioFOURCC('D', 'I', 'V', '3')); diff --git a/libmpcodecs/vf.c b/libmpcodecs/vf.c index ab90eb77df..7bd14ff831 100644 --- a/libmpcodecs/vf.c +++ b/libmpcodecs/vf.c @@ -450,7 +450,7 @@ vf_instance_t* vf_open_plugin(struct MPOpts *opts, const vf_info_t* const* filte int i; for(i=0;;i++){ if(!filter_list[i]){ - mp_tmsg(MSGT_VFILTER,MSGL_ERR,MSGTR_CouldNotFindVideoFilter,name); + mp_tmsg(MSGT_VFILTER,MSGL_ERR,"Couldn't find video filter '%s'.\n",name); return NULL; // no such filter! } if(!strcmp(filter_list[i]->name,name)) break; @@ -480,7 +480,7 @@ vf_instance_t* vf_open_plugin(struct MPOpts *opts, const vf_info_t* const* filte args = NULL; if(vf->info->open(vf,(char*)args)>0) return vf; // Success! free(vf); - mp_tmsg(MSGT_VFILTER,MSGL_ERR,MSGTR_CouldNotOpenVideoFilter,name); + mp_tmsg(MSGT_VFILTER,MSGL_ERR,"Couldn't open video filter '%s'.\n",name); return NULL; } @@ -496,14 +496,14 @@ vf_instance_t* vf_open_filter(struct MPOpts *opts, vf_instance_t* next, const ch p += sprintf(str,"%s",name); for(i = 0 ; args && args[2*i] ; i++) p += sprintf(p," %s=%s",args[2*i],args[2*i+1]); - mp_tmsg(MSGT_VFILTER,MSGL_INFO,MSGTR_OpeningVideoFilter "[%s]\n",str); + mp_tmsg(MSGT_VFILTER,MSGL_INFO,"Opening video filter: " "[%s]\n",str); } } else if(strcmp(name,"vo")) { if(args && strcmp(args[0],"_oldargs_") == 0) - mp_tmsg(MSGT_VFILTER,MSGL_INFO,MSGTR_OpeningVideoFilter + mp_tmsg(MSGT_VFILTER,MSGL_INFO,"Opening video filter: " "[%s=%s]\n", name,args[1]); else - mp_tmsg(MSGT_VFILTER,MSGL_INFO,MSGTR_OpeningVideoFilter + mp_tmsg(MSGT_VFILTER,MSGL_INFO,"Opening video filter: " "[%s]\n", name); } return vf_open_plugin(opts, filter_list,next,name,args); @@ -626,7 +626,7 @@ int vf_config_wrapper(struct vf_instance* vf, if ((vf->fmt.orig_width != width) || (vf->fmt.orig_height != height) || (vf->fmt.orig_fmt != outfmt)) { - mp_tmsg(MSGT_VFILTER,MSGL_ERR,MSGTR_ResolutionDoesntMatch); + mp_tmsg(MSGT_VFILTER,MSGL_ERR,"\nNew video file has different resolution or colorspace than the previous one.\n"); return 0; } return 1; @@ -656,7 +656,7 @@ int vf_next_config(struct vf_instance* vf, vf->next=vf2; flags=vf->next->query_format(vf->next,outfmt); if(!flags){ - mp_tmsg(MSGT_VFILTER,MSGL_ERR,MSGTR_CannotFindColorspace); + mp_tmsg(MSGT_VFILTER,MSGL_ERR,"Cannot find matching colorspace, even by inserting 'scale' :(\n"); return 0; // FAIL } } diff --git a/libmpcodecs/vf_ass.c b/libmpcodecs/vf_ass.c index f9d6b931e0..904d4deaae 100644 --- a/libmpcodecs/vf_ass.c +++ b/libmpcodecs/vf_ass.c @@ -117,7 +117,7 @@ static void get_image(struct vf_instance* vf, mp_image_t *mpi) if((vf->dmpi->flags & MP_IMGFLAG_DRAW_CALLBACK) && !(vf->dmpi->flags & MP_IMGFLAG_DIRECT)){ - mp_tmsg(MSGT_ASS, MSGL_INFO, MSGTR_MPCODECS_FullDRNotPossible); + mp_tmsg(MSGT_ASS, MSGL_INFO, "Full DR not possible, trying SLICES instead!\n"); return; } @@ -166,7 +166,7 @@ static int prepare_image(struct vf_instance* vf, mp_image_t *mpi) { if(mpi->flags&MP_IMGFLAG_DIRECT || mpi->flags&MP_IMGFLAG_DRAW_CALLBACK){ vf->dmpi = mpi->priv; - if (!vf->dmpi) { mp_tmsg(MSGT_ASS, MSGL_WARN, MSGTR_MPCODECS_FunWhydowegetNULL); return 0; } + if (!vf->dmpi) { mp_tmsg(MSGT_ASS, MSGL_WARN, "Why do we get NULL??\n"); return 0; } mpi->priv = NULL; // we've used DR, so we're ready... if (ass_top_margin) diff --git a/libmpcodecs/vf_crop.c b/libmpcodecs/vf_crop.c index decac69213..0b8eee7d04 100644 --- a/libmpcodecs/vf_crop.c +++ b/libmpcodecs/vf_crop.c @@ -57,7 +57,7 @@ static int config(struct vf_instance* vf, // check: if(vf->priv->crop_w+vf->priv->crop_x>width || vf->priv->crop_h+vf->priv->crop_y>height){ - mp_tmsg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_CropBadPositionWidthHeight); + mp_tmsg(MSGT_VFILTER, MSGL_WARN, "[CROP] Bad position/width/height - cropped area outside of the original!\n"); return 0; } if(!opts->screen_size_x && !opts->screen_size_y){ diff --git a/libmpcodecs/vf_cropdetect.c b/libmpcodecs/vf_cropdetect.c index 3a6b929e7b..e81b46c32a 100644 --- a/libmpcodecs/vf_cropdetect.c +++ b/libmpcodecs/vf_cropdetect.c @@ -125,7 +125,7 @@ if(++vf->priv->fno>2){ // ignore first 2 frames - they may be empty h -= shrink_by; y += (shrink_by / 2 + 1) & ~1; - mp_tmsg(MSGT_VFILTER, MSGL_INFO, MSGTR_MPCODECS_CropArea, + mp_tmsg(MSGT_VFILTER, MSGL_INFO, "[CROP] Crop area: X: %d..%d Y: %d..%d (-vf crop=%d:%d:%d:%d).\n", vf->priv->x1,vf->priv->x2, vf->priv->y1,vf->priv->y2, w,h,x,y); diff --git a/libmpcodecs/vf_expand.c b/libmpcodecs/vf_expand.c index 9175b9a7b7..d0ab49f4f7 100644 --- a/libmpcodecs/vf_expand.c +++ b/libmpcodecs/vf_expand.c @@ -260,7 +260,7 @@ static void get_image(struct vf_instance* vf, mp_image_t *mpi){ #if 1 if((vf->dmpi->flags & MP_IMGFLAG_DRAW_CALLBACK) && !(vf->dmpi->flags & MP_IMGFLAG_DIRECT)){ - mp_tmsg(MSGT_VFILTER, MSGL_INFO, MSGTR_MPCODECS_FullDRNotPossible); + mp_tmsg(MSGT_VFILTER, MSGL_INFO, "Full DR not possible, trying SLICES instead!\n"); return; } #endif @@ -301,7 +301,7 @@ static void start_slice(struct vf_instance* 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)) - mp_tmsg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_WarnNextFilterDoesntSupportSlices); // shouldn't happen. + mp_tmsg(MSGT_VFILTER, MSGL_WARN, "WARNING! Next filter doesn't support SLICES, get ready for sig11...\n"); // shouldn't happen. vf->priv->first_slice = 1; } @@ -367,7 +367,7 @@ static int put_image(struct vf_instance* 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) { mp_tmsg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_FunWhydowegetNULL); return 0; } + if(!vf->dmpi) { mp_tmsg(MSGT_VFILTER, MSGL_WARN, "Why do we get NULL??\n"); return 0; } mpi->priv=NULL; #ifdef OSD_SUPPORT if(vf->priv->osd_enabled) draw_osd(vf,mpi->w,mpi->h); diff --git a/libmpcodecs/vf_format.c b/libmpcodecs/vf_format.c index fe84292c3f..aac8dfd411 100644 --- a/libmpcodecs/vf_format.c +++ b/libmpcodecs/vf_format.c @@ -66,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 - { mp_tmsg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_UnknownFormatName, args);return 0;} + { mp_tmsg(MSGT_VFILTER, MSGL_WARN, "[VF_FORMAT] Unknown format name: '%s'.\n", args);return 0;} } diff --git a/libmpcodecs/vf_framestep.c b/libmpcodecs/vf_framestep.c index 8ef8797257..a0ae4c310e 100644 --- a/libmpcodecs/vf_framestep.c +++ b/libmpcodecs/vf_framestep.c @@ -170,7 +170,7 @@ static int open(vf_instance_t *vf, char* args) if (*args != '\0') { p->frame_step = atoi(args); if (p->frame_step <= 0) { - mp_tmsg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_ErrorParsingArgument); + mp_tmsg(MSGT_VFILTER, MSGL_WARN, "[VF_FRAMESTEP] Error parsing argument.\n"); return 0; } } diff --git a/libmpcodecs/vf_lavc.c b/libmpcodecs/vf_lavc.c index a6caa2e4e9..e2b1ae54af 100644 --- a/libmpcodecs/vf_lavc.c +++ b/libmpcodecs/vf_lavc.c @@ -57,7 +57,7 @@ static int config(struct vf_instance* vf, vf->priv->outbuf = malloc(vf->priv->outbuf_size); if (avcodec_open(&lavc_venc_context, vf->priv->codec) != 0) { - mp_tmsg(MSGT_MENCODER,MSGL_ERR,MSGTR_CantOpenCodec); + mp_tmsg(MSGT_MENCODER,MSGL_ERR,"Could not open codec.\n"); return 0; } @@ -130,7 +130,7 @@ static int open(vf_instance_t *vf, char* args){ vf->priv->codec = (AVCodec *)avcodec_find_encoder_by_name("mpeg1video"); if (!vf->priv->codec) { - mp_tmsg(MSGT_MENCODER,MSGL_ERR,MSGTR_MissingLAVCcodec, "mpeg1video"); + mp_tmsg(MSGT_MENCODER,MSGL_ERR,"Cannot find codec '%s' in libavcodec...\n", "mpeg1video"); return 0; } diff --git a/libmpcodecs/vf_noformat.c b/libmpcodecs/vf_noformat.c index 669506b6ba..5accc265eb 100644 --- a/libmpcodecs/vf_noformat.c +++ b/libmpcodecs/vf_noformat.c @@ -66,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 - { mp_tmsg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_UnknownFormatName, args);return 0;} + { mp_tmsg(MSGT_VFILTER, MSGL_WARN, "[VF_FORMAT] Unknown format name: '%s'.\n", args);return 0;} } diff --git a/libmpcodecs/vf_palette.c b/libmpcodecs/vf_palette.c index 7c59753326..838acd9211 100644 --- a/libmpcodecs/vf_palette.c +++ b/libmpcodecs/vf_palette.c @@ -188,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 { - mp_tmsg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_UnknownFormatName, args); + mp_tmsg(MSGT_VFILTER, MSGL_WARN, "[VF_FORMAT] Unknown format name: '%s'.\n", args); return 0; } } diff --git a/libmpcodecs/vf_test.c b/libmpcodecs/vf_test.c index 0dc805caf0..a59f5c37b2 100644 --- a/libmpcodecs/vf_test.c +++ b/libmpcodecs/vf_test.c @@ -52,7 +52,7 @@ static int config(struct vf_instance* vf, unsigned int flags, unsigned int outfmt){ if(vf_next_query_format(vf,IMGFMT_YV12)<=0){ - mp_tmsg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_WarnNextFilterDoesntSupport, "YV12"); + mp_tmsg(MSGT_VFILTER, MSGL_WARN, "%s not supported by next filter/vo :(\n", "YV12"); return 0; } diff --git a/libmpcodecs/vf_tile.c b/libmpcodecs/vf_tile.c index e26f057c35..3bc1859c6a 100644 --- a/libmpcodecs/vf_tile.c +++ b/libmpcodecs/vf_tile.c @@ -279,7 +279,7 @@ static int open(vf_instance_t *vf, char* args) // er |= parse_int( &args, &p->bkgSet, 0 ); if (er) { - mp_tmsg(MSGT_VFILTER, MSGL_ERR, MSGTR_MPCODECS_ErrorParsingArgument); + mp_tmsg(MSGT_VFILTER, MSGL_ERR, "[VF_FRAMESTEP] Error parsing argument.\n"); return 0; } /* Load some default */ diff --git a/libmpcodecs/vf_yuy2.c b/libmpcodecs/vf_yuy2.c index 183ab8e881..5f23bf1f94 100644 --- a/libmpcodecs/vf_yuy2.c +++ b/libmpcodecs/vf_yuy2.c @@ -23,7 +23,7 @@ static int config(struct vf_instance* vf, sws_rgb2rgb_init(get_sws_cpuflags()); if(vf_next_query_format(vf,IMGFMT_YUY2)<=0){ - mp_tmsg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_WarnNextFilterDoesntSupport, "YUY2"); + mp_tmsg(MSGT_VFILTER, MSGL_WARN, "%s not supported by next filter/vo :(\n", "YUY2"); return 0; } diff --git a/libmpcodecs/vf_yvu9.c b/libmpcodecs/vf_yvu9.c index 6147fc311f..12aa4dad61 100644 --- a/libmpcodecs/vf_yvu9.c +++ b/libmpcodecs/vf_yvu9.c @@ -20,7 +20,7 @@ static int config(struct vf_instance* vf, unsigned int flags, unsigned int outfmt){ if(vf_next_query_format(vf,IMGFMT_YV12)<=0){ - mp_tmsg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_WarnNextFilterDoesntSupport, "YVU9"); + mp_tmsg(MSGT_VFILTER, MSGL_WARN, "%s not supported by next filter/vo :(\n", "YVU9"); return 0; } diff --git a/libmpdemux/asfheader.c b/libmpdemux/asfheader.c index d44d92852f..93f47877bc 100644 --- a/libmpdemux/asfheader.c +++ b/libmpdemux/asfheader.c @@ -37,7 +37,7 @@ static char* get_ucs2str(const uint16_t* inbuf, uint16_t inlen) int i; if (!outbuf) { - mp_tmsg(MSGT_HEADER, MSGL_ERR, MSGTR_MemAllocFailed); + mp_tmsg(MSGT_HEADER, MSGL_ERR, "Memory allocation failed.\n"); return NULL; } q = outbuf; @@ -269,7 +269,7 @@ static int get_meta(char *buf, int buf_len, int this_stream_num, if (record_entry.stream_num && record_entry.stream_num != this_stream_num) continue; if (!(name = get_ucs2str(record_entry.name, record_entry.name_length))) { - mp_tmsg(MSGT_HEADER, MSGL_ERR, MSGTR_MemAllocFailed); + mp_tmsg(MSGT_HEADER, MSGL_ERR, "Memory allocation failed.\n"); continue; } if (strcmp(name, "AspectRatioX") == 0) @@ -322,7 +322,7 @@ static int is_drm(char* buf, int buf_len) buf += 4; buf[url_len - 1] = '\0'; - mp_tmsg(MSGT_HEADER, MSGL_INFO, MSGTR_MPDEMUX_ASFHDR_DRMLicenseURL, buf); + mp_tmsg(MSGT_HEADER, MSGL_INFO, "DRM License URL: %s\n", buf); return 1; } @@ -385,14 +385,14 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){ } if (hdr_len > 1024 * 1024) { - mp_tmsg(MSGT_HEADER, MSGL_ERR, MSGTR_MPDEMUX_ASFHDR_HeaderSizeOver1MB, + mp_tmsg(MSGT_HEADER, MSGL_ERR, "FATAL: header size bigger than 1 MB (%d)!\nPlease contact MPlayer authors, and upload/send this file.\n", hdr_len); hdr_skip = hdr_len - 1024 * 1024; hdr_len = 1024 * 1024; } hdr = malloc(hdr_len); if (!hdr) { - mp_tmsg(MSGT_HEADER, MSGL_FATAL, MSGTR_MPDEMUX_ASFHDR_HeaderMallocFailed, + mp_tmsg(MSGT_HEADER, MSGL_FATAL, "Could not allocate %d bytes for header.\n", hdr_len); return 0; } @@ -400,12 +400,12 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){ if (hdr_skip) stream_skip(demuxer->stream, hdr_skip); if (stream_eof(demuxer->stream)) { - mp_tmsg(MSGT_HEADER, MSGL_FATAL, MSGTR_MPDEMUX_ASFHDR_EOFWhileReadingHeader); + mp_tmsg(MSGT_HEADER, MSGL_FATAL, "EOF while reading ASF header, broken/incomplete file?\n"); goto err_out; } if (is_drm(hdr, hdr_len)) - mp_tmsg(MSGT_HEADER, MSGL_FATAL, MSGTR_MPDEMUX_ASFHDR_DRMProtected); + mp_tmsg(MSGT_HEADER, MSGL_FATAL, "This file has been encumbered with DRM encryption, it will not play in MPlayer!\n"); if ((pos = find_asf_guid(hdr, asf_ext_stream_audio, 0, hdr_len)) >= 0) { @@ -427,7 +427,7 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){ audio_pos += 64; //16+16+4+4+4+16+4; buffer = &hdr[audio_pos]; sh_audio=new_sh_audio(demuxer,streamh->stream_no & 0x7F); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "asfheader", streamh->stream_no & 0x7F); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "asfheader", streamh->stream_no & 0x7F); ++audio_streams; if (!asf_init_audio_stream(demuxer, asf, sh_audio, streamh, &audio_pos, &buffer, hdr, hdr_len)) goto len_err_out; @@ -464,7 +464,7 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){ switch(ASF_LOAD_GUID_PREFIX(streamh->type)){ case ASF_GUID_PREFIX_audio_stream: { sh_audio_t* sh_audio=new_sh_audio(demuxer,streamh->stream_no & 0x7F); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "asfheader", streamh->stream_no & 0x7F); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "asfheader", streamh->stream_no & 0x7F); ++audio_streams; if (!asf_init_audio_stream(demuxer, asf, sh_audio, streamh, &pos, &buffer, hdr, hdr_len)) goto len_err_out; @@ -475,7 +475,7 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){ unsigned int len; float asp_ratio; sh_video_t* sh_video=new_sh_video(demuxer,streamh->stream_no & 0x7F); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "asfheader", streamh->stream_no & 0x7F); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Video stream found, -vid %d\n", "asfheader", streamh->stream_no & 0x7F); len=streamh->type_size-(4+4+1+2); ++video_streams; // sh_video->bih=malloc(chunksize); memset(sh_video->bih,0,chunksize); @@ -485,7 +485,7 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){ if (sh_video->bih->biSize > len && sh_video->bih->biSize > sizeof(BITMAPINFOHEADER)) sh_video->bih->biSize = len; if (sh_video->bih->biCompression == mmioFOURCC('D', 'V', 'R', ' ')) { - //mp_tmsg(MSGT_DEMUXER, MSGL_WARN, MSGTR_MPDEMUX_ASFHDR_DVRWantsLibavformat); + //mp_tmsg(MSGT_DEMUXER, MSGL_WARN, "DVR will probably only work with libavformat, try -demuxer 35 if you have problems\n"); //sh_video->fps=(float)sh_video->video.dwRate/(float)sh_video->video.dwScale; //sh_video->frametime=(float)sh_video->video.dwScale/(float)sh_video->video.dwRate; asf->asf_frame_state=-1; @@ -631,7 +631,7 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){ start = stream_tell(demuxer->stream); // start of first data chunk stream_read(demuxer->stream, guid_buffer, 16); if (memcmp(guid_buffer, asf_data_chunk_guid, 16) != 0) { - mp_tmsg(MSGT_HEADER, MSGL_FATAL, MSGTR_MPDEMUX_ASFHDR_NoDataChunkAfterHeader); + mp_tmsg(MSGT_HEADER, MSGL_FATAL, "No data chunk following header!\n"); free(streams); streams = NULL; return 0; @@ -678,7 +678,7 @@ if(!audio_streams) demuxer->audio->id=-2; // nosound else if(best_audio > 0 && demuxer->audio->id == -1) demuxer->audio->id=best_audio; if(!video_streams){ if(!audio_streams){ - mp_tmsg(MSGT_HEADER,MSGL_ERR,MSGTR_MPDEMUX_ASFHDR_AudioVideoHeaderNotFound); + mp_tmsg(MSGT_HEADER,MSGL_ERR,"ASF: no audio or video headers found - broken file?\n"); return 0; } demuxer->video->id=-2; // audio-only @@ -695,7 +695,7 @@ if( mp_msg_test(MSGT_HEADER,MSGL_V) ){ return 1; len_err_out: - mp_tmsg(MSGT_HEADER, MSGL_FATAL, MSGTR_MPDEMUX_ASFHDR_InvalidLengthInASFHeader); + mp_tmsg(MSGT_HEADER, MSGL_FATAL, "Invalid length in ASF header!\n"); err_out: if (hdr) free(hdr); if (streams) free(streams); diff --git a/libmpdemux/aviheader.c b/libmpdemux/aviheader.c index f7228c590f..516da9d0f8 100644 --- a/libmpdemux/aviheader.c +++ b/libmpdemux/aviheader.c @@ -80,7 +80,7 @@ while(1){ len -= 4; list_end=stream_tell(demuxer->stream)+((len+1)&(~1)); } else { - mp_tmsg(MSGT_HEADER,MSGL_WARN,MSGTR_MPDEMUX_AVIHDR_EmptyList); + mp_tmsg(MSGT_HEADER,MSGL_WARN,"** empty list?!\n"); list_end = 0; } mp_msg(MSGT_HEADER,MSGL_V,"list_end=0x%X\n",(int)list_end); @@ -88,7 +88,7 @@ while(1){ // found MOVI header if(!demuxer->movi_start) demuxer->movi_start=stream_tell(demuxer->stream); demuxer->movi_end=stream_tell(demuxer->stream)+len; - mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_FoundMovieAt,(int)demuxer->movi_start,(int)demuxer->movi_end); + mp_tmsg(MSGT_HEADER,MSGL_V,"Found movie at 0x%X - 0x%X\n",(int)demuxer->movi_start,(int)demuxer->movi_end); if(demuxer->stream->end_pos>demuxer->movi_end) demuxer->movi_end=demuxer->stream->end_pos; if(index_mode==-2 || index_mode==2 || index_mode==0) break; // reading from non-seekable source (stdin) or forced index or no index forced @@ -193,13 +193,13 @@ while(1){ ++stream_id; if(h.fccType==streamtypeVIDEO){ sh_video=new_sh_video(demuxer,stream_id); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "aviheader", stream_id); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Video stream found, -vid %d\n", "aviheader", stream_id); memcpy(&sh_video->video,&h,sizeof(h)); sh_video->stream_delay = (float)sh_video->video.dwStart * sh_video->video.dwScale/sh_video->video.dwRate; } else if(h.fccType==streamtypeAUDIO){ sh_audio=new_sh_audio(demuxer,stream_id); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "aviheader", stream_id); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "aviheader", stream_id); memcpy(&sh_audio->audio,&h,sizeof(h)); sh_audio->stream_delay = (float)sh_audio->audio.dwStart * sh_audio->audio.dwScale/sh_audio->audio.dwRate; } @@ -262,7 +262,7 @@ while(1){ if(last_fccType==streamtypeVIDEO){ sh_video->bih=calloc(FFMAX(chunksize, sizeof(BITMAPINFOHEADER)), 1); // sh_video->bih=malloc(chunksize); memset(sh_video->bih,0,chunksize); - mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_FoundBitmapInfoHeader,chunksize,sizeof(BITMAPINFOHEADER)); + mp_tmsg(MSGT_HEADER,MSGL_V,"Found 'bih', %u bytes of %d\n",chunksize,sizeof(BITMAPINFOHEADER)); stream_read(demuxer->stream,(char*) sh_video->bih,chunksize); le2me_BITMAPINFOHEADER(sh_video->bih); // swap to machine endian if (sh_video->bih->biSize > chunksize && sh_video->bih->biSize > sizeof(BITMAPINFOHEADER)) @@ -283,7 +283,7 @@ while(1){ case mmioFOURCC('m', 'p', 'g', '4'): case mmioFOURCC('D', 'I', 'V', '1'): idxfix_divx=3; // set index recovery mpeg4 flavour: msmpeg4v1 - mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPG4V1); + mp_tmsg(MSGT_HEADER,MSGL_V,"Regenerating keyframe table for M$ mpg4v1 video.\n"); break; case mmioFOURCC('D', 'I', 'V', '3'): case mmioFOURCC('d', 'i', 'v', '3'): @@ -300,7 +300,7 @@ while(1){ case mmioFOURCC('D', 'I', 'V', '2'): case mmioFOURCC('A', 'P', '4', '1'): idxfix_divx=1; // set index recovery mpeg4 flavour: msmpeg4v3 - mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForDIVX3); + mp_tmsg(MSGT_HEADER,MSGL_V,"Regenerating keyframe table for DIVX3 video.\n"); break; case mmioFOURCC('D', 'I', 'V', 'X'): case mmioFOURCC('d', 'i', 'v', 'x'): @@ -310,7 +310,7 @@ while(1){ case mmioFOURCC('F', 'M', 'P', '4'): case mmioFOURCC('f', 'm', 'p', '4'): idxfix_divx=2; // set index recovery mpeg4 flavour: generic mpeg4 - mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPEG4); + mp_tmsg(MSGT_HEADER,MSGL_V,"Regenerating keyframe table for MPEG-4 video.\n"); break; } } else @@ -318,7 +318,7 @@ while(1){ unsigned wf_size = chunksize<sizeof(WAVEFORMATEX)?sizeof(WAVEFORMATEX):chunksize; sh_audio->wf=calloc(wf_size,1); // sh_audio->wf=malloc(chunksize); memset(sh_audio->wf,0,chunksize); - mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_FoundWaveFmt,chunksize,sizeof(WAVEFORMATEX)); + mp_tmsg(MSGT_HEADER,MSGL_V,"Found 'wf', %d bytes of %d\n",chunksize,sizeof(WAVEFORMATEX)); stream_read(demuxer->stream,(char*) sh_audio->wf,chunksize); le2me_WAVEFORMATEX(sh_audio->wf); if (sh_audio->wf->cbSize != 0 && @@ -361,7 +361,7 @@ while(1){ case mmioFOURCC('d', 'm', 'l', 'h'): { // dmlh 00 00 00 04 frms unsigned int total_frames = stream_read_dword_le(demuxer->stream); - mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_FoundAVIV2Header, chunksize, total_frames); + mp_tmsg(MSGT_HEADER,MSGL_V,"AVI: dmlh found (size=%d) (total_frames=%d)\n", chunksize, total_frames); stream_skip(demuxer->stream, chunksize-4); chunksize = 0; } @@ -372,7 +372,7 @@ while(1){ if(index_mode && !priv->isodml){ int i; priv->idx_size=size2>>4; - mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_ReadingIndexBlockChunksForFrames, + mp_tmsg(MSGT_HEADER,MSGL_V,"Reading INDEX block, %d chunks for %d frames (fpos=%"PRId64").\n", priv->idx_size,avih.dwTotalFrames, (int64_t)stream_tell(demuxer->stream)); priv->idx=malloc(priv->idx_size<<4); // printf("\nindex to %p !!!!! (priv=%p)\n",priv->idx,priv); @@ -395,10 +395,10 @@ while(1){ case mmioFOURCC('R','I','F','F'): { char riff_type[4]; - mp_tmsg(MSGT_HEADER, MSGL_V, MSGTR_MPDEMUX_AVIHDR_AdditionalRIFFHdr); + mp_tmsg(MSGT_HEADER, MSGL_V, "Additional RIFF header...\n"); stream_read(demuxer->stream, riff_type, sizeof riff_type); if (strncmp(riff_type, "AVIX", sizeof riff_type)) - mp_tmsg(MSGT_HEADER, MSGL_WARN, MSGTR_MPDEMUX_AVIHDR_WarnNotExtendedAVIHdr); + mp_tmsg(MSGT_HEADER, MSGL_WARN, "** Warning: this is no extended AVI header..\n"); else { /* * We got an extended AVI header, so we need to switch to @@ -436,7 +436,7 @@ while(1){ if(list_end>0 && chunksize+stream_tell(demuxer->stream) == list_end) list_end=0; if(list_end>0 && chunksize+stream_tell(demuxer->stream)>list_end){ - mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_BrokenChunk,chunksize,(char *) &id); + mp_tmsg(MSGT_HEADER,MSGL_V,"Broken chunk? chunksize=%d (id=%.4s)\n",chunksize,(char *) &id); stream_seek(demuxer->stream,list_end); list_end=0; } else @@ -464,7 +464,7 @@ if (priv->isodml && (index_mode==-1 || index_mode==0 || index_mode==1)) { priv->idx_offset = 0; priv->idx = NULL; - mp_tmsg(MSGT_HEADER, MSGL_INFO, MSGTR_MPDEMUX_AVIHDR_BuildingODMLidx, priv->suidx_size); + mp_tmsg(MSGT_HEADER, MSGL_INFO, "AVI: ODML: Building ODML index (%d superindexchunks).\n", priv->suidx_size); // read the standard indices for (cx = &priv->suidx[0], i=0; i<priv->suidx_size; cx++, i++) { @@ -479,7 +479,7 @@ if (priv->isodml && (index_mode==-1 || index_mode==0 || index_mode==1)) { // gen_index routine handle this priv->isodml = 0; priv->idx_size = 0; - mp_tmsg(MSGT_HEADER, MSGL_WARN, MSGTR_MPDEMUX_AVIHDR_BrokenODMLfile); + mp_tmsg(MSGT_HEADER, MSGL_WARN, "AVI: ODML: Broken (incomplete?) file detected. Will use traditional index.\n"); goto freeout; } @@ -583,18 +583,18 @@ if (index_file_load) { unsigned int i; if ((fp = fopen(index_file_load, "r")) == NULL) { - mp_tmsg(MSGT_HEADER,MSGL_ERR, MSGTR_MPDEMUX_AVIHDR_CantReadIdxFile, index_file_load, strerror(errno)); + mp_tmsg(MSGT_HEADER,MSGL_ERR, "Can't read index file %s: %s\n", index_file_load, strerror(errno)); goto gen_index; } fread(&magic, 6, 1, fp); if (strncmp(magic, "MPIDX1", 6)) { - mp_tmsg(MSGT_HEADER,MSGL_ERR, MSGTR_MPDEMUX_AVIHDR_NotValidMPidxFile, index_file_load); + mp_tmsg(MSGT_HEADER,MSGL_ERR, "%s is not a valid MPlayer index file.\n", index_file_load); goto gen_index; } fread(&priv->idx_size, sizeof(priv->idx_size), 1, fp); priv->idx=malloc(priv->idx_size*sizeof(AVIINDEXENTRY)); if (!priv->idx) { - mp_tmsg(MSGT_HEADER,MSGL_ERR, MSGTR_MPDEMUX_AVIHDR_FailedMallocForIdxFile, index_file_load); + mp_tmsg(MSGT_HEADER,MSGL_ERR, "Could not allocate memory for index data from %s.\n", index_file_load); priv->idx_size = 0; goto gen_index; } @@ -604,14 +604,14 @@ if (index_file_load) { idx=&((AVIINDEXENTRY *)priv->idx)[i]; fread(idx, sizeof(AVIINDEXENTRY), 1, fp); if (feof(fp)) { - mp_tmsg(MSGT_HEADER,MSGL_ERR, MSGTR_MPDEMUX_AVIHDR_PrematureEOF, index_file_load); + mp_tmsg(MSGT_HEADER,MSGL_ERR, "premature end of index file %s\n", index_file_load); free(priv->idx); priv->idx_size = 0; goto gen_index; } } fclose(fp); - mp_tmsg(MSGT_HEADER,MSGL_INFO, MSGTR_MPDEMUX_AVIHDR_IdxFileLoaded, index_file_load); + mp_tmsg(MSGT_HEADER,MSGL_INFO, "Loaded index file: %s\n", index_file_load); } gen_index: if(index_mode>=2 || (priv->idx_size==0 && index_mode==1)){ @@ -678,7 +678,7 @@ if(index_mode>=2 || (priv->idx_size==0 && index_mode==1)){ } if(pos!=lastpos){ lastpos=pos; - mp_tmsg(MSGT_HEADER,MSGL_STATUS,MSGTR_MPDEMUX_AVIHDR_GeneratingIdx, + mp_tmsg(MSGT_HEADER,MSGL_STATUS, "Generating Index: %3lu %s \r", (unsigned long)pos, len?"%":"MB"); } } @@ -697,7 +697,7 @@ skip_chunk: stream_seek(demuxer->stream,8+demuxer->filepos+skip); } priv->idx_size=priv->idx_pos; - mp_tmsg(MSGT_HEADER,MSGL_INFO,MSGTR_MPDEMUX_AVIHDR_IdxGeneratedForHowManyChunks,priv->idx_size); + mp_tmsg(MSGT_HEADER,MSGL_INFO,"AVI: Generated index table for %d chunks!\n",priv->idx_size); if( mp_msg_test(MSGT_HEADER,MSGL_DBG2) ) print_index(priv->idx,priv->idx_size,MSGL_DBG2); /* Write generated index to a file */ @@ -706,7 +706,7 @@ skip_chunk: unsigned int i; if ((fp=fopen(index_file_save, "w")) == NULL) { - mp_tmsg(MSGT_HEADER,MSGL_ERR, MSGTR_MPDEMUX_AVIHDR_Failed2WriteIdxFile, index_file_save, strerror(errno)); + mp_tmsg(MSGT_HEADER,MSGL_ERR, "Couldn't write index file %s: %s\n", index_file_save, strerror(errno)); return; } fwrite("MPIDX1", 6, 1, fp); @@ -716,7 +716,7 @@ skip_chunk: fwrite(idx, sizeof(AVIINDEXENTRY), 1, fp); } fclose(fp); - mp_tmsg(MSGT_HEADER,MSGL_INFO, MSGTR_MPDEMUX_AVIHDR_IdxFileSaved, index_file_save); + mp_tmsg(MSGT_HEADER,MSGL_INFO, "Saved index file: %s\n", index_file_save); } } } diff --git a/libmpdemux/demux_asf.c b/libmpdemux/demux_asf.c index ac1a16da04..b8be24f965 100644 --- a/libmpdemux/demux_asf.c +++ b/libmpdemux/demux_asf.c @@ -623,7 +623,7 @@ static demuxer_t* demux_open_asf(demuxer_t* demuxer) // demuxer->endpos=avi_header.movi_end; if(demuxer->video->id != -2) { if(!ds_fill_buffer(demuxer->video)){ - mp_tmsg(MSGT_DEMUXER,MSGL_WARN,"ASF: " MSGTR_MissingVideoStream); + mp_tmsg(MSGT_DEMUXER,MSGL_WARN,"ASF: " "No video stream found.\n"); demuxer->video->sh=NULL; //printf("ASF: missing video stream!? contact the author, it may be a bug :(\n"); } else { @@ -638,9 +638,9 @@ static demuxer_t* demux_open_asf(demuxer_t* demuxer) } if(demuxer->audio->id!=-2){ - mp_tmsg(MSGT_DEMUXER,MSGL_V,MSGTR_ASFSearchingForAudioStream,demuxer->audio->id); + mp_tmsg(MSGT_DEMUXER,MSGL_V,"ASF: Searching for audio stream (id:%d).\n",demuxer->audio->id); if(!ds_fill_buffer(demuxer->audio)){ - mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"ASF: " MSGTR_MissingAudioStream); + mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"ASF: " "No audio stream found -> no sound.\n"); demuxer->audio->sh=NULL; } else { sh_audio=demuxer->audio->sh;sh_audio->ds=demuxer->audio; diff --git a/libmpdemux/demux_audio.c b/libmpdemux/demux_audio.c index dd83fbe53c..d374e3d130 100644 --- a/libmpdemux/demux_audio.c +++ b/libmpdemux/demux_audio.c @@ -572,7 +572,7 @@ static int demux_audio_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds) { break; } default: - mp_tmsg(MSGT_DEMUXER,MSGL_WARN,MSGTR_MPDEMUX_AUDIO_UnknownFormat,priv->frmt); + mp_tmsg(MSGT_DEMUXER,MSGL_WARN,"Audio demuxer: unknown format %d.\n",priv->frmt); return 0; } diff --git a/libmpdemux/demux_avi.c b/libmpdemux/demux_avi.c index 396e4d26a7..8ef549cf42 100644 --- a/libmpdemux/demux_avi.c +++ b/libmpdemux/demux_avi.c @@ -56,7 +56,7 @@ static demux_stream_t* demux_avi_select_stream(demuxer_t *demux, // workaround old mencoder's bug: if(sh->audio.dwSampleSize==1 && sh->audio.dwScale==1 && (sh->wf->nBlockAlign==1152 || sh->wf->nBlockAlign==576)){ - mp_tmsg(MSGT_DEMUX,MSGL_WARN,MSGTR_WorkAroundBlockAlignHeaderBug); + mp_tmsg(MSGT_DEMUX,MSGL_WARN,"AVI: Working around CBR-MP3 nBlockAlign header bug!\n"); priv->audio_block_size=1; } } @@ -253,7 +253,7 @@ do{ if(ds) if(ds->packs+1>=MAX_PACKS || ds->bytes+len>=MAX_PACK_BYTES){ // this packet will cause a buffer overflow, switch to -ni mode!!! - mp_tmsg(MSGT_DEMUX,MSGL_WARN,MSGTR_SwitchToNi); + mp_tmsg(MSGT_DEMUX,MSGL_WARN,"\nBadly interleaved AVI file detected - switching to -ni mode...\n"); if(priv->idx_size>0){ // has index demux->type=DEMUXER_TYPE_AVI_NI; @@ -427,11 +427,11 @@ static demuxer_t* demux_open_avi(demuxer_t* demuxer){ read_avi_header(demuxer,(demuxer->stream->flags & STREAM_SEEK_BW)?index_mode:-2); if(demuxer->audio->id>=0 && !demuxer->a_streams[demuxer->audio->id]){ - mp_tmsg(MSGT_DEMUX,MSGL_WARN,MSGTR_InvalidAudioStreamNosound,demuxer->audio->id); + mp_tmsg(MSGT_DEMUX,MSGL_WARN,"AVI: invalid audio stream ID: %d - ignoring (nosound)\n",demuxer->audio->id); demuxer->audio->id=-2; // disabled } if(demuxer->video->id>=0 && !demuxer->v_streams[demuxer->video->id]){ - mp_tmsg(MSGT_DEMUX,MSGL_WARN,MSGTR_InvalidAudioStreamUsingDefault,demuxer->video->id); + mp_tmsg(MSGT_DEMUX,MSGL_WARN,"AVI: invalid video stream ID: %d - ignoring (using default)\n",demuxer->video->id); demuxer->video->id=-1; // autodetect } @@ -479,14 +479,14 @@ static demuxer_t* demux_open_avi(demuxer_t* demuxer){ } } if(v_pos==-1){ - mp_tmsg(MSGT_DEMUX,MSGL_ERR,"AVI_NI: " MSGTR_MissingVideoStream); + mp_tmsg(MSGT_DEMUX,MSGL_ERR,"AVI_NI: " "No video stream found.\n"); return NULL; } if(a_pos==-1){ d_audio->sh=sh_audio=NULL; } else { if(force_ni || abs(a_pos-v_pos)>0x100000){ // distance > 1MB - mp_tmsg(MSGT_DEMUX,MSGL_INFO,MSGTR_NI_Message,force_ni?MSGTR_NI_Forced:MSGTR_NI_Detected); + mp_tmsg(MSGT_DEMUX,MSGL_INFO,"%s NON-INTERLEAVED AVI file format.\n",force_ni?"Forced":"Detected"); demuxer->type=DEMUXER_TYPE_AVI_NI; // HACK!!!! demuxer->desc=&demuxer_desc_avi_ni; // HACK!!!! pts_from_bps=1; // force BPS sync! @@ -495,7 +495,7 @@ static demuxer_t* demux_open_avi(demuxer_t* demuxer){ } else { // no index if(force_ni){ - mp_tmsg(MSGT_DEMUX,MSGL_INFO,MSGTR_UsingNINI); + mp_tmsg(MSGT_DEMUX,MSGL_INFO,"Using NON-INTERLEAVED broken AVI file format.\n"); demuxer->type=DEMUXER_TYPE_AVI_NINI; // HACK!!!! demuxer->desc=&demuxer_desc_avi_nini; // HACK!!!! priv->idx_pos_a= @@ -505,14 +505,14 @@ static demuxer_t* demux_open_avi(demuxer_t* demuxer){ demuxer->seekable=0; } if(!ds_fill_buffer(d_video)){ - mp_tmsg(MSGT_DEMUX,MSGL_ERR,"AVI: " MSGTR_MissingVideoStreamBug); + mp_tmsg(MSGT_DEMUX,MSGL_ERR,"AVI: " "Missing video stream!? Contact the author, it may be a bug :(\n"); return NULL; } sh_video=d_video->sh;sh_video->ds=d_video; if(d_audio->id!=-2){ mp_msg(MSGT_DEMUX,MSGL_V,"AVI: Searching for audio stream (id:%d)\n",d_audio->id); if(!priv->audio_streams || !ds_fill_buffer(d_audio)){ - mp_tmsg(MSGT_DEMUX,MSGL_INFO,"AVI: " MSGTR_MissingAudioStream); + mp_tmsg(MSGT_DEMUX,MSGL_INFO,"AVI: " "No audio stream found -> no sound.\n"); d_audio->sh=sh_audio=NULL; } else { sh_audio=d_audio->sh;sh_audio->ds=d_audio; @@ -552,7 +552,7 @@ static demuxer_t* demux_open_avi(demuxer_t* demuxer){ // bad video header, try to get number of frames from audio if(sh_audio && sh_audio->wf->nAvgBytesPerSec) priv->numberofframes=sh_video->fps*sh_audio->audio.dwLength/sh_audio->audio.dwRate*sh_audio->audio.dwScale; if(priv->numberofframes<=1){ - mp_tmsg(MSGT_SEEK,MSGL_WARN,MSGTR_CouldntDetFNo); + mp_tmsg(MSGT_SEEK,MSGL_WARN,"Could not determine number of frames (for absolute seek).\n"); priv->numberofframes=0; } @@ -828,7 +828,7 @@ static int avi_check_file(demuxer_t *demuxer) if(id==mmioFOURCC('A','V','I',0x19)) return DEMUXER_TYPE_AVI; if(id==mmioFOURCC('O','N','2','f')){ - mp_tmsg(MSGT_DEMUXER,MSGL_INFO,MSGTR_ON2AviFormat); + mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"ON2 AVI format"); return DEMUXER_TYPE_AVI; } } @@ -856,7 +856,7 @@ static demuxer_t* demux_open_hack_avi(demuxer_t *demuxer) s = new_ds_stream(demuxer->audio); od = new_demuxer(opts, s,DEMUXER_TYPE_OGG,-1,-2,-2,NULL); if(!demux_ogg_open(od)) { - mp_tmsg( MSGT_DEMUXER,MSGL_ERR,MSGTR_ErrorOpeningOGGDemuxer); + mp_tmsg( MSGT_DEMUXER,MSGL_ERR,"Unable to open the Ogg demuxer.\n"); free_stream(s); demuxer->audio->id = -2; } else diff --git a/libmpdemux/demux_demuxers.c b/libmpdemux/demux_demuxers.c index 3e055a1e6b..156251c33a 100644 --- a/libmpdemux/demux_demuxers.c +++ b/libmpdemux/demux_demuxers.c @@ -61,7 +61,7 @@ static int demux_demuxers_fill_buffer(demuxer_t *demux,demux_stream_t *ds) { else if(ds->demuxer == priv->sd) return demux_fill_buffer(priv->sd,ds); - mp_tmsg(MSGT_DEMUX,MSGL_WARN,MSGTR_MPDEMUX_DEMUXERS_FillBufferError); + mp_tmsg(MSGT_DEMUX,MSGL_WARN,"fill_buffer error: bad demuxer: not vd, ad or sd.\n"); return 0; } diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index 29bc4e07f6..a7da1a9b36 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -228,7 +228,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { if(priv->audio_streams >= MAX_A_STREAMS) break; sh_audio=new_sh_audio(demuxer, i); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "lavf", i); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "lavf", i); if(!sh_audio) break; priv->astreams[priv->audio_streams] = i; @@ -308,7 +308,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { if(priv->video_streams >= MAX_V_STREAMS) break; sh_video=new_sh_video(demuxer, i); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "lavf", i); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Video stream found, -vid %d\n", "lavf", i); if(!sh_video) break; priv->vstreams[priv->video_streams] = i; priv->video_streams++; @@ -388,7 +388,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { else break; sh_sub = new_sh_sub_sid(demuxer, i, priv->sub_streams); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_SubtitleID, "lavf", priv->sub_streams); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Subtitle stream found, -sid %d\n", "lavf", priv->sub_streams); if(!sh_sub) break; priv->sstreams[priv->sub_streams] = i; sh_sub->type = type; diff --git a/libmpdemux/demux_lmlm4.c b/libmpdemux/demux_lmlm4.c index 46430aefb2..9b4382ba5a 100644 --- a/libmpdemux/demux_lmlm4.c +++ b/libmpdemux/demux_lmlm4.c @@ -328,14 +328,14 @@ static demuxer_t* demux_open_lmlm4(demuxer_t* demuxer){ demuxer->seekable = 0; if(!ds_fill_buffer(demuxer->video)){ - mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"LMLM4: " MSGTR_MissingVideoStream); + mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"LMLM4: " "No video stream found.\n"); demuxer->video->sh=NULL; } else { sh_video=demuxer->video->sh;sh_video->ds=demuxer->video; } if(demuxer->audio->id!=-2) { if(!ds_fill_buffer(demuxer->audio)){ - mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"LMLM4: " MSGTR_MissingAudioStream); + mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"LMLM4: " "No audio stream found -> no sound.\n"); demuxer->audio->sh=NULL; } else { sh_audio=demuxer->audio->sh;sh_audio->ds=demuxer->audio; diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c index 3ddf1c40cd..c8dfd92ba1 100644 --- a/libmpdemux/demux_mkv.c +++ b/libmpdemux/demux_mkv.c @@ -308,7 +308,7 @@ demux_mkv_decode (mkv_track_t *track, uint8_t *src, uint8_t **dest, if (inflateInit (&zstream) != Z_OK) { mp_tmsg (MSGT_DEMUX, MSGL_WARN, - MSGTR_MPDEMUX_MKV_ZlibInitializationFailed); + "[mkv] zlib initialization failed.\n"); return modified; } zstream.next_in = (Bytef *) src; @@ -325,7 +325,7 @@ demux_mkv_decode (mkv_track_t *track, uint8_t *src, uint8_t **dest, if (result != Z_OK && result != Z_STREAM_END) { mp_tmsg (MSGT_DEMUX, MSGL_WARN, - MSGTR_MPDEMUX_MKV_ZlibDecompressionFailed); + "[mkv] zlib decompression failed.\n"); free(*dest); *dest = NULL; inflateEnd (&zstream); @@ -357,7 +357,7 @@ demux_mkv_decode (mkv_track_t *track, uint8_t *src, uint8_t **dest, { lzo_fail: mp_tmsg (MSGT_DEMUX, MSGL_WARN, - MSGTR_MPDEMUX_MKV_LzoDecompressionFailed); + "[mkv] lzo decompression failed.\n"); free(*dest); *dest = NULL; return modified; @@ -545,25 +545,25 @@ demux_mkv_read_trackencodings (demuxer_t *demuxer, mkv_track_t *track) if (e.type == 1) { mp_tmsg(MSGT_DEMUX, MSGL_WARN, - MSGTR_MPDEMUX_MKV_TrackEncrypted, track->tnum); + "[mkv] Track number %u has been encrypted and decryption has not yet been\n[mkv] implemented. Skipping track.\n", track->tnum); } else if (e.type != 0) { mp_tmsg(MSGT_DEMUX, MSGL_WARN, - MSGTR_MPDEMUX_MKV_UnknownContentEncoding, track->tnum); + "[mkv] Unknown content encoding type for track %u. Skipping track.\n", track->tnum); } if (e.comp_algo != 0 && e.comp_algo != 2) { mp_tmsg (MSGT_DEMUX, MSGL_WARN, - MSGTR_MPDEMUX_MKV_UnknownCompression, + "[mkv] Track %u has been compressed with an unknown/unsupported compression\n[mkv] algorithm (%u). Skipping track.\n", track->tnum, e.comp_algo); } #if !CONFIG_ZLIB else if (e.comp_algo == 0) { mp_tmsg (MSGT_DEMUX, MSGL_WARN, - MSGTR_MPDEMUX_MKV_ZlibCompressionUnsupported, + "[mkv] Track %u was compressed with zlib but mplayer has not been compiled\n[mkv] with support for zlib compression. Skipping track.\n", track->tnum); } #endif @@ -1533,10 +1533,10 @@ display_create_tracks (demuxer_t *demuxer) break; } if (mkv_d->tracks[i]->name) - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_MPDEMUX_MKV_TrackIDName, + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[mkv] Track ID %u: %s (%s) \"%s\", %s\n", mkv_d->tracks[i]->tnum, type, mkv_d->tracks[i]->codec_id, mkv_d->tracks[i]->name, str); else - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_MPDEMUX_MKV_TrackID, + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[mkv] Track ID %u: %s (%s), %s\n", mkv_d->tracks[i]->tnum, type, mkv_d->tracks[i]->codec_id, str); } } @@ -1674,7 +1674,7 @@ demux_mkv_open_video (demuxer_t *demuxer, mkv_track_t *track, int vid) } track->reorder_timecodes = opts->user_correct_pts == 0; if (!vi->id) { - mp_tmsg (MSGT_DEMUX,MSGL_WARN, MSGTR_MPDEMUX_MKV_UnknownCodecID, + mp_tmsg (MSGT_DEMUX,MSGL_WARN, "[mkv] Unknown/unsupported CodecID (%s) or missing/bad CodecPrivate\n[mkv] data (track %u).\n", track->codec_id, track->tnum); free(bih); return 1; @@ -1789,7 +1789,7 @@ demux_mkv_open_audio (demuxer_t *demuxer, mkv_track_t *track, int aid) if (track->private_data == NULL || track->private_size == 0) { mp_tmsg (MSGT_DEMUX, MSGL_WARN, - MSGTR_MPDEMUX_MKV_FlacTrackDoesNotContainValidHeaders); + "[mkv] FLAC track does not contain valid headers.\n"); return 1; } track->a_formattag = mmioFOURCC ('f', 'L', 'a', 'C'); @@ -1809,7 +1809,7 @@ demux_mkv_open_audio (demuxer_t *demuxer, mkv_track_t *track, int aid) } else { - mp_tmsg (MSGT_DEMUX, MSGL_WARN, MSGTR_MPDEMUX_MKV_UnknownAudioCodec, + mp_tmsg (MSGT_DEMUX, MSGL_WARN, "[mkv] Unknown/unsupported audio codec ID '%s' for track %u or missing/faulty\n[mkv] private codec data.\n", track->codec_id, track->tnum); free_sh_audio(demuxer, track->tnum); return 1; @@ -2066,7 +2066,7 @@ demux_mkv_open_sub (demuxer_t *demuxer, mkv_track_t *track, int sid) } else { - mp_tmsg (MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_MKV_SubtitleTypeNotSupported, + mp_tmsg (MSGT_DEMUX, MSGL_ERR, "[mkv] Subtitle type '%s' is not supported.\n", track->codec_id); return 1; } @@ -2209,13 +2209,13 @@ demux_mkv_open (demuxer_t *demuxer) if (track && demuxer->v_streams[track->tnum]) { mp_tmsg (MSGT_DEMUX, MSGL_INFO, - MSGTR_MPDEMUX_MKV_WillPlayVideoTrack, track->tnum); + "[mkv] Will play video track %u.\n", track->tnum); demuxer->video->id = track->tnum; demuxer->video->sh = demuxer->v_streams[track->tnum]; } else { - mp_tmsg (MSGT_DEMUX, MSGL_INFO, MSGTR_MPDEMUX_MKV_NoVideoTrackFound); + mp_tmsg (MSGT_DEMUX, MSGL_INFO, "[mkv] No video track found/wanted.\n"); demuxer->video->id = -2; } @@ -2248,7 +2248,7 @@ demux_mkv_open (demuxer_t *demuxer) } else { - mp_tmsg (MSGT_DEMUX, MSGL_INFO, MSGTR_MPDEMUX_MKV_NoAudioTrackFound); + mp_tmsg (MSGT_DEMUX, MSGL_INFO, "[mkv] No audio track found/wanted.\n"); demuxer->audio->id = -2; } @@ -2398,7 +2398,7 @@ handle_subtitles(demuxer_t *demuxer, mkv_track_t *track, char *block, if (block_duration == 0) { mp_msg (MSGT_DEMUX, MSGL_WARN, - MSGTR_MPDEMUX_MKV_NoBlockDurationForSubtitleTrackFound); + "[mkv] Warning: No BlockDuration for subtitle track found.\n"); return; } diff --git a/libmpdemux/demux_mov.c b/libmpdemux/demux_mov.c index c4c764391b..bb05aaeae0 100644 --- a/libmpdemux/demux_mov.c +++ b/libmpdemux/demux_mov.c @@ -1303,7 +1303,7 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak case MOV_FOURCC('t','r','a','k'): { // if(trak) printf("MOV: Warning! trak in trak?\n"); if(priv->track_db>=MOV_MAX_TRACKS){ - mp_tmsg(MSGT_DEMUX,MSGL_WARN,MSGTR_MOVtooManyTrk); + mp_tmsg(MSGT_DEMUX,MSGL_WARN,"MOV: WARNING: too many tracks"); return; } if(!priv->track_db) mp_msg(MSGT_DEMUX, MSGL_V, "--------------\n"); @@ -1317,13 +1317,13 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak switch(trak->type){ case MOV_TRAK_AUDIO: { sh_audio_t* sh=new_sh_audio(demuxer,priv->track_db); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "mov", priv->track_db); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "mov", priv->track_db); gen_sh_audio(sh, trak, priv->timescale); break; } case MOV_TRAK_VIDEO: { sh_video_t* sh=new_sh_video(demuxer,priv->track_db); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "mov", priv->track_db); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Video stream found, -vid %d\n", "mov", priv->track_db); gen_sh_video(sh, trak, priv->timescale); break; } @@ -1332,7 +1332,7 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak trak->fourcc == mmioFOURCC('t','x','3','g') || trak->fourcc == mmioFOURCC('t','e','x','t')) { sh_sub_t *sh = new_sh_sub(demuxer, priv->track_db); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_SubtitleID, "mov", priv->track_db); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Subtitle stream found, -sid %d\n", "mov", priv->track_db); if (trak->fourcc == mmioFOURCC('m','p','4','s')) init_vobsub(sh, trak); else { @@ -1398,13 +1398,13 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak } #if !CONFIG_ZLIB case MOV_FOURCC('c','m','o','v'): { - mp_tmsg(MSGT_DEMUX,MSGL_ERR,MSGTR_MOVcomprhdr); + mp_tmsg(MSGT_DEMUX,MSGL_ERR,"MOV: Compressed headers support requires ZLIB!\n"); return; } #else case MOV_FOURCC('m','o','o','v'): case MOV_FOURCC('c','m','o','v'): { -// mp_tmsg(MSGT_DEMUX,MSGL_ERR,MSGTR_MOVcomprhdr); +// mp_tmsg(MSGT_DEMUX,MSGL_ERR,"MOV: Compressed headers support requires ZLIB!\n"); lschunks(demuxer,level+1,pos+len,NULL); break; } @@ -1728,7 +1728,7 @@ static int lschunks_intrak(demuxer_t* demuxer, int level, unsigned int id, "MOV: %*s desc #%d: %.4s (%"PRId64" bytes)\n", level, "", i, (char *)&fourcc, (int64_t)len - 16); if (fourcc != trak->fourcc && i) - mp_tmsg(MSGT_DEMUX, MSGL_WARN, MSGTR_MOVvariableFourCC); + mp_tmsg(MSGT_DEMUX, MSGL_WARN, "MOV: WARNING: Variable FourCC detected!?\n"); // if(!i) { trak->fourcc = fourcc; diff --git a/libmpdemux/demux_mpg.c b/libmpdemux/demux_mpg.c index 01c1c78ed1..620b44598c 100644 --- a/libmpdemux/demux_mpg.c +++ b/libmpdemux/demux_mpg.c @@ -706,9 +706,9 @@ static int demux_mpg_probe(demuxer_t *demuxer) { } else { if(demuxer->synced==2) - mp_tmsg(MSGT_DEMUXER,MSGL_ERR,"MPEG: " MSGTR_MissingVideoStreamBug); + mp_tmsg(MSGT_DEMUXER,MSGL_ERR,"MPEG: " "Missing video stream!? Contact the author, it may be a bug :(\n"); else - mp_tmsg(MSGT_DEMUXER,MSGL_V,MSGTR_NotSystemStream); + mp_tmsg(MSGT_DEMUXER,MSGL_V,"Not MPEG System Stream format... (maybe Transport Stream?)\n"); } } //FIXME this shouldn't be necessary @@ -847,7 +847,7 @@ do{ if(!ret) if(--max_packs==0){ demux->stream->eof=1; - mp_tmsg(MSGT_DEMUX,MSGL_ERR,MSGTR_DoesntContainSelectedStream); + mp_tmsg(MSGT_DEMUX,MSGL_ERR,"demux: File doesn't contain the selected audio or video stream.\n"); return 0; } if(demux->synced==3) demux->synced=(ret==1)?2:0; // PES detect @@ -1082,7 +1082,7 @@ static demuxer_t* demux_mpg_ps_open(demuxer_t* demuxer) if(demuxer->audio->id!=-2) { if(!ds_fill_buffer(demuxer->audio)){ - mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"MPEG: " MSGTR_MissingAudioStream); + mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"MPEG: " "No audio stream found -> no sound.\n"); demuxer->audio->sh=NULL; } else { sh_audio=demuxer->audio->sh;sh_audio->ds=demuxer->audio; diff --git a/libmpdemux/demux_nut.c b/libmpdemux/demux_nut.c index 17c39bbb4f..d7bb2e8e6c 100644 --- a/libmpdemux/demux_nut.c +++ b/libmpdemux/demux_nut.c @@ -97,7 +97,7 @@ static demuxer_t * demux_open_nut(demuxer_t * demuxer) { s[i].codec_specific_len, 1); sh_audio_t* sh_audio = new_sh_audio(demuxer, i); int j; - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "nut", i); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "nut", i); sh_audio->wf= wf; sh_audio->ds = demuxer->audio; sh_audio->audio.dwSampleSize = 0; // FIXME @@ -133,7 +133,7 @@ static demuxer_t * demux_open_nut(demuxer_t * demuxer) { s[i].codec_specific_len, 1); sh_video_t * sh_video = new_sh_video(demuxer, i); int j; - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "nut", i); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Video stream found, -vid %d\n", "nut", i); sh_video->bih = bih; sh_video->ds = demuxer->video; diff --git a/libmpdemux/demux_real.c b/libmpdemux/demux_real.c index 24e63e75b4..5c4497e4e5 100644 --- a/libmpdemux/demux_real.c +++ b/libmpdemux/demux_real.c @@ -1266,7 +1266,7 @@ static demuxer_t* demux_open_real(demuxer_t* demuxer) int i; char *buft; int hdr_size; - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "real", stream_id); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "real", stream_id); mp_msg(MSGT_DEMUX,MSGL_V,"Found audio stream!\n"); version = stream_read_word(demuxer->stream); mp_msg(MSGT_DEMUX,MSGL_V,"version: %d\n", version); @@ -1467,7 +1467,7 @@ static demuxer_t* demux_open_real(demuxer_t* demuxer) } } else if (strstr(mimet,"X-MP3-draft-00")) { sh_audio_t *sh = new_sh_audio(demuxer, stream_id); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "real", stream_id); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "real", stream_id); /* Emulate WAVEFORMATEX struct: */ sh->wf = malloc(sizeof(WAVEFORMATEX)); @@ -1503,7 +1503,7 @@ static demuxer_t* demux_open_real(demuxer_t* demuxer) } else { /* video header */ sh_video_t *sh = new_sh_video(demuxer, stream_id); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "real", stream_id); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Video stream found, -vid %d\n", "real", stream_id); sh->format = stream_read_dword_le(demuxer->stream); /* fourcc */ mp_msg(MSGT_DEMUX,MSGL_V,"video fourcc: %.4s (%x)\n", (char *)&sh->format, sh->format); @@ -1726,13 +1726,13 @@ header_end: if(demuxer->video->id==-1 && v_streams>0){ // find the valid video stream: if(!ds_fill_buffer(demuxer->video)){ - mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"RM: " MSGTR_MissingVideoStream); + mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"RM: " "No video stream found.\n"); } } if(demuxer->audio->id==-1 && a_streams>0){ // find the valid audio stream: if(!ds_fill_buffer(demuxer->audio)){ - mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"RM: " MSGTR_MissingAudioStream); + mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"RM: " "No audio stream found -> no sound.\n"); } } diff --git a/libmpdemux/demux_ty.c b/libmpdemux/demux_ty.c index 5f6d195767..77dfbe7fd5 100644 --- a/libmpdemux/demux_ty.c +++ b/libmpdemux/demux_ty.c @@ -870,7 +870,7 @@ static demuxer_t* demux_open_ty(demuxer_t* demuxer) if(demuxer->audio->id!=-2) { if(!ds_fill_buffer(demuxer->audio)){ - mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"MPEG: " MSGTR_MissingAudioStream); + mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"MPEG: " "No audio stream found -> no sound.\n"); demuxer->audio->sh=NULL; } else { sh_audio=demuxer->audio->sh;sh_audio->ds=demuxer->audio; diff --git a/libmpdemux/demux_viv.c b/libmpdemux/demux_viv.c index 3482167039..6db7276b41 100644 --- a/libmpdemux/demux_viv.c +++ b/libmpdemux/demux_viv.c @@ -543,7 +543,7 @@ static demuxer_t* demux_open_vivo(demuxer_t* demuxer){ vivo_priv_t* priv=demuxer->priv; if(!ds_fill_buffer(demuxer->video)){ - mp_tmsg(MSGT_DEMUX,MSGL_ERR,"VIVO: " MSGTR_MissingVideoStreamBug); + mp_tmsg(MSGT_DEMUX,MSGL_ERR,"VIVO: " "Missing video stream!? Contact the author, it may be a bug :(\n"); return NULL; } @@ -626,7 +626,7 @@ static demuxer_t* demux_open_vivo(demuxer_t* demuxer){ /* AUDIO init */ if (demuxer->audio->id >= -1){ if(!ds_fill_buffer(demuxer->audio)){ - mp_tmsg(MSGT_DEMUX,MSGL_ERR,"VIVO: " MSGTR_MissingAudioStream); + mp_tmsg(MSGT_DEMUX,MSGL_ERR,"VIVO: " "No audio stream found -> no sound.\n"); } else { sh_audio_t* sh=new_sh_audio(demuxer,1); diff --git a/libmpdemux/demux_xmms.c b/libmpdemux/demux_xmms.c index 1e95738dd9..a75def6e33 100644 --- a/libmpdemux/demux_xmms.c +++ b/libmpdemux/demux_xmms.c @@ -195,7 +195,7 @@ static void init_plugins_from_dir(const char *plugin_dir){ gpi=dlsym(handle, "get_iplugin_info"); if(gpi){ InputPlugin *p=gpi(); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_MPDEMUX_XMMS_FoundPlugin, + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "Found plugin: %s (%s).\n", ent->d_name,p->description); p->handle = handle; p->filename = strdup(filename); @@ -230,7 +230,7 @@ static void init_plugins(void) { static void cleanup_plugins(void) { while(no_plugins>0){ --no_plugins; - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_MPDEMUX_XMMS_ClosingPlugin, + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "Closing plugin: %s.\n", input_plugins[no_plugins]->filename); if(input_plugins[no_plugins]->cleanup) input_plugins[no_plugins]->cleanup(); @@ -284,7 +284,7 @@ static int demux_xmms_open(demuxer_t* demuxer) { ip->get_song_info(demuxer->stream->url,&xmms_title,&xmms_length); if (xmms_length<=0) demuxer->seekable=0; - mp_tmsg(MSGT_DEMUX,MSGL_INFO,MSGTR_MPDEMUX_XMMS_WaitForStart, + mp_tmsg(MSGT_DEMUX,MSGL_INFO,"Waiting for the XMMS plugin to start playback of '%s'...\n", demuxer->stream->url); while (xmms_channels==0) { usleep(10000); diff --git a/libmpdemux/demuxer.c b/libmpdemux/demuxer.c index 468a651bfc..46662cb926 100644 --- a/libmpdemux/demuxer.c +++ b/libmpdemux/demuxer.c @@ -288,9 +288,9 @@ sh_audio_t *new_sh_audio_aid(demuxer_t *demuxer, int id, int aid) return NULL; } if (demuxer->a_streams[id]) { - mp_tmsg(MSGT_DEMUXER, MSGL_WARN, MSGTR_AudioStreamRedefined, id); + mp_tmsg(MSGT_DEMUXER, MSGL_WARN, "WARNING: Audio stream header %d redefined.\n", id); } else { - mp_tmsg(MSGT_DEMUXER, MSGL_V, MSGTR_FoundAudioStream, id); + mp_tmsg(MSGT_DEMUXER, MSGL_V, "==> Found audio stream: %d\n", id); sh_audio_t *sh = calloc(1, sizeof(sh_audio_t)); demuxer->a_streams[id] = sh; sh->aid = aid; @@ -326,9 +326,9 @@ sh_video_t *new_sh_video_vid(demuxer_t *demuxer, int id, int vid) return NULL; } if (demuxer->v_streams[id]) - mp_tmsg(MSGT_DEMUXER, MSGL_WARN, MSGTR_VideoStreamRedefined, id); + mp_tmsg(MSGT_DEMUXER, MSGL_WARN, "WARNING: Video stream header %d redefined.\n", id); else { - mp_tmsg(MSGT_DEMUXER, MSGL_V, MSGTR_FoundVideoStream, id); + mp_tmsg(MSGT_DEMUXER, MSGL_V, "==> Found video stream: %d\n", id); sh_video_t *sh = calloc(1, sizeof *sh); demuxer->v_streams[id] = sh; sh->vid = vid; @@ -505,18 +505,22 @@ int ds_fill_buffer(demux_stream_t *ds) ds->eof = 0; return 1; } + +#define MaybeNI _("Maybe you are playing a non-interleaved stream/file or the codec failed?\n" \ + "For AVI files, try to force non-interleaved mode with the -ni option.\n") + if (demux->audio->packs >= MAX_PACKS || demux->audio->bytes >= MAX_PACK_BYTES) { - mp_tmsg(MSGT_DEMUXER, MSGL_ERR, MSGTR_TooManyAudioInBuffer, + mp_tmsg(MSGT_DEMUXER, MSGL_ERR, "\nToo many audio packets in the buffer: (%d in %d bytes).\n", demux->audio->packs, demux->audio->bytes); - mp_tmsg(MSGT_DEMUXER, MSGL_HINT, MSGTR_MaybeNI); + mp_tmsg(MSGT_DEMUXER, MSGL_HINT, MaybeNI); break; } if (demux->video->packs >= MAX_PACKS || demux->video->bytes >= MAX_PACK_BYTES) { - mp_tmsg(MSGT_DEMUXER, MSGL_ERR, MSGTR_TooManyVideoInBuffer, + mp_tmsg(MSGT_DEMUXER, MSGL_ERR, "\nToo many video packets in the buffer: (%d in %d bytes).\n", demux->video->packs, demux->video->bytes); - mp_tmsg(MSGT_DEMUXER, MSGL_HINT, MSGTR_MaybeNI); + mp_tmsg(MSGT_DEMUXER, MSGL_HINT, MaybeNI); break; } if (!demux_fill_buffer(demux, ds)) { @@ -677,16 +681,16 @@ double ds_get_next_pts(demux_stream_t *ds) while (!ds->first) { if (demux->audio->packs >= MAX_PACKS || demux->audio->bytes >= MAX_PACK_BYTES) { - mp_tmsg(MSGT_DEMUXER, MSGL_ERR, MSGTR_TooManyAudioInBuffer, + mp_tmsg(MSGT_DEMUXER, MSGL_ERR, "\nToo many audio packets in the buffer: (%d in %d bytes).\n", demux->audio->packs, demux->audio->bytes); - mp_tmsg(MSGT_DEMUXER, MSGL_HINT, MSGTR_MaybeNI); + mp_tmsg(MSGT_DEMUXER, MSGL_HINT, MaybeNI); return MP_NOPTS_VALUE; } if (demux->video->packs >= MAX_PACKS || demux->video->bytes >= MAX_PACK_BYTES) { - mp_tmsg(MSGT_DEMUXER, MSGL_ERR, MSGTR_TooManyVideoInBuffer, + mp_tmsg(MSGT_DEMUXER, MSGL_ERR, "\nToo many video packets in the buffer: (%d in %d bytes).\n", demux->video->packs, demux->video->bytes); - mp_tmsg(MSGT_DEMUXER, MSGL_HINT, MSGTR_MaybeNI); + mp_tmsg(MSGT_DEMUXER, MSGL_HINT, MaybeNI); return MP_NOPTS_VALUE; } if (!demux_fill_buffer(demux, ds)) @@ -798,7 +802,7 @@ static demuxer_t *demux_open_stream(struct MPOpts *opts, stream_t *stream, demuxer_t *demux2 = demuxer; // Move messages to demuxer detection code? mp_tmsg(MSGT_DEMUXER, MSGL_INFO, - MSGTR_Detected_XXX_FileFormat, + "%s file format detected.\n", demuxer_desc->shortdesc); file_format = fformat; if (!demuxer->desc->open @@ -828,7 +832,7 @@ static demuxer_t *demux_open_stream(struct MPOpts *opts, stream_t *stream, if (fformat == demuxer_desc->type) { demuxer_t *demux2 = demuxer; mp_tmsg(MSGT_DEMUXER, MSGL_INFO, - MSGTR_Detected_XXX_FileFormat, + "%s file format detected.\n", demuxer_desc->shortdesc); file_format = fformat; if (!demuxer->desc->open @@ -882,7 +886,7 @@ static demuxer_t *demux_open_stream(struct MPOpts *opts, stream_t *stream, if (fformat == demuxer_desc->type) { demuxer_t *demux2 = demuxer; mp_tmsg(MSGT_DEMUXER, MSGL_INFO, - MSGTR_Detected_XXX_FileFormat, + "%s file format detected.\n", demuxer_desc->shortdesc); file_format = fformat; if (!demuxer->desc->open @@ -986,7 +990,7 @@ demuxer_t *demux_open(struct MPOpts *opts, stream_t *vs, int file_format, if (audio_stream) { as = open_stream(audio_stream, 0, &afmt); if (!as) { - mp_tmsg(MSGT_DEMUXER, MSGL_ERR, MSGTR_CannotOpenAudioStream, + mp_tmsg(MSGT_DEMUXER, MSGL_ERR, "Cannot open audio stream: %s\n", audio_stream); return NULL; } @@ -1007,7 +1011,7 @@ demuxer_t *demux_open(struct MPOpts *opts, stream_t *vs, int file_format, if (sub_stream) { ss = open_stream(sub_stream, 0, &sfmt); if (!ss) { - mp_tmsg(MSGT_DEMUXER, MSGL_ERR, MSGTR_CannotOpenSubtitlesStream, + mp_tmsg(MSGT_DEMUXER, MSGL_ERR, "Cannot open subtitle stream: %s\n", sub_stream); return NULL; } @@ -1029,7 +1033,7 @@ demuxer_t *demux_open(struct MPOpts *opts, stream_t *vs, int file_format, audio_demuxer_force, audio_id, -2, -2, audio_stream); if (!ad) { - mp_tmsg(MSGT_DEMUXER, MSGL_WARN, MSGTR_OpeningAudioDemuxerFailed, + mp_tmsg(MSGT_DEMUXER, MSGL_WARN, "Failed to open audio demuxer: %s\n", audio_stream); free_stream(as); } else if (ad->audio->sh @@ -1043,7 +1047,7 @@ demuxer_t *demux_open(struct MPOpts *opts, stream_t *vs, int file_format, sub_stream); if (!sd) { mp_tmsg(MSGT_DEMUXER, MSGL_WARN, - MSGTR_OpeningSubtitlesDemuxerFailed, sub_stream); + "Failed to open subtitle demuxer: %s\n", sub_stream); free_stream(ss); } } @@ -1085,13 +1089,13 @@ int demux_seek(demuxer_t *demuxer, float rel_seek_secs, float audio_delay, if (!demuxer->seekable) { if (demuxer->file_format == DEMUXER_TYPE_AVI) - mp_tmsg(MSGT_SEEK, MSGL_WARN, MSGTR_CantSeekRawAVI); + mp_tmsg(MSGT_SEEK, MSGL_WARN, "Cannot seek in raw AVI streams. (Index required, try with the -idx switch.)\n"); #ifdef CONFIG_TV else if (demuxer->file_format == DEMUXER_TYPE_TV) - mp_tmsg(MSGT_SEEK, MSGL_WARN, MSGTR_TVInputNotSeekable); + mp_tmsg(MSGT_SEEK, MSGL_WARN, "TV input is not seekable! (Seeking will probably be for changing channels ;)\n"); #endif else - mp_tmsg(MSGT_SEEK, MSGL_WARN, MSGTR_CantSeekFile); + mp_tmsg(MSGT_SEEK, MSGL_WARN, "Cannot seek in this file.\n"); return 0; } // clear demux buffers: @@ -1146,7 +1150,7 @@ int demux_info_add(demuxer_t *demuxer, const char *opt, const char *param) for (n = 0; info && info[2 * n] != NULL; n++) { if (!strcasecmp(opt, info[2 * n])) { - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_DemuxerInfoChanged, opt, + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "Demuxer info %s changed to %s\n", opt, param); free(info[2 * n + 1]); info[2 * n + 1] = strdup(param); @@ -1171,7 +1175,7 @@ int demux_info_print(demuxer_t *demuxer) if (!info) return 0; - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_ClipInfo); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "Clip info:\n"); for (n = 0; info[2 * n] != NULL; n++) { mp_msg(MSGT_DEMUX, MSGL_INFO, " %s: %s\n", info[2 * n], info[2 * n + 1]); @@ -1321,7 +1325,7 @@ int demuxer_add_chapter(demuxer_t *demuxer, const char *name, uint64_t start, demuxer->chapters[demuxer->num_chapters].start = start; demuxer->chapters[demuxer->num_chapters].end = end; - demuxer->chapters[demuxer->num_chapters].name = strdup(name ? name : mp_gtext(MSGTR_Unknown)); + demuxer->chapters[demuxer->num_chapters].name = strdup(name ? name : mp_gtext("unknown")); return demuxer->num_chapters++; } diff --git a/libmpdemux/muxer.c b/libmpdemux/muxer.c index f265aee5b5..858c21546b 100644 --- a/libmpdemux/muxer.c +++ b/libmpdemux/muxer.c @@ -68,7 +68,7 @@ void muxer_write_chunk(muxer_stream_t *s, size_t len, unsigned int flags, double tmp = realloc_struct(s->muxer->muxbuf, (num+1), sizeof(muxbuf_t)); if(!tmp) { - mp_tmsg(MSGT_MUXER, MSGL_FATAL, MSGTR_MuxbufReallocErr); + mp_tmsg(MSGT_MUXER, MSGL_FATAL, "Muxer frame buffer cannot reallocate memory!\n"); return; } s->muxer->muxbuf = tmp; @@ -82,7 +82,7 @@ void muxer_write_chunk(muxer_stream_t *s, size_t len, unsigned int flags, double buf->flags = flags; buf->buffer = malloc(len); if (!buf->buffer) { - mp_tmsg(MSGT_MUXER, MSGL_FATAL, MSGTR_MuxbufMallocErr); + mp_tmsg(MSGT_MUXER, MSGL_FATAL, "Muxer frame buffer cannot allocate memory!\n"); return; } memcpy(buf->buffer, s->buffer, buf->len); @@ -96,7 +96,7 @@ void muxer_write_chunk(muxer_stream_t *s, size_t len, unsigned int flags, double /* see if we can flush buffer now */ if (s->muxer->muxbuf_skip_buffer) { - mp_tmsg(MSGT_MUXER, MSGL_V, MSGTR_MuxbufSending, s->muxer->muxbuf_num); + mp_tmsg(MSGT_MUXER, MSGL_V, "Muxer frame buffer sending %d frame(s) to the muxer.\n", s->muxer->muxbuf_num); /* fix parameters for all streams */ for (num = 0; s->muxer->streams[num]; ++num) { @@ -139,7 +139,7 @@ void muxer_write_chunk(muxer_stream_t *s, size_t len, unsigned int flags, double if(s->h.dwSampleSize){ // CBR s->h.dwLength+=len/s->h.dwSampleSize; - if(len%s->h.dwSampleSize) mp_tmsg(MSGT_MUXER, MSGL_WARN, MSGTR_WarningLenIsntDivisible); + if(len%s->h.dwSampleSize) mp_tmsg(MSGT_MUXER, MSGL_WARN, "Warning, len isn't divisible by samplesize!\n"); } else { // VBR s->h.dwLength++; diff --git a/libmpdemux/muxer_avi.c b/libmpdemux/muxer_avi.c index b34d9b7101..6eab6fc569 100644 --- a/libmpdemux/muxer_avi.c +++ b/libmpdemux/muxer_avi.c @@ -273,7 +273,7 @@ static void avifile_write_header(muxer_t *muxer){ struct avi_stream_info *vsi = muxer->def_v->priv; int isodml = vsi->riffofspos > 0; - mp_tmsg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingHeader); + mp_tmsg(MSGT_MUXER, MSGL_INFO, "Writing header...\n"); if (aspect == 0) { mp_msg(MSGT_MUXER, MSGL_INFO, "ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.\n"); } else { @@ -285,11 +285,11 @@ static void avifile_write_header(muxer_t *muxer){ muxer_stream_t *s = muxer->streams[i]; if (s->type == MUXER_TYPE_AUDIO && muxer->audio_delay_fix > 0.0) { s->h.dwStart = muxer->audio_delay_fix * s->h.dwRate/s->h.dwScale + 0.5; - mp_tmsg(MSGT_MUXER, MSGL_INFO, MSGTR_SettingAudioDelay, (float)s->h.dwStart * s->h.dwScale/s->h.dwRate); + mp_tmsg(MSGT_MUXER, MSGL_INFO, "Setting audio delay to %5.3fs.\n", (float)s->h.dwStart * s->h.dwScale/s->h.dwRate); } if (s->type == MUXER_TYPE_VIDEO && muxer->audio_delay_fix < 0.0) { s->h.dwStart = -muxer->audio_delay_fix * s->h.dwRate/s->h.dwScale + 0.5; - mp_tmsg(MSGT_MUXER, MSGL_INFO, MSGTR_SettingVideoDelay, (float)s->h.dwStart * s->h.dwScale/s->h.dwRate); + mp_tmsg(MSGT_MUXER, MSGL_INFO, "Setting video delay to %5.3fs.\n", (float)s->h.dwStart * s->h.dwScale/s->h.dwRate); } } @@ -652,7 +652,7 @@ static void avifile_write_standard_index(muxer_t *muxer){ static void avifile_write_index(muxer_t *muxer){ struct avi_stream_info *vsi = muxer->def_v->priv; - mp_tmsg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingTrailer); + mp_tmsg(MSGT_MUXER, MSGL_INFO, "Writing index...\n"); if (vsi->riffofspos > 0){ avifile_odml_write_index(muxer); } else { diff --git a/libmpdemux/muxer_lavf.c b/libmpdemux/muxer_lavf.c index 5f0ca51e16..f208d52df0 100644 --- a/libmpdemux/muxer_lavf.c +++ b/libmpdemux/muxer_lavf.c @@ -272,7 +272,7 @@ static void write_header(muxer_t *muxer) { muxer_priv_t *priv = (muxer_priv_t *) muxer->priv; - mp_tmsg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingHeader); + mp_tmsg(MSGT_MUXER, MSGL_INFO, "Writing header...\n"); av_write_header(priv->oc); muxer->cont_write_header = NULL; } @@ -283,7 +283,7 @@ static void write_trailer(muxer_t *muxer) int i; muxer_priv_t *priv = (muxer_priv_t *) muxer->priv; - mp_tmsg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingTrailer); + mp_tmsg(MSGT_MUXER, MSGL_INFO, "Writing index...\n"); av_write_trailer(priv->oc); for(i = 0; i < priv->oc->nb_streams; i++) { diff --git a/libmpdemux/muxer_mpeg.c b/libmpdemux/muxer_mpeg.c index d9c9dd7341..9d00a7bdd1 100644 --- a/libmpdemux/muxer_mpeg.c +++ b/libmpdemux/muxer_mpeg.c @@ -2376,7 +2376,7 @@ static void mpegfile_write_index(muxer_t *muxer) double fake_timer; muxer_priv_t *priv = (muxer_priv_t *) muxer->priv; - mp_tmsg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingTrailer); + mp_tmsg(MSGT_MUXER, MSGL_INFO, "Writing index...\n"); for(i = 0; i < muxer->avih.dwStreams; i++) { @@ -2398,7 +2398,7 @@ static void mpegfile_write_header(muxer_t *muxer) { muxer_priv_t *priv = (muxer_priv_t*) muxer->priv; - mp_tmsg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingHeader); + mp_tmsg(MSGT_MUXER, MSGL_INFO, "Writing header...\n"); priv->headers_cnt++; diff --git a/libmpdemux/muxer_rawaudio.c b/libmpdemux/muxer_rawaudio.c index f88c225277..69abf8200b 100644 --- a/libmpdemux/muxer_rawaudio.c +++ b/libmpdemux/muxer_rawaudio.c @@ -16,7 +16,7 @@ static muxer_stream_t* rawaudiofile_new_stream(muxer_t *muxer,int type){ muxer_stream_t* s; if (!muxer) return NULL; if(type==MUXER_TYPE_AUDIO && muxer->avih.dwStreams>=1){ - mp_tmsg(MSGT_MUXER,MSGL_ERR,MSGTR_TooManyStreams" "MSGTR_RawMuxerOnlyOneStream); + mp_tmsg(MSGT_MUXER,MSGL_ERR,"Too many streams!"" ""Rawaudio muxer supports only one audio stream!\n"); return NULL; } s=malloc(sizeof(muxer_stream_t)); @@ -35,12 +35,12 @@ static muxer_stream_t* rawaudiofile_new_stream(muxer_t *muxer,int type){ muxer->avih.dwStreams++; break; case MUXER_TYPE_VIDEO: - mp_tmsg(MSGT_MUXER,MSGL_WARN,MSGTR_IgnoringVideoStream); + mp_tmsg(MSGT_MUXER,MSGL_WARN,"Ignoring video stream!\n"); s->ckid=mmioFOURCC(('0'+s->id/10),('0'+(s->id%10)),'d','c'); s->h.fccType=streamtypeAUDIO; break; default: - mp_tmsg(MSGT_MUXER,MSGL_ERR,MSGTR_UnknownStreamType,type); + mp_tmsg(MSGT_MUXER,MSGL_ERR,"Warning, unknown stream type: %d\n",type); return NULL; } return s; diff --git a/libmpdemux/video.c b/libmpdemux/video.c index 9c8e0a7a0e..2d7e064202 100644 --- a/libmpdemux/video.c +++ b/libmpdemux/video.c @@ -114,7 +114,7 @@ switch(video_codec){ videobuffer=(char*)memalign(8,VIDEOBUFFER_SIZE + MP_INPUT_BUFFER_PADDING_SIZE); if (videobuffer) memset(videobuffer+VIDEOBUFFER_SIZE, 0, MP_INPUT_BUFFER_PADDING_SIZE); else { - mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_ShMemAllocFail); + mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,"Cannot allocate shared memory.\n"); return 0; } } @@ -207,7 +207,7 @@ switch(video_codec){ videobuffer=(char*)memalign(8,VIDEOBUFFER_SIZE + MP_INPUT_BUFFER_PADDING_SIZE); if (videobuffer) memset(videobuffer+VIDEOBUFFER_SIZE, 0, MP_INPUT_BUFFER_PADDING_SIZE); else { - mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_ShMemAllocFail); + mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,"Cannot allocate shared memory.\n"); return 0; } } @@ -260,7 +260,7 @@ mpeg_header_parser: if(i==0x1B3) break; // found it! if(!i || !skip_video_packet(d_video)){ if( mp_msg_test(MSGT_DECVIDEO,MSGL_V) ) mp_msg(MSGT_DECVIDEO,MSGL_V,"NONE :(\n"); - mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_MpegNoSequHdr); + mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,"MPEG: FATAL: EOF while searching for sequence header.\n"); return 0; } } @@ -270,27 +270,27 @@ mpeg_header_parser: videobuffer=(char*)memalign(8,VIDEOBUFFER_SIZE + MP_INPUT_BUFFER_PADDING_SIZE); if (videobuffer) memset(videobuffer+VIDEOBUFFER_SIZE, 0, MP_INPUT_BUFFER_PADDING_SIZE); else { - mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_ShMemAllocFail); + mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,"Cannot allocate shared memory.\n"); return 0; } } if(!read_video_packet(d_video)){ - mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_CannotReadMpegSequHdr); + mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,"FATAL: Cannot read sequence header.\n"); return 0; } if(mp_header_process_sequence_header (&picture, &videobuffer[4])) { - mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_BadMpegSequHdr); + mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,"MPEG: bad sequence header\n"); goto mpeg_header_parser; } if(sync_video_packet(d_video)==0x1B5){ // next packet is seq. ext. int pos=videobuf_len; if(!read_video_packet(d_video)){ - mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_CannotReadMpegSequHdrEx); + mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,"FATAL: Cannot read sequence header extension.\n"); return 0; } if(mp_header_process_extension (&picture, &videobuffer[pos+4])) { - mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_BadMpegSequHdrEx); + mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,"MPEG: bad sequence header extension\n"); return 0; } } @@ -338,7 +338,7 @@ mpeg_header_parser: videobuffer=(char*)memalign(8,VIDEOBUFFER_SIZE + MP_INPUT_BUFFER_PADDING_SIZE); if (videobuffer) memset(videobuffer+VIDEOBUFFER_SIZE, 0, MP_INPUT_BUFFER_PADDING_SIZE); else { - mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_ShMemAllocFail); + mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,"Cannot allocate shared memory.\n"); return 0; } } @@ -472,14 +472,14 @@ int video_read_frame(sh_video_t* sh_video,float* frame_time_ptr,unsigned char** if(telecine){ frame_time=1; if(telecine_cnt<-1.5 || telecine_cnt>1.5){ - mp_tmsg(MSGT_DECVIDEO,MSGL_INFO,MSGTR_LeaveTelecineMode); + mp_tmsg(MSGT_DECVIDEO,MSGL_INFO,"\ndemux_mpg: 30000/1001fps NTSC content detected, switching framerate.\n"); telecine=0; } } else if(telecine_cnt>-0.5 && telecine_cnt<0.5 && !force_fps){ sh_video->fps=sh_video->fps*4/5; sh_video->frametime=sh_video->frametime*5/4; - mp_tmsg(MSGT_DECVIDEO,MSGL_INFO,MSGTR_EnterTelecineMode); + mp_tmsg(MSGT_DECVIDEO,MSGL_INFO,"\ndemux_mpg: 24000/1001fps progressive NTSC content detected, switching framerate.\n"); telecine=1; } } else if(video_codec == VIDEO_MPEG4){ diff --git a/libvo/aspect.c b/libvo/aspect.c index 1243524116..2c4fb59475 100644 --- a/libvo/aspect.c +++ b/libvo/aspect.c @@ -96,9 +96,9 @@ void aspect_fit(struct vo *vo, int *srcw, int *srch, int fitw, int fith) *srcw = tmpw; }else{ #ifndef ASPECT_TEST - mp_tmsg(MSGT_VO,MSGL_WARN,MSGTR_LIBVO_ASPECT_NoSuitableNewResFound); + mp_tmsg(MSGT_VO,MSGL_WARN,"[ASPECT] Warning: No suitable new res found!\n"); #else - mp_tmsg(MSGT_VO,MSGL_WARN,MSGTR_LIBVO_ASPECT_NoNewSizeFoundThatFitsIntoRes); + mp_tmsg(MSGT_VO,MSGL_WARN,"[ASPECT] Error: No new size found that fits into res!\n"); #endif } } diff --git a/libvo/font_load_ft.c b/libvo/font_load_ft.c index ee5f8ce909..5fb0ea4952 100644 --- a/libvo/font_load_ft.c +++ b/libvo/font_load_ft.c @@ -920,7 +920,7 @@ static int load_sub_face(const char *name, int face_index, FT_Face *face) if (err) { err = FT_New_Face(library, MPLAYER_DATADIR "/subfont.ttf", 0, face); if (err) { - mp_tmsg(MSGT_OSD, MSGL_ERR, MSGTR_LIBVO_FONT_LOAD_FT_NewFaceFailed); + mp_tmsg(MSGT_OSD, MSGL_ERR, "New_Face failed. Maybe the font path is wrong.\nPlease supply the text font file (~/.mplayer/subfont.ttf).\n"); return -1; } } @@ -931,7 +931,7 @@ static int load_sub_face(const char *name, int face_index, FT_Face *face) static int load_osd_face(FT_Face *face) { if ( FT_New_Memory_Face(library, osd_font_pfb, sizeof(osd_font_pfb), 0, face) ) { - mp_tmsg(MSGT_OSD, MSGL_ERR, MSGTR_LIBVO_FONT_LOAD_FT_NewMemoryFaceFailed); + mp_tmsg(MSGT_OSD, MSGL_ERR, "New_Memory_Face failed..\n"); return -1; } return 0; @@ -1018,7 +1018,7 @@ font_desc_t* read_font_desc_ft(const char *fname, int face_index, int movie_widt /* generate the subtitle font */ err = load_sub_face(fname, face_index, &face); if (err) { - mp_tmsg(MSGT_OSD, MSGL_WARN, MSGTR_LIBVO_FONT_LOAD_FT_SubFaceFailed); + mp_tmsg(MSGT_OSD, MSGL_WARN, "subtitle font: load_sub_face failed.\n"); goto gen_osd; } desc->face_cnt++; @@ -1035,7 +1035,7 @@ font_desc_t* read_font_desc_ft(const char *fname, int face_index, int movie_widt } if (charset_size < 0) { - mp_tmsg(MSGT_OSD, MSGL_ERR, MSGTR_LIBVO_FONT_LOAD_FT_SubFontCharsetFailed); + mp_tmsg(MSGT_OSD, MSGL_ERR, "subtitle font: prepare_charset failed.\n"); goto err_out; } #else @@ -1049,7 +1049,7 @@ font_desc_t* read_font_desc_ft(const char *fname, int face_index, int movie_widt subtitle_font_thickness, subtitle_font_radius); if (err) { - mp_tmsg(MSGT_OSD, MSGL_ERR, MSGTR_LIBVO_FONT_LOAD_FT_CannotPrepareSubtitleFont); + mp_tmsg(MSGT_OSD, MSGL_ERR, "Cannot prepare subtitle font.\n"); goto err_out; } @@ -1067,14 +1067,14 @@ gen_osd: subtitle_font_thickness, subtitle_font_radius); if (err) { - mp_tmsg(MSGT_OSD, MSGL_ERR, MSGTR_LIBVO_FONT_LOAD_FT_CannotPrepareOSDFont); + mp_tmsg(MSGT_OSD, MSGL_ERR, "Cannot prepare OSD font.\n"); goto err_out; } err = generate_tables(desc, subtitle_font_thickness, subtitle_font_radius); if (err) { - mp_tmsg(MSGT_OSD, MSGL_ERR, MSGTR_LIBVO_FONT_LOAD_FT_CannotGenerateTables); + mp_tmsg(MSGT_OSD, MSGL_ERR, "Cannot generate tables.\n"); goto err_out; } @@ -1129,7 +1129,7 @@ int done_freetype(void) err = FT_Done_FreeType(library); if (err) { - mp_tmsg(MSGT_OSD, MSGL_ERR, MSGTR_LIBVO_FONT_LOAD_FT_DoneFreeTypeFailed); + mp_tmsg(MSGT_OSD, MSGL_ERR, "FT_Done_FreeType failed.\n"); return -1; } diff --git a/libvo/mga_common.c b/libvo/mga_common.c index d2d82489cb..341bf60444 100644 --- a/libvo/mga_common.c +++ b/libvo/mga_common.c @@ -243,7 +243,7 @@ static void mga_fullscreen(void) mga_vid_config.x_org=(vo_screenwidth-w)/2; mga_vid_config.y_org=(vo_screenheight-h)/2; if ( ioctl( f,MGA_VID_CONFIG,&mga_vid_config ) ) - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_ErrorInConfigIoctl ); + mp_tmsg(MSGT_VO,MSGL_WARN, "[MGA] error in mga_vid_config ioctl (wrong mga_vid.o version?)" ); } #endif @@ -267,7 +267,7 @@ static int control(uint32_t request, void *data) if (ioctl(f,MGA_VID_GET_LUMA,&prev)) { perror("Error in mga_vid_config ioctl()"); - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_CouldNotGetLumaValuesFromTheKernelModule); + mp_tmsg(MSGT_VO,MSGL_WARN, "[MGA] Could not get luma values from the kernel module!\n"); return VO_FALSE; } @@ -286,7 +286,7 @@ static int control(uint32_t request, void *data) if (ioctl(f,MGA_VID_SET_LUMA,luma)) { perror("Error in mga_vid_config ioctl()"); - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_CouldNotSetLumaValuesFromTheKernelModule); + mp_tmsg(MSGT_VO,MSGL_WARN, "[MGA] Could not set luma values from the kernel module!\n"); return VO_FALSE; } @@ -304,7 +304,7 @@ static int control(uint32_t request, void *data) if (ioctl(f,MGA_VID_GET_LUMA,&luma)) { perror("Error in mga_vid_config ioctl()"); - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_CouldNotGetLumaValuesFromTheKernelModule); + mp_tmsg(MSGT_VO,MSGL_WARN, "[MGA] Could not get luma values from the kernel module!\n"); return VO_FALSE; } @@ -323,7 +323,7 @@ static int control(uint32_t request, void *data) if (vo_screenwidth && vo_screenheight) mga_fullscreen(); else - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_ScreenWidthHeightUnknown); + mp_tmsg(MSGT_VO,MSGL_WARN, "[MGA] Screen width/height unknown!\n"); return VO_TRUE; case VOCTRL_GET_PANSCAN: if ( !vo_fs ) return VO_FALSE; @@ -380,7 +380,7 @@ static int mga_init(int width,int height,unsigned int format){ mga_vid_config.frame_size = ((width + 31) & ~31) * height * 2; mga_vid_config.format=MGA_VID_FORMAT_UYVY; break; default: - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_InvalidOutputFormat,format); + mp_tmsg(MSGT_VO,MSGL_WARN, "[MGA] invalid output format %0X\n",format); return -1; } @@ -398,7 +398,7 @@ static int mga_init(int width,int height,unsigned int format){ if(width > 1024 && height > 1024) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_MGA_ResolutionTooHigh); + mp_tmsg(MSGT_VO,MSGL_ERR, "[MGA] Source resolution exceeds 1023x1023 in at least one dimension.\n[MGA] Rescale in software or use -lavdopts lowres=1.\n"); return -1; } else if(height <= 1024) { @@ -409,13 +409,13 @@ static int mga_init(int width,int height,unsigned int format){ if(mga_vid_config.card_type != MGA_G550) { // we don't have a G550, so our resolution is too high - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_MGA_ResolutionTooHigh); + mp_tmsg(MSGT_VO,MSGL_ERR, "[MGA] Source resolution exceeds 1023x1023 in at least one dimension.\n[MGA] Rescale in software or use -lavdopts lowres=1.\n"); return -1; } else { // there is a deeper problem // we have a G550, but still couldn't configure mga_vid perror("Error in mga_vid_config ioctl()"); - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_IncompatibleDriverVersion); + mp_tmsg(MSGT_VO,MSGL_WARN, "[MGA] Your mga_vid driver version is incompatible with this MPlayer version!\n"); return -1; } // if we arrived here, then we could successfully configure mga_vid @@ -426,7 +426,7 @@ static int mga_init(int width,int height,unsigned int format){ if (ioctl(f,MGA_VID_CONFIG,&mga_vid_config)) { perror("Error in mga_vid_config ioctl()"); - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_IncompatibleDriverVersion); + mp_tmsg(MSGT_VO,MSGL_WARN, "[MGA] Your mga_vid driver version is incompatible with this MPlayer version!\n"); return -1; } } @@ -470,7 +470,7 @@ static int preinit(const char *vo_subdevice) if(f == -1) { perror("open"); - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_CouldntOpen,devname); + mp_tmsg(MSGT_VO,MSGL_WARN, "[MGA] Couldn't open: %s\n",devname); return -1; } @@ -480,7 +480,7 @@ static int preinit(const char *vo_subdevice) ioctl(f,MGA_VID_GET_VERSION,&ver); if(MGA_VID_VERSION != ver) { - mp_tmsg(MSGT_VO, MSGL_ERR, MSGTR_LIBVO_MGA_mgavidVersionMismatch, ver, MGA_VID_VERSION); + mp_tmsg(MSGT_VO, MSGL_ERR, "[MGA] mismatch between kernel (%u) and MPlayer (%u) mga_vid driver versions\n", ver, MGA_VID_VERSION); return -1; } diff --git a/libvo/sub.c b/libvo/sub.c index 234201f5ff..708d7ab6f0 100644 --- a/libvo/sub.c +++ b/libvo/sub.c @@ -66,19 +66,19 @@ struct osd_text_p { //^ char * const sub_osd_names[]={ - _(MSGTR_VO_SUB_Seekbar), - _(MSGTR_VO_SUB_Play), - _(MSGTR_VO_SUB_Pause), - _(MSGTR_VO_SUB_Stop), - _(MSGTR_VO_SUB_Rewind), - _(MSGTR_VO_SUB_Forward), - _(MSGTR_VO_SUB_Clock), - _(MSGTR_VO_SUB_Contrast), - _(MSGTR_VO_SUB_Saturation), - _(MSGTR_VO_SUB_Volume), - _(MSGTR_VO_SUB_Brightness), - _(MSGTR_VO_SUB_Hue), - _(MSGTR_VO_SUB_Balance) + _("Seekbar"), + _("Play"), + _("Pause"), + _("Stop"), + _("Rewind"), + _("Forward"), + _("Clock"), + _("Contrast"), + _("Saturation"), + _("Volume"), + _("Brightness"), + _("Hue"), + _("Balance") }; char * const sub_osd_names_short[] ={ "", "|>", "||", "[]", "<<" , ">>", "", "", "", "", "", "", "" }; diff --git a/libvo/vesa_lvo.c b/libvo/vesa_lvo.c index e388ae8f05..382e53515a 100644 --- a/libvo/vesa_lvo.c +++ b/libvo/vesa_lvo.c @@ -64,14 +64,14 @@ extern struct vo_old_functions video_out_vesa; int vlvo_preinit(const char *drvname) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_VESA_ThisBranchIsNoLongerSupported); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VESA_LVO] This branch is no longer supported.\n[VESA_LVO] Please use -vo vesa:vidix instead.\n"); return -1; if( mp_msg_test(MSGT_VO,MSGL_DBG2) ) { mp_msg(MSGT_VO,MSGL_DBG2, "vesa_lvo: vlvo_preinit(%s) was called\n",drvname);} lvo_handler = open(drvname,O_RDWR); if(lvo_handler == -1) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_VESA_CouldntOpen,drvname); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VESA_LVO] Couldn't open: '%s'\n",drvname); return -1; } /* we are able to tune up this stuff depend on fourcc format */ @@ -88,7 +88,7 @@ int vlvo_init(unsigned src_width,unsigned src_height, unsigned dst_height,unsigned format,unsigned dest_bpp) { size_t i,awidth; - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_VESA_ThisBranchIsNoLongerSupported); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VESA_LVO] This branch is no longer supported.\n[VESA_LVO] Please use -vo vesa:vidix instead.\n"); return -1; if( mp_msg_test(MSGT_VO,MSGL_DBG2) ) { mp_msg(MSGT_VO,MSGL_DBG2, "vesa_lvo: vlvo_init() was called\n");} @@ -127,7 +127,7 @@ int vlvo_init(unsigned src_width,unsigned src_height, mga_vid_config.frame_size = awidth*src_height*4; break; default: - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_VESA_InvalidOutputFormat,vo_format_name(format),format); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VESA_LVI] Invalid output format: %s(%0X)\n",vo_format_name(format),format); return -1; } mga_vid_config.colkey_on=0; @@ -141,7 +141,7 @@ int vlvo_init(unsigned src_width,unsigned src_height, if (ioctl(lvo_handler,MGA_VID_CONFIG,&mga_vid_config)) { perror("vesa_lvo: Error in mga_vid_config ioctl()"); - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_VESA_IncompatibleDriverVersion); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VESA_LVO] Your fb_vid driver version is incompatible with this MPlayer version!\n"); return -1; } ioctl(lvo_handler,MGA_VID_ON,0); diff --git a/libvo/video_out.c b/libvo/video_out.c index 85e59a3e8c..13f4f937f7 100644 --- a/libvo/video_out.c +++ b/libvo/video_out.c @@ -318,7 +318,7 @@ void vo_destroy(struct vo *vo) void list_video_out(void) { int i = 0; - mp_tmsg(MSGT_CPLAYER, MSGL_INFO, MSGTR_AvailableVideoOutputDrivers); + mp_tmsg(MSGT_CPLAYER, MSGL_INFO, "Available video output drivers:\n"); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VIDEO_OUTPUTS\n"); while (video_out_drivers[i]) { const vo_info_t *info = video_out_drivers[i++]->info; @@ -346,9 +346,9 @@ struct vo *init_best_video_out(struct MPOpts *opts, struct vo_x11_state *x11, char *name = strdup(vo_list[0]); vo_subdevice = strchr(name,':'); if (!strcmp(name, "pgm")) - mp_tmsg(MSGT_CPLAYER, MSGL_ERR, MSGTR_VO_PGM_HasBeenReplaced); + mp_tmsg(MSGT_CPLAYER, MSGL_ERR, "The pgm video output driver has been replaced by -vo pnm:pgmyuv.\n"); if (!strcmp(name, "md5")) - mp_tmsg(MSGT_CPLAYER, MSGL_ERR, MSGTR_VO_MD5_HasBeenReplaced); + mp_tmsg(MSGT_CPLAYER, MSGL_ERR, "The md5 video output driver has been replaced by -vo md5sum.\n"); if (vo_subdevice) { vo_subdevice[0] = 0; ++vo_subdevice; diff --git a/libvo/vo_3dfx.c b/libvo/vo_3dfx.c index 9aa39e4ff9..ad7ddd5a9f 100644 --- a/libvo/vo_3dfx.c +++ b/libvo/vo_3dfx.c @@ -169,12 +169,12 @@ create_window(Display *display, char *title) bpp = attribs.depth; if (bpp != 16) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_3DFX_Only16BppSupported); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_3DFX] Only 16bpp supported!"); exit(-1); } XMatchVisualInfo(display,screen,bpp,TrueColor,&vinfo); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_3DFX_VisualIdIs,vinfo.visualid); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_3DFX] Visual ID is %lx.\n",vinfo.visualid); theCmap = XCreateColormap(display, RootWindow(display,screen), vinfo.visual, AllocNone); @@ -335,7 +335,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin // Open driver device if ( fd == -1 ) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_3DFX_UnableToOpenDevice); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_3DFX] Unable to open /dev/3dfx.\n"); return -1; } @@ -354,7 +354,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin data.device = 0; if ((retval = ioctl(fd,_IOC(_IOC_READ,'3',3,0),&data)) < 0) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_3DFX_Error,retval); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_3DFX] Error: %d.\n",retval); return -1; } @@ -365,7 +365,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin data.device = 0; if ((retval = ioctl(fd,_IOC(_IOC_READ,'3',3,0),&data)) < 0) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_3DFX_Error,retval); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_3DFX] Error: %d.\n",retval); return -1; } @@ -374,7 +374,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin memBase1 = mmap(0,3*page_space,PROT_READ | PROT_WRITE,MAP_SHARED,fd,baseAddr1); if (memBase0 == (uint32_t *) 0xFFFFFFFF || memBase1 == (uint32_t *) 0xFFFFFFFF) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_3DFX_CouldntMapMemoryArea, + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_3DFX] Couldn't map 3dfx memory areas: %p,%p,%d.\n", memBase0,memBase1,errno); } @@ -413,7 +413,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin atexit(restore); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_3DFX_DisplayInitialized,memBase1); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_3DFX] Initialized: %p.\n",memBase1); return 0; } @@ -485,13 +485,13 @@ static int preinit(const char *arg) { if ( (fd = open("/dev/3dfx",O_RDWR) ) == -1) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_3DFX_UnableToOpenDevice); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_3DFX] Unable to open /dev/3dfx.\n"); return -1; } if(arg) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_3DFX_UnknownSubdevice,arg); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_3DFX] Unknown subdevice: %s.\n",arg); return ENOSYS; } return 0; diff --git a/libvo/vo_aa.c b/libvo/vo_aa.c index b97bbaf75a..d8148793a1 100644 --- a/libvo/vo_aa.c +++ b/libvo/vo_aa.c @@ -617,9 +617,16 @@ static int parse_suboptions(const char *arg) { helpmsg = strdup(aa_help); for (i=0; i<(signed)strlen(helpmsg); i++) if (helpmsg[i] == '-') helpmsg[i] = ' '; - mp_tmsg(MSGT_VO, MSGL_INFO, MSGTR_VO_AA_HelpHeader); + mp_tmsg(MSGT_VO, MSGL_INFO, "\n\nHere are the aalib vo_aa suboptions:\n"); mp_msg(MSGT_VO, MSGL_INFO, "%s\n\n", helpmsg); - mp_tmsg(MSGT_VO, MSGL_INFO, MSGTR_VO_AA_AdditionalOptions); +#define VO_AA_AdditionalOptions _("Additional options vo_aa provides:\n" \ +" help print this help message\n" \ +" osdcolor set OSD color\n subcolor set subtitle color\n" \ +" the color parameters are:\n 0 : normal\n" \ +" 1 : dim\n 2 : bold\n 3 : boldfont\n" \ +" 4 : reverse\n 5 : special\n\n\n") + + mp_tmsg(MSGT_VO, MSGL_INFO, VO_AA_AdditionalOptions); retval = -1; } if (retval == 0) { diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c index 2fa9b54abc..f5df411a5a 100644 --- a/libvo/vo_dxr3.c +++ b/libvo/vo_dxr3.c @@ -186,7 +186,7 @@ static int control(uint32_t request, void *data) return VO_TRUE; case VOCTRL_SET_SPU_PALETTE: if (ioctl(fd_spu, EM8300_IOCTL_SPU_SETPALETTE, data) < 0) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_UnableToLoadNewSPUPalette); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] Unable to load new SPU palette!\n"); return VO_ERROR; } return VO_TRUE; @@ -216,7 +216,7 @@ static int control(uint32_t request, void *data) if (dxr3_prebuf) { ioval = EM8300_PLAYMODE_PLAY; if (ioctl(fd_control, EM8300_IOCTL_SET_PLAYMODE, &ioval) < 0) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_UnableToSetPlaymode); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Unable to set playmode!\n"); } } return VO_TRUE; @@ -224,7 +224,7 @@ static int control(uint32_t request, void *data) if (dxr3_prebuf) { ioval = EM8300_PLAYMODE_PAUSED; if (ioctl(fd_control, EM8300_IOCTL_SET_PLAYMODE, &ioval) < 0) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_UnableToSetPlaymode); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Unable to set playmode!\n"); } } return VO_TRUE; @@ -319,7 +319,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ /* up in a lockup */ ioval = EM8300_SPUMODE_ON; if (ioctl(fd_control, EM8300_IOCTL_SET_SPUMODE, &ioval) < 0) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_UnableToSetSubpictureMode); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Unable to set subpicture mode!\n"); uninit(); return -1; } @@ -327,7 +327,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ /* Set the playmode to play (just in case another app has set it to something else) */ ioval = EM8300_PLAYMODE_PLAY; if (ioctl(fd_control, EM8300_IOCTL_SET_PLAYMODE, &ioval) < 0) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_UnableToSetPlaymode); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Unable to set playmode!\n"); } /* Start em8300 prebuffering and sync engine */ @@ -359,7 +359,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ monitor_aspect = (float) width / (float) height; if (ioctl(fd_control, EM8300_IOCTL_GET_VIDEOMODE, &old_vmode) < 0) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_UnableToGetTVNorm); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Unable to get TV norm!\n"); old_vmode = -1; } @@ -378,7 +378,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ ioval = EM8300_VIDEOMODE_PAL; } - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_AutoSelectedTVNormByFrameRate); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Auto-selected TV norm by framerate: "); ioval == EM8300_VIDEOMODE_PAL60 ? mp_msg(MSGT_VO,MSGL_INFO, "PAL-60") : mp_msg(MSGT_VO,MSGL_INFO, "PAL"); printf(".\n"); } else { @@ -388,14 +388,14 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ ioval = EM8300_VIDEOMODE_PAL; } - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_AutoSelectedTVNormByFrameRate); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Auto-selected TV norm by framerate: "); ioval == EM8300_VIDEOMODE_NTSC ? mp_msg(MSGT_VO,MSGL_INFO, "NTSC") : mp_msg(MSGT_VO,MSGL_INFO, "PAL"); printf(".\n"); } if (old_vmode != ioval) { if (ioctl(fd_control, EM8300_IOCTL_SET_VIDEOMODE, &ioval) < 0) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_UnableToSetTVNorm); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Unable to set TV norm!\n"); } } } @@ -406,10 +406,10 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ aspect_save_prescale(d_width, d_height); ioctl(fd_control, EM8300_IOCTL_GET_VIDEOMODE, &ioval); if (ioval == EM8300_VIDEOMODE_NTSC) { - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_SettingUpForNTSC); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Setting up for NTSC.\n"); aspect_save_screenres(352, 240); } else { - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_SettingUpForPALSECAM); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Setting up for PAL/SECAM.\n"); aspect_save_screenres(352, 288); } aspect(&s_width, &s_height, A_ZOOM); @@ -422,10 +422,10 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ tmp2 = abs(d_height - (int) (d_width / 2.35)); if (tmp1 < tmp2) { ioval = EM8300_ASPECTRATIO_4_3; - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_SettingAspectRatioTo43); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Setting aspect ratio to 4:3.\n"); } else { ioval = EM8300_ASPECTRATIO_16_9; - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_SettingAspectRatioTo169); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Setting aspect ratio to 16:9.\n"); } ioctl(fd_control, EM8300_IOCTL_SET_ASPECTRATIO, &ioval); @@ -444,20 +444,20 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ osdpicbuf = calloc( 1,s_width * s_height); if (osdpicbuf == NULL) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_OutOfMemory); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] out of memory\n"); return -1; } spued = (encodedata *) malloc(sizeof(encodedata)); if (spued == NULL) { free( osdpicbuf ); - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_OutOfMemory); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] out of memory\n"); return -1; } spubuf = (encodedata *) malloc(sizeof(encodedata)); if (spubuf == NULL) { free( osdpicbuf ); free( spued ); - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_OutOfMemory); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] out of memory\n"); return -1; } osd_w = s_width; @@ -536,13 +536,13 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ ((key_color.blue >> (16 - blue_prec)) << blue_shift)); key_color.flags = DoRed | DoGreen | DoBlue; if (!XAllocColor(mDisplay, cmap, &key_color)) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_UnableToAllocateKeycolor); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] Unable to allocate keycolor!\n"); return -1; } acq_color = ((key_color.red / 256) << 16) | ((key_color.green / 256) << 8) | key_color.blue; if (key_color.pixel != KEY_COLOR) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_UnableToAllocateExactKeycolor, key_color.pixel); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Unable to allocate exact keycolor, using closest match (0x%lx).\n", key_color.pixel); } /* Set keycolor and activate overlay */ @@ -696,7 +696,7 @@ static int draw_slice(uint8_t *srcimg[], int stride[], int w, int h, int x0, int static void uninit(void) { - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_Uninitializing); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Uninitializing.\n"); #ifdef CONFIG_X11 if (dxr3_overlay) { overlay_set_mode(overlay_data, EM8300_OVERLAY_MODE_OFF); @@ -714,7 +714,7 @@ static void uninit(void) #endif if (old_vmode != -1) { if (ioctl(fd_control, EM8300_IOCTL_SET_VIDEOMODE, &old_vmode) < 0) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_FailedRestoringTVNorm); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Failed restoring TV norm!\n"); } } @@ -749,24 +749,24 @@ static int preinit(const char *arg) /* Parse commandline */ while (arg) { if (!strncmp("prebuf", arg, 6) && !dxr3_prebuf) { - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_EnablingPrebuffering); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Enabling prebuffering.\n"); dxr3_prebuf = 1; } else if (!strncmp("sync", arg, 4) && !dxr3_newsync) { - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_UsingNewSyncEngine); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Using new sync engine.\n"); dxr3_newsync = 1; } else if (!strncmp("overlay", arg, 7) && !dxr3_overlay) { #ifdef CONFIG_X11 - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_UsingOverlay); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Using overlay.\n"); dxr3_overlay = 1; #else - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_ErrorYouNeedToCompileMplayerWithX11); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Error: Overlay requires compiling with X11 libs/headers installed.\n"); #endif } else if (!strncmp("norm=", arg, 5)) { arg += 5; // dxr3_norm is 0 (-> don't change norm) by default // but maybe someone changes this in the future - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_WillSetTVNormTo); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Will set TV norm to: "); if (*arg == '5') { dxr3_norm = 5; @@ -779,16 +779,16 @@ static int preinit(const char *arg) mp_msg(MSGT_VO,MSGL_INFO, "PAL"); } else if (*arg == '2') { dxr3_norm = 2; - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_AutoAdjustToMovieFrameRatePALPAL60); + mp_tmsg(MSGT_VO,MSGL_INFO, "auto-adjust to movie framerate (PAL/PAL-60)"); } else if (*arg == '1') { dxr3_norm = 1; - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_AutoAdjustToMovieFrameRatePALNTSC); + mp_tmsg(MSGT_VO,MSGL_INFO, "auto-adjust to movie framerate (PAL/NTSC)"); } else if (*arg == '0') { dxr3_norm = 0; - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_UseCurrentNorm); + mp_tmsg(MSGT_VO,MSGL_INFO, "Use current norm."); } else { dxr3_norm = 0; - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_UseUnknownNormSuppliedCurrentNorm); + mp_tmsg(MSGT_VO,MSGL_INFO, "Unknown norm supplied. Use current norm."); } mp_msg(MSGT_VO,MSGL_INFO, ".\n"); @@ -808,15 +808,15 @@ static int preinit(const char *arg) fd_control = open(devname, fdflags); if (fd_control < 1) { /* Fall back to old naming scheme */ - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_ErrorOpeningForWritingTrying, devname); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Error opening %s for writing, trying /dev/em8300 instead.\n", devname); sprintf(devname, "/dev/em8300"); fd_control = open(devname, fdflags); if (fd_control < 1) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_ErrorOpeningForWritingAsWell); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] Error opening /dev/em8300 for writing as well!\nBailing out.\n"); return -1; } } else { - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_Opened, devname); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Opened: %s.\n", devname); } /* Open the video interface */ @@ -824,16 +824,16 @@ static int preinit(const char *arg) fd_video = open(devname, fdflags); if (fd_video < 0) { /* Fall back to old naming scheme */ - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_ErrorOpeningForWritingTryingMV, devname); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Error opening %s for writing, trying /dev/em8300_mv instead.\n", devname); sprintf(devname, "/dev/em8300_mv"); fd_video = open(devname, fdflags); if (fd_video < 0) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_ErrorOpeningForWritingAsWellMV); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] Error opening /dev/em8300_mv for writing as well!\nBailing out.\n"); uninit(); return -1; } } else { - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_Opened, devname); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Opened: %s.\n", devname); } strcpy(fdv_name, devname); @@ -842,16 +842,16 @@ static int preinit(const char *arg) fd_spu = open(devname, fdflags); if (fd_spu < 0) { /* Fall back to old naming scheme */ - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_ErrorOpeningForWritingTryingSP, devname); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Error opening %s for writing, trying /dev/em8300_sp instead.\n", devname); sprintf(devname, "/dev/em8300_sp"); fd_spu = open(devname, fdflags); if (fd_spu < 0) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_ErrorOpeningForWritingAsWellSP); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] Error opening /dev/em8300_sp for writing as well!\nBailing out.\n"); uninit(); return -1; } } else { - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_Opened, devname); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Opened: %s.\n", devname); } strcpy(fds_name, devname); @@ -868,7 +868,7 @@ static int preinit(const char *arg) dpy = XOpenDisplay(NULL); if (!dpy) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_UnableToOpenDisplayDuringHackSetup); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] Unable to open display during overlay hack setup!\n"); return -1; } XGetWindowAttributes(dpy, RootWindow(dpy, DefaultScreen(dpy)), &attribs); @@ -888,7 +888,7 @@ static int preinit(const char *arg) if (!use_gui) { #endif if (!vo_init()) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_UnableToInitX11); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] Unable to init X11!\n"); return -1; } #ifdef CONFIG_GUI @@ -927,7 +927,7 @@ static int overlay_set_attribute(overlay_t *o, int attribute, int value) attr.value = value; if (ioctl(o->dev, EM8300_IOCTL_OVERLAY_SET_ATTRIBUTE, &attr)==-1) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_FailedSettingOverlayAttribute); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Failed setting overlay attribute.\n"); return -1; } @@ -1133,7 +1133,7 @@ static int overlay_set_screen(overlay_t *o, int xres, int yres, int depth) if (ioctl(o->dev, EM8300_IOCTL_OVERLAY_SETSCREEN, &scr)==-1) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_FailedSettingOverlayScreen); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Failed setting overlay screen!\nExiting.\n"); return -1; } return 0; @@ -1142,7 +1142,7 @@ static int overlay_set_screen(overlay_t *o, int xres, int yres, int depth) static int overlay_set_mode(overlay_t *o, int mode) { if (ioctl(o->dev, EM8300_IOCTL_OVERLAY_SETMODE, &mode)==-1) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_FailedEnablingOverlay); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Failed enabling overlay!\nExiting.\n"); return -1; } return 0; @@ -1158,7 +1158,7 @@ static int overlay_set_window(overlay_t *o, int xpos,int ypos,int width,int heig if (ioctl(o->dev, EM8300_IOCTL_OVERLAY_SETWINDOW, &win)==-1) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_FailedResizingOverlayWindow); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Failed resizing overlay window!\n"); return -1; } return 0; @@ -1173,7 +1173,7 @@ static int overlay_set_bcs(overlay_t *o, int brightness, int contrast, int satur if (ioctl(o->dev, EM8300_IOCTL_GETBCS, &bcs)==-1) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_FailedSettingOverlayBcs); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Failed setting overlay bcs!\n"); return -1; } return 0; @@ -1261,11 +1261,11 @@ static int overlay_autocalibrate(overlay_t *o, pattern_drawer_cb pd, void *arg) cal.cal_mode = EM8300_OVERLAY_CALMODE_YOFFSET; if (ioctl(o->dev, EM8300_IOCTL_OVERLAY_CALIBRATE, &cal)) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_FailedGettingOverlayYOffsetValues); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Failed getting overlay Y-offset values!\nExiting.\n"); return -1; } o->yoffset = cal.result; - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_YOffset,cal.result); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Yoffset: %d.\n",cal.result); /* Calibrate X-offset */ @@ -1274,11 +1274,11 @@ static int overlay_autocalibrate(overlay_t *o, pattern_drawer_cb pd, void *arg) cal.cal_mode = EM8300_OVERLAY_CALMODE_XOFFSET; if (ioctl(o->dev, EM8300_IOCTL_OVERLAY_CALIBRATE, &cal)) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_FailedGettingOverlayXOffsetValues); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Failed getting overlay X-offset values!\nExiting.\n"); return -1; } o->xoffset = cal.result; - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_XOffset,cal.result); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Xoffset: %d.\n",cal.result); /* Calibrate X scale correction */ @@ -1287,10 +1287,10 @@ static int overlay_autocalibrate(overlay_t *o, pattern_drawer_cb pd, void *arg) cal.cal_mode = EM8300_OVERLAY_CALMODE_XCORRECTION; if (ioctl(o->dev, EM8300_IOCTL_OVERLAY_CALIBRATE, &cal)) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_FailedGettingOverlayXScaleCorrection); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Failed getting overlay X scale correction!\nExiting.\n"); return -1; } - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_XCorrection,cal.result); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Xcorrection: %d.\n",cal.result); o->xcorr = cal.result; win.xpos = 10; @@ -1298,7 +1298,7 @@ static int overlay_autocalibrate(overlay_t *o, pattern_drawer_cb pd, void *arg) win.width = o->xres-20; win.height = o->yres-20; if (ioctl(o->dev, EM8300_IOCTL_OVERLAY_SETWINDOW, &win)==-1) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_FailedResizingOverlayWindow); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] Failed resizing overlay window!\n"); exit(1); } @@ -1361,7 +1361,7 @@ static int overlay_autocalibrate(overlay_t *o, pattern_drawer_cb pd, void *arg) static int overlay_signalmode(overlay_t *o, int mode) { if(ioctl(o->dev, EM8300_IOCTL_OVERLAY_SIGNALMODE, &mode) ==-1) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_FailedSetSignalMix); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Failed to set signal mix!\n"); return -1; } return 0; diff --git a/libvo/vo_jpeg.c b/libvo/vo_jpeg.c index 7853a49acb..d7d50f50a7 100644 --- a/libvo/vo_jpeg.c +++ b/libvo/vo_jpeg.c @@ -118,36 +118,36 @@ static void jpeg_mkdir(char *buf, int verbose) { case EEXIST: if ( stat(buf, &stat_p ) < 0 ) { mp_msg(MSGT_VO, MSGL_ERR, "%s: %s: %s\n", info.short_name, - _(MSGTR_VO_GenericError), strerror(errno) ); + _("This error has occurred"), strerror(errno) ); mp_msg(MSGT_VO, MSGL_ERR, "%s: %s %s\n", info.short_name, - _(MSGTR_VO_UnableToAccess), buf); - exit_player_bad(_(MSGTR_Exit_error)); + _("Unable to access"), buf); + exit_player_bad(_("Fatal error")); } if ( !S_ISDIR(stat_p.st_mode) ) { mp_msg(MSGT_VO, MSGL_ERR, "%s: %s %s\n", info.short_name, - buf, _(MSGTR_VO_ExistsButNoDirectory)); - exit_player_bad(_(MSGTR_Exit_error)); + buf, _("already exists, but is not a directory.")); + exit_player_bad(_("Fatal error")); } if ( !(stat_p.st_mode & S_IWUSR) ) { mp_msg(MSGT_VO, MSGL_ERR, "%s: %s - %s\n", info.short_name, - buf, _(MSGTR_VO_DirExistsButNotWritable)); - exit_player_bad(_(MSGTR_Exit_error)); + buf, _("Output directory already exists, but is not writable.")); + exit_player_bad(_("Fatal error")); } mp_msg(MSGT_VO, MSGL_INFO, "%s: %s - %s\n", info.short_name, - buf, _(MSGTR_VO_DirExistsAndIsWritable)); + buf, _("Output directory already exists and is writable.")); break; default: mp_msg(MSGT_VO, MSGL_ERR, "%s: %s: %s\n", info.short_name, - _(MSGTR_VO_GenericError), strerror(errno) ); + _("This error has occurred"), strerror(errno) ); mp_msg(MSGT_VO, MSGL_ERR, "%s: %s - %s\n", info.short_name, - buf, _(MSGTR_VO_CantCreateDirectory)); - exit_player_bad(_(MSGTR_Exit_error)); + buf, _("Unable to create output directory.")); + exit_player_bad(_("Fatal error")); } /* end switch */ } else if ( verbose ) { mp_msg(MSGT_VO, MSGL_INFO, "%s: %s - %s\n", info.short_name, - buf, _(MSGTR_VO_DirectoryCreateSuccess)); + buf, _("Output directory successfully created.")); } /* end if */ } @@ -188,11 +188,11 @@ static uint32_t jpeg_write(uint8_t * name, uint8_t * buffer) if ( !buffer ) return 1; if ( (outfile = fopen(name, "wb") ) == NULL ) { mp_msg(MSGT_VO, MSGL_ERR, "\n%s: %s\n", info.short_name, - _(MSGTR_VO_CantCreateFile)); + _("Unable to create output file.")); mp_msg(MSGT_VO, MSGL_ERR, "%s: %s: %s\n", - info.short_name, _(MSGTR_VO_GenericError), - strerror(errno) ); - exit_player_bad(_(MSGTR_Exit_error)); + info.short_name, _("This error has occurred"), + strerror(errno) ); + exit_player_bad(_("Fatal error")); } cinfo.err = jpeg_std_error(&jerr); @@ -357,7 +357,7 @@ static int preinit(const char *arg) const char *info_message = NULL; mp_msg(MSGT_VO, MSGL_INFO, "%s: %s\n", info.short_name, - _(MSGTR_VO_ParsingSuboptions)); + _("Parsing suboptions.")); jpeg_progressive_mode = 0; jpeg_baseline = 1; @@ -372,12 +372,12 @@ static int preinit(const char *arg) return -1; } - if (jpeg_progressive_mode) info_message = _(MSGTR_VO_JPEG_ProgressiveJPEG); - else info_message = _(MSGTR_VO_JPEG_NoProgressiveJPEG); + if (jpeg_progressive_mode) info_message = _("Progressive JPEG enabled."); + else info_message = _("Progressive JPEG disabled."); mp_msg(MSGT_VO, MSGL_INFO, "%s: %s\n", info.short_name, info_message); - if (jpeg_baseline) info_message = _(MSGTR_VO_JPEG_BaselineJPEG); - else info_message = _(MSGTR_VO_JPEG_NoBaselineJPEG); + if (jpeg_baseline) info_message = _("Baseline JPEG enabled."); + else info_message = _("Baseline JPEG disabled."); mp_msg(MSGT_VO, MSGL_INFO, "%s: %s\n", info.short_name, info_message); mp_msg(MSGT_VO, MSGL_V, "%s: optimize --> %d\n", info.short_name, @@ -398,7 +398,7 @@ static int preinit(const char *arg) } mp_msg(MSGT_VO, MSGL_INFO, "%s: %s\n", info.short_name, - _(MSGTR_VO_SuboptionsParsedOK)); + _("Suboptions parsed OK.")); return 0; } diff --git a/libvo/vo_md5sum.c b/libvo/vo_md5sum.c index be51ce6b23..a431e91c00 100644 --- a/libvo/vo_md5sum.c +++ b/libvo/vo_md5sum.c @@ -85,8 +85,8 @@ int framenum = 0; */ static void md5sum_write_error(void) { - mp_tmsg(MSGT_VO, MSGL_ERR, MSGTR_ErrorWritingFile, info.short_name); - exit_player_bad(_(MSGTR_Exit_error)); + mp_tmsg(MSGT_VO, MSGL_ERR, "%s: Error writing file.\n", info.short_name); + exit_player_bad(_("Fatal error")); } /* ------------------------------------------------------------------------- */ @@ -113,7 +113,7 @@ static int preinit(const char *arg) }; mp_msg(MSGT_VO, MSGL_INFO, "%s: %s\n", info.short_name, - _(MSGTR_VO_ParsingSuboptions)); + _("Parsing suboptions.")); md5sum_outfile = strdup("md5sums"); if (subopt_parse(arg, subopts) != 0) { @@ -124,7 +124,7 @@ static int preinit(const char *arg) md5sum_outfile); mp_msg(MSGT_VO, MSGL_INFO, "%s: %s\n", info.short_name, - _(MSGTR_VO_SuboptionsParsedOK)); + _("Suboptions parsed OK.")); return 0; } @@ -149,10 +149,10 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, if ( (md5sum_fd = fopen(md5sum_outfile, "w") ) == NULL ) { mp_msg(MSGT_VO, MSGL_ERR, "\n%s: %s\n", info.short_name, - _(MSGTR_VO_CantCreateFile)); + _("Unable to create output file.")); mp_msg(MSGT_VO, MSGL_ERR, "%s: %s: %s\n", - info.short_name, _(MSGTR_VO_GenericError), strerror(errno) ); - exit_player_bad(_(MSGTR_Exit_error)); + info.short_name, _("This error has occurred"), strerror(errno) ); + exit_player_bad(_("Fatal error")); } return 0; diff --git a/libvo/vo_mga.c b/libvo/vo_mga.c index ca8ddaf9fd..3f730fe5d4 100644 --- a/libvo/vo_mga.c +++ b/libvo/vo_mga.c @@ -85,7 +85,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ aspect(&d_width,&d_height,A_NOZOOM); vo_fs = VO_FALSE; } - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_MGA_AspectResized,d_width,d_height); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_MGA] aspect(): resized to %dx%d.\n",d_width,d_height); } vo_dwidth=d_width; vo_dheight=d_height; @@ -103,7 +103,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ static void uninit(void) { - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_MGA_Uninit); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO] uninit!\n"); mga_uninit(); } diff --git a/libvo/vo_null.c b/libvo/vo_null.c index 53c4b335df..a59b69a124 100644 --- a/libvo/vo_null.c +++ b/libvo/vo_null.c @@ -92,7 +92,7 @@ static int preinit(const char *arg) { if(arg) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_NULL_UnknownSubdevice,arg); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_NULL] Unknown subdevice: %s.\n",arg); return ENOSYS; } return 0; diff --git a/libvo/vo_png.c b/libvo/vo_png.c index d493beea44..5077ef91c5 100644 --- a/libvo/vo_png.c +++ b/libvo/vo_png.c @@ -63,9 +63,9 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin { if(z_compression == 0) { - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_PNG_Warning1); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_PNG_Warning2); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_PNG_Warning3); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_PNG] Warning: compression level set to 0, compression disabled!\n"); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_PNG] Info: Use -vo png:z=<n> to set compression level from 0 to 9.\n"); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_PNG] Info: (0 = no compression, 1 = fastest, lowest - 9 best, slowest compression)\n"); } mp_msg(MSGT_VO,MSGL_DBG2, "PNG Compression level %i\n", z_compression); @@ -111,7 +111,7 @@ static struct pngdata create_png (char * fname, int image_width, int image_heigh png.fp = fopen (fname, "wb"); if (png.fp == NULL) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_PNG_ErrorOpeningForWriting, strerror(errno)); + mp_tmsg(MSGT_VO,MSGL_WARN, "\n[VO_PNG] Error opening '%s' for writing!\n", strerror(errno)); png.status = ERROR; return png; } @@ -169,7 +169,7 @@ static uint32_t draw_image(mp_image_t* mpi){ png = create_png(buf, mpi->w, mpi->h, IMGFMT_IS_BGR(mpi->imgfmt)); if(png.status){ - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_PNG_ErrorInCreatePng); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_PNG] Error in create_png.\n"); return 1; } diff --git a/libvo/vo_pnm.c b/libvo/vo_pnm.c index 3d69d44d2e..487397c1a4 100644 --- a/libvo/vo_pnm.c +++ b/libvo/vo_pnm.c @@ -97,8 +97,8 @@ char *pnm_file_extension = NULL; */ static void pnm_write_error(void) { - mp_tmsg(MSGT_VO, MSGL_ERR, MSGTR_ErrorWritingFile, info.short_name); - exit_player_bad(_(MSGTR_Exit_error)); + mp_tmsg(MSGT_VO, MSGL_ERR, "%s: Error writing file.\n", info.short_name); + exit_player_bad(_("Fatal error")); } /* ------------------------------------------------------------------------- */ @@ -134,7 +134,7 @@ static int preinit(const char *arg) const char *info_message = NULL; mp_msg(MSGT_VO, MSGL_INFO, "%s: %s\n", info.short_name, - _(MSGTR_VO_ParsingSuboptions)); + _("Parsing suboptions.")); pnm_maxfiles = 1000; pnm_outdir = strdup("."); @@ -155,29 +155,29 @@ static int preinit(const char *arg) switch (pnm_mode) { case PNM_ASCII_MODE: - info_message = _(MSGTR_VO_PNM_ASCIIMode); + info_message = _("ASCII mode enabled."); break; case PNM_RAW_MODE: - info_message = _(MSGTR_VO_PNM_RawMode); + info_message = _("Raw mode enabled."); break; } mp_msg(MSGT_VO, MSGL_INFO, "%s: %s\n", info.short_name, info_message); switch (pnm_type) { case PNM_TYPE_PPM: - info_message = _(MSGTR_VO_PNM_PPMType); + info_message = _("Will write PPM files."); break; case PNM_TYPE_PGM: - info_message = _(MSGTR_VO_PNM_PGMType); + info_message = _("Will write PGM files."); break; case PNM_TYPE_PGMYUV: - info_message = _(MSGTR_VO_PNM_PGMYUVType); + info_message = _("Will write PGMYUV files."); break; } mp_msg(MSGT_VO, MSGL_INFO, "%s: %s\n", info.short_name, info_message); mp_msg(MSGT_VO, MSGL_INFO, "%s: %s\n", info.short_name, - _(MSGTR_VO_SuboptionsParsedOK)); + _("Suboptions parsed OK.")); return 0; } @@ -211,38 +211,38 @@ static void pnm_mkdir(char *buf, int verbose) { case EEXIST: if ( stat(buf, &stat_p ) < 0 ) { mp_msg(MSGT_VO, MSGL_ERR, "%s: %s: %s\n", info.short_name, - _(MSGTR_VO_GenericError), strerror(errno) ); + _("This error has occurred"), strerror(errno) ); mp_msg(MSGT_VO, MSGL_ERR, "%s: %s %s\n", info.short_name, - _(MSGTR_VO_UnableToAccess), buf); - exit_player_bad(_(MSGTR_Exit_error)); + _("Unable to access"), buf); + exit_player_bad(_("Fatal error")); } if ( !S_ISDIR(stat_p.st_mode) ) { mp_msg(MSGT_VO, MSGL_ERR, "%s: %s %s\n", info.short_name, - buf, _(MSGTR_VO_ExistsButNoDirectory)); - exit_player_bad(_(MSGTR_Exit_error)); + buf, _("already exists, but is not a directory.")); + exit_player_bad(_("Fatal error")); } if ( !(stat_p.st_mode & S_IWUSR) ) { mp_msg(MSGT_VO, MSGL_ERR, "%s: %s - %s\n", info.short_name, - buf, _(MSGTR_VO_DirExistsButNotWritable)); - exit_player_bad(_(MSGTR_Exit_error)); + buf, _("Output directory already exists, but is not writable.")); + exit_player_bad(_("Fatal error")); } if (strcmp(buf, ".") != 0) { mp_msg(MSGT_VO, MSGL_INFO, "%s: %s - %s\n", info.short_name, - buf, _(MSGTR_VO_DirExistsAndIsWritable)); + buf, _("Output directory already exists and is writable.")); } break; default: mp_msg(MSGT_VO, MSGL_ERR, "%s: %s: %s\n", info.short_name, - _(MSGTR_VO_GenericError), strerror(errno) ); + _("This error has occurred"), strerror(errno) ); mp_msg(MSGT_VO, MSGL_ERR, "%s: %s - %s\n", info.short_name, - buf, _(MSGTR_VO_CantCreateDirectory)); - exit_player_bad(_(MSGTR_Exit_error)); + buf, _("Unable to create output directory.")); + exit_player_bad(_("Fatal error")); } /* end switch */ } else if ( verbose ) { mp_msg(MSGT_VO, MSGL_INFO, "%s: %s - %s\n", info.short_name, - buf, _(MSGTR_VO_DirectoryCreateSuccess)); + buf, _("Output directory successfully created.")); } /* end if */ } @@ -442,7 +442,7 @@ static void pnm_write_image(mp_image_t *mpi) if (!mpi) { mp_msg(MSGT_VO, MSGL_ERR, "%s: No image data suplied to video output driver\n", info.short_name ); - exit_player_bad(_(MSGTR_Exit_error)); + exit_player_bad(_("Fatal error")); } /* Start writing to new subdirectory after a certain amount of frames */ @@ -470,11 +470,11 @@ static void pnm_write_image(mp_image_t *mpi) if ( (outfile = fopen(buf, "wb") ) == NULL ) { mp_msg(MSGT_VO, MSGL_ERR, "\n%s: %s\n", info.short_name, - MSGTR_VO_CantCreateFile); + "Unable to create output file."); mp_msg(MSGT_VO, MSGL_ERR, "%s: %s: %s\n", - info.short_name, MSGTR_VO_GenericError, + info.short_name, "This error has occurred", strerror(errno) ); - exit_player_bad(_(MSGTR_Exit_error)); + exit_player_bad(_("Fatal error")); } pnm_write_pnm(outfile, mpi); diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c index 389ed5aa1c..fe9b262440 100644 --- a/libvo/vo_sdl.c +++ b/libvo/vo_sdl.c @@ -425,7 +425,7 @@ static int sdl_open (void *plugin, void *name) */ priv->sdlflags &= ~SDL_HWSURFACE; if ((!SDL_ListModes (vidInfo->vfmt, priv->sdlflags)) && (!priv->fullmodes)) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SDL_CouldntGetAnyAcceptableSDLModeForOutput); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_SDL] Couldn't get any acceptable SDL Mode for output.\n"); return -1; } } @@ -706,7 +706,7 @@ static void set_fullmode (int mode) { setup_surfaces(); } else - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SDL_SetVideoModeFailedFull, SDL_GetError()); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_SDL] Set_fullmode: SDL_SetVideoMode failed: %s.\n", SDL_GetError()); } @@ -728,7 +728,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin switch(format){ case IMGFMT_I420: - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SDL_MappingI420ToIYUV); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_SDL] Mapping I420 to IYUV.\n"); format = SDL_IYUV_OVERLAY; case IMGFMT_YV12: case IMGFMT_IYUV: @@ -750,7 +750,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin priv->mode = RGB; break; default: - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_SDL_UnsupportedImageFormat,format); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_SDL] Unsupported image format (0x%X).\n",format); return -1; } @@ -808,7 +808,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin } if(flags&VOFLAG_FULLSCREEN) { mp_msg(MSGT_VO,MSGL_V, "SDL: setting zoomed fullscreen without modeswitching\n"); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SDL_InfoPleaseUseVmOrZoom); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_SDL] Info - please use -vm or -zoom to switch to the best resolution.\n"); priv->fulltype = VOFLAG_FULLSCREEN; set_fullmode(priv->fullmode); /*if((priv->surface = SDL_SetVideoMode (d_width, d_height, priv->bpp, priv->sdlfullflags))) @@ -845,7 +845,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin } if(!priv->surface) { // cannot SetVideoMode - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_SDL_FailedToSetVideoMode, SDL_GetError()); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_SDL] Failed to set video mode: %s.\n", SDL_GetError()); return -1; } @@ -933,7 +933,7 @@ static int setup_surfaces(void) default: /* Initialize and create the YUV Overlay used for video out */ if (!(priv->overlay = SDL_CreateYUVOverlay (surfwidth, surfheight, priv->format, priv->surface))) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_SDL_CouldntCreateAYUVOverlay, SDL_GetError()); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_SDL] Couldn't create a YUV overlay: %s.\n", SDL_GetError()); return -1; } priv->framePlaneY = priv->width * priv->height; @@ -946,14 +946,14 @@ static int setup_surfaces(void) if(priv->mode != YUV) { if(!priv->rgbsurface) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_SDL_CouldntCreateARGBSurface, SDL_GetError()); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_SDL] Couldn't create an RGB surface: %s.\n", SDL_GetError()); return -1; } priv->dblit = 0; if((priv->format&0xFF) != priv->bpp) - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SDL_UsingDepthColorspaceConversion, priv->format&0xFF, priv->bpp); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_SDL] Using depth/colorspace conversion, this will slow things down (%ibpp -> %ibpp).\n", priv->format&0xFF, priv->bpp); priv->framePlaneRGB = priv->width * priv->height * priv->rgbsurface->format->BytesPerPixel; priv->stridePlaneRGB = priv->width * priv->rgbsurface->format->BytesPerPixel; @@ -1081,7 +1081,7 @@ static int draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y) break; default: - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_SDL_UnsupportedImageFormatInDrawslice); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_SDL] Unsupported image format in draw_slice, contact MPlayer developers!\n"); } SDL_OVR_UNLOCK @@ -1443,7 +1443,7 @@ static void flip_page (void) if(!priv->dblit) { /* blit to the RGB surface */ if(SDL_BlitSurface (priv->rgbsurface, NULL, priv->surface, NULL)) - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_SDL_BlitFailed, SDL_GetError()); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_SDL] Blit failed: %s.\n", SDL_GetError()); } /* update screen */ @@ -1566,14 +1566,14 @@ static int preinit(const char *arg) /* initialize the SDL Video system */ if (!SDL_WasInit(SDL_INIT_VIDEO)) { if (SDL_Init (SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE)) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SDL_InitializationFailed, SDL_GetError()); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_SDL] SDL initialization failed: %s.\n", SDL_GetError()); return -1; } } SDL_VideoDriverName(priv->driver, 8); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SDL_UsingDriver, priv->driver); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_SDL] Using driver: %s.\n", priv->driver); priv->X = 0; #ifdef CONFIG_X11 diff --git a/libvo/vo_svga.c b/libvo/vo_svga.c index dcefcd978b..433f8d76ef 100644 --- a/libvo/vo_svga.c +++ b/libvo/vo_svga.c @@ -407,24 +407,24 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, }else{//force_vm vid_mode=force_vm; if(vga_hasmode(vid_mode) == 0){ - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SVGA_ForcedVidmodeNotAvailable, + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_SVGA] Forced vid_mode %d (%s) not available.\n", vid_mode,vga_getmodename(vid_mode)); return 1; //error; } modeinfo=vga_getmodeinfo(vid_mode); if( (modeinfo->width < req_w) || (modeinfo->height < req_h) ){ - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SVGA_ForcedVidmodeTooSmall, + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_SVGA] Forced vid_mode %d (%s) too small.\n", vid_mode,vga_getmodename(vid_mode)); return 1; } } mode_bpp=bpp_from_vminfo(modeinfo); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SVGA_Vidmode, + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_SVGA] Vid_mode: %d, %dx%d %dbpp.\n", vid_mode,modeinfo->width,modeinfo->height,mode_bpp); if (vga_setmode(vid_mode) == -1) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SVGA_VgasetmodeFailed,vid_mode); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_SVGA] Vga_setmode(%d) failed.\n",vid_mode); uninit(); return 1; // error } @@ -474,11 +474,11 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, } }//fi force native if(mode_capabilities&CAP_LINEAR){ - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SVGA_VideoModeIsLinearAndMemcpyCouldBeUsed); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_SVGA] Video mode is linear and memcpy could be used for image transfer.\n"); } if(mode_capabilities&CAP_ACCEL_PUTIMAGE){ - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SVGA_VideoModeHasHardwareAcceleration); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SVGA_IfItWorksForYouIWouldLikeToKnow); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_SVGA] Video mode has hardware acceleration and put_image could be used.\n"); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_SVGA] If it works for you I would like to know.\n[VO_SVGA] (send log with `mplayer test.avi -v -v -v -v &> svga.log`). Thx!\n"); } //here is the place to handle strides for accel_ modes; @@ -512,7 +512,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, } } assert(max_pages>0); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SVGA_VideoModeHas,max_pages); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_SVGA] Video mode has %d page(s).\n",max_pages); //15bpp if(modeinfo->bytesperpixel!=0) vga_claimvideomemory(max_pages * modeinfo->height * modeinfo->width * modeinfo->bytesperpixel); @@ -527,14 +527,14 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, x_pos = (modeinfo->width - req_w) / 2; y_pos = (modeinfo->height - req_h) / 2; x_pos &= ~(15); //align x offset position to 16 pixels - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SVGA_CenteringImageStartAt,x_pos,y_pos); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_SVGA] Centering image. Starting at (%d,%d)\n",x_pos,y_pos); #ifdef CONFIG_VIDIX if(vidix_name[0]){ vidix_init(width, height, x_pos, y_pos, modeinfo->width, modeinfo->height, format, mode_bpp, modeinfo->width,modeinfo->height); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SVGA_UsingVidix,width,height, + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_SVGA] Using VIDIX. w=%i h=%i mw=%i mh=%i\n",width,height, modeinfo->width,modeinfo->height); vidix_start(); /*set colorkey*/ diff --git a/libvo/vo_tdfx_vid.c b/libvo/vo_tdfx_vid.c index 2ed5945913..4fd91c7bb4 100644 --- a/libvo/vo_tdfx_vid.c +++ b/libvo/vo_tdfx_vid.c @@ -87,10 +87,10 @@ static void clear_screen(void) { mov.dst = front_buffer; mov.dst_stride = tdfx_cfg.screen_stride; - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_TDFXVID_Move, mov.width,mov.src_stride,mov.height,mov.dst_stride); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_TDXVID] Move %d(%d) x %d => %d.\n", mov.width,mov.src_stride,mov.height,mov.dst_stride); if(ioctl(tdfx_fd,TDFX_VID_AGP_MOVE,&mov)) - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_AGPMoveFailedToClearTheScreen); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_TDFXVID] AGP move failed to clear the screen.\n"); } #endif @@ -176,7 +176,7 @@ flip_page(void) blit.dst_h = src_height; blit.dst_format = IMGFMT_BGR16; if(ioctl(tdfx_fd,TDFX_VID_BLIT,&blit)) - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_BlitFailed); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_TDFXVID] Blit failed.\n"); } return; } @@ -198,7 +198,7 @@ flip_page(void) blit.dst_format = dst_fmt; if(ioctl(tdfx_fd,TDFX_VID_BLIT,&blit)) - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_BlitFailed); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_TDFXVID] Blit failed.\n"); } static int @@ -266,7 +266,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin case IMGFMT_BGR24: case IMGFMT_BGR32: if(use_overlay) - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_TDFXVID_NonNativeOverlayFormatNeedConversion); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_TDFXVID] Non-native overlay format needs conversion.\n"); case IMGFMT_BGR15: case IMGFMT_BGR16: src_bpp = ((format & 0x3F)+7)/8; @@ -282,7 +282,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin src_bpp = 2; break; default: - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_UnsupportedInputFormat,format); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_TDFXVID] Unsupported input format 0x%x.\n",format); return 1; } @@ -338,28 +338,28 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin ov.use_colorkey = 0; if(ioctl(tdfx_fd,TDFX_VID_SET_OVERLAY,&ov)) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_OverlaySetupFailed); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_TDFXVID] Overlay setup failed.\n"); use_overlay = 0; break; } tdfx_ov = ov; if(use_overlay == 1) { if(ioctl(tdfx_fd,TDFX_VID_OVERLAY_ON)) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_OverlayOnFailed); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_TDFXVID] Overlay on failed.\n"); use_overlay = 0; break; } use_overlay++; } - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_TDFXVID_OverlayReady, + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_TDFXVID] Overlay ready: %d(%d) x %d @ %d => %d(%d) x %d @ %d.\n", src_width,src_stride,src_height,src_bpp, dst_width,dst_stride,dst_height,dst_bpp); break; } if(!use_overlay) - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_TDFXVID_TextureBlitReady, + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_TDFXVID] Texture blit ready: %d(%d) x %d @ %d => %d(%d) x %d @ %d.\n", src_width,src_stride,src_height,src_bpp, dst_width,dst_stride,dst_height,dst_bpp); @@ -371,7 +371,7 @@ uninit(void) { if(use_overlay == 2) { if(ioctl(tdfx_fd,TDFX_VID_OVERLAY_OFF)) - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_OverlayOffFailed); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_TDFXVID] Overlay off failed\n"); use_overlay--; } close(tdfx_fd); @@ -388,13 +388,13 @@ static int preinit(const char *arg) tdfx_fd = open(arg ? arg : "/dev/tdfx_vid", O_RDWR); if(tdfx_fd < 0) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_CantOpen,arg ? arg : "/dev/tdfx_vid", + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_TDFXVID] Can't open %s: %s.\n",arg ? arg : "/dev/tdfx_vid", strerror(errno)); return 1; } if(ioctl(tdfx_fd,TDFX_VID_GET_CONFIG,&tdfx_cfg)) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_CantGetCurrentCfg,strerror(errno)); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_TDFXVID] Can't get current configuration: %s.\n",strerror(errno)); return 1; } @@ -413,7 +413,7 @@ static int preinit(const char *arg) tdfx_fd, 0); if(agp_mem == MAP_FAILED) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_MemmapFailed); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_TDFXVID] Memmap failed !!!!!\n"); return 1; } @@ -465,7 +465,7 @@ static uint32_t get_image(mp_image_t *mpi) { mpi->stride[2] = mpi->chroma_width; break; default: - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_GetImageTodo); + mp_tmsg(MSGT_VO,MSGL_WARN, "Get image todo.\n"); return VO_FALSE; } mpi->flags |= MP_IMGFLAG_DIRECT; @@ -531,7 +531,7 @@ static uint32_t draw_image(mp_image_t *mpi){ mov.dst_stride = src_stride; if(ioctl(tdfx_fd,TDFX_VID_AGP_MOVE,&mov)) - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_AgpMoveFailed); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_TDFXVID] AGP move failed.\n"); break; case IMGFMT_YV12: @@ -560,7 +560,7 @@ static uint32_t draw_image(mp_image_t *mpi){ yuv.base = back_buffer; yuv.stride = src_stride; if(ioctl(tdfx_fd,TDFX_VID_SET_YUV,&yuv)) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_SetYuvFailed); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_TDFXVID] Set YUV failed.\n"); break; } @@ -576,7 +576,7 @@ static uint32_t draw_image(mp_image_t *mpi){ mov.dst_stride = TDFX_VID_YUV_STRIDE; if(ioctl(tdfx_fd,TDFX_VID_AGP_MOVE,&mov)) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_AgpMoveFailedOnYPlane); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_TDFXVID] AGP move failed on Y plane.\n"); break; } //return 0; @@ -588,7 +588,7 @@ static uint32_t draw_image(mp_image_t *mpi){ mov.src_stride = buffer_stride[p]; mov.dst += TDFX_VID_YUV_PLANE_SIZE; if(ioctl(tdfx_fd,TDFX_VID_AGP_MOVE,&mov)) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_AgpMoveFailedOnUPlane); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_TDFXVID] AGP move failed on U plane.\n"); break; } // V @@ -597,12 +597,12 @@ static uint32_t draw_image(mp_image_t *mpi){ mov.src_stride = buffer_stride[p]; mov.dst += TDFX_VID_YUV_PLANE_SIZE; if(ioctl(tdfx_fd,TDFX_VID_AGP_MOVE,&mov)) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_AgpMoveFailedOnVPlane); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_TDFXVID] AGP move failed on V plane.\n"); break; } break; default: - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_UnknownFormat,mpi->imgfmt); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_TDFXVID] unknown format: 0x%x.\n",mpi->imgfmt); return VO_TRUE; } diff --git a/libvo/vo_tdfxfb.c b/libvo/vo_tdfxfb.c index 8ae8a02e82..343045dff3 100644 --- a/libvo/vo_tdfxfb.c +++ b/libvo/vo_tdfxfb.c @@ -111,12 +111,12 @@ static int preinit(const char *arg) name = "/dev/fb0"; if((fd = open(name, O_RDWR)) == -1) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_TDFXFB_CantOpen, name, strerror(errno)); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_TDFXFB] Can't open %s: %s.\n", name, strerror(errno)); return -1; } if(ioctl(fd, FBIOGET_FSCREENINFO, &fb_finfo)) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_TDFXFB_ProblemWithFbitgetFscreenInfo, + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_TDFXFB] Problem with FBITGET_FSCREENINFO ioctl: %s.\n", strerror(errno)); close(fd); fd = -1; @@ -124,7 +124,7 @@ static int preinit(const char *arg) } if(ioctl(fd, FBIOGET_VSCREENINFO, &fb_vinfo)) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_TDFXFB_ProblemWithFbitgetVscreenInfo, + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_TDFXFB] Problem with FBITGET_VSCREENINFO ioctl: %s.\n", strerror(errno)); close(fd); fd = -1; @@ -133,7 +133,7 @@ static int preinit(const char *arg) /* BANSHEE means any of the series aparently */ if (fb_finfo.accel != FB_ACCEL_3DFX_BANSHEE) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_TDFXFB_ThisDriverOnlySupports); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_TDFXFB] This driver only supports the 3Dfx Banshee, Voodoo3 and Voodoo 5.\n"); close(fd); fd = -1; return -1; @@ -146,7 +146,7 @@ static int preinit(const char *arg) case 32: break; // Ok default: - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_TDFXFB_OutputIsNotSupported, fb_vinfo.bits_per_pixel); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_TDFXFB] %d bpp output is not supported.\n", fb_vinfo.bits_per_pixel); close(fd); fd = -1; return -1; @@ -159,7 +159,7 @@ static int preinit(const char *arg) MAP_SHARED, fd, fb_finfo.smem_len); if((long)memBase0 == -1 || (long)memBase1 == -1) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_TDFXFB_CouldntMapMemoryAreas, strerror(errno)); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_TDFXFB] Couldn't map memory areas: %s.\n", strerror(errno)); if((long)memBase0 != -1) munmap(memBase0, fb_finfo.smem_len); if((long)memBase1 != -1) @@ -266,7 +266,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ break; default: - mp_tmsg(MSGT_VO, MSGL_ERR, MSGTR_LIBVO_TDFXFB_BppOutputIsNotSupported, fb_vinfo.bits_per_pixel); + mp_tmsg(MSGT_VO, MSGL_ERR, "[VO_TDFXFB] %d bpp output is not supported (This should never have happened).\n", fb_vinfo.bits_per_pixel); return -1; } @@ -304,7 +304,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ break; default: - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_TDFXFB_SomethingIsWrongWithControl); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_TDFXFB] Eik! Something's wrong with control().\n"); return -1; } @@ -321,7 +321,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ inpageoffset = hidpageoffset + screenwidth * screenheight * screendepth; if(inpageoffset + in_width * in_depth * in_height > fb_finfo.smem_len) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_TDFXFB_NotEnoughVideoMemoryToPlay); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_TDFXFB] Not enough video memory to play this movie. Try at a lower resolution.\n"); return -1; } @@ -333,7 +333,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ memset(inpage, 0, in_width * in_height * in_depth); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_TDFXFB_ScreenIs, + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_TDFXFB] Screen is %dx%d at %d bpp, in is %dx%d at %d bpp, norm is %dx%d.\n", screenwidth, screenheight, screendepth * 8, in_width, in_height, in_depth * 8, d_width, d_height); diff --git a/libvo/vo_tga.c b/libvo/vo_tga.c index e8f0c4de75..707455b4ea 100644 --- a/libvo/vo_tga.c +++ b/libvo/vo_tga.c @@ -254,7 +254,7 @@ static void check_events(void) static int preinit(const char *arg) { if(arg) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TGA_UnknownSubdevice,arg); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_TGA] Unknown subdevice: %s.\n",arg); return ENOSYS; } return 0; diff --git a/libvo/vo_vesa.c b/libvo/vo_vesa.c index 9884f72152..016e5f57e7 100644 --- a/libvo/vo_vesa.c +++ b/libvo/vo_vesa.c @@ -194,7 +194,7 @@ static inline void vbeSwitchBank(unsigned long offset) show_err: vesa_term(); PRINT_VBE_ERR("vbeSetWindow",err); - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_VESA_FatalErrorOccurred); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_VESA] Fatal error occurred! Can't continue.\n"); abort(); } win.low = new_offset * gran; @@ -396,7 +396,7 @@ static void flip_page(void) { vesa_term(); PRINT_VBE_ERR("vbeSetDisplayStart",err); - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_VESA_FatalErrorOccurred); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_VESA] Fatal error occurred! Can't continue.\n"); abort(); } multi_idx = multi_idx ? 0 : 1; @@ -462,7 +462,7 @@ static uint32_t parseSubDevice(const char *sd) else if(memcmp(sd,"vidix",5) == 0) vidix_name = &sd[5]; /* vidix_name will be valid within init() */ #endif - else { mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_VESA_UnknownSubdevice, sd); return 0xFFFFFFFFUL; } + else { mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_VESA] unknown subdevice: '%s'.\n", sd); return 0xFFFFFFFFUL; } return flags; } @@ -550,7 +550,7 @@ unsigned fillMultiBuffer( unsigned long vsize, unsigned nbuffs ) total = min(total,nbuffs); while(i < total) { multi_buff[i++] = offset; offset += screen_size; } if(!i) - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_VESA_YouHaveTooLittleVideoMemory, screen_size, vsize); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_VESA] You have too little video memory for this mode:\n[VO_VESA] Required: %08lX present: %08lX.\n", screen_size, vsize); return i; } @@ -569,7 +569,7 @@ static int set_refresh(unsigned x, unsigned y, unsigned mode,struct VesaCRTCInfo monitor_dotclock = str2range(monitor_dotclock_str); if (!monitor_hfreq || !monitor_vfreq || !monitor_dotclock) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_VESA_YouHaveToSpecifyTheCapabilitiesOfTheMonitor); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_VESA] You have to specify the capabilities of the monitor. Not changing refresh rate.\n"); return 0; } @@ -606,7 +606,7 @@ static int set_refresh(unsigned x, unsigned y, unsigned mode,struct VesaCRTCInfo if (!in_range(monitor_vfreq,crtc_pass->RefreshRate/100)|| !in_range(monitor_hfreq,H_freq*1000)) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_VESA_UnableToFitTheMode); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_VESA] The mode does not fit the monitor limits. Not changing refresh rate.\n"); return 0; } @@ -637,13 +637,13 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin fs_mode = 0; if(subdev_flags == 0xFFFFFFFEUL) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_VESA_DetectedInternalFatalError); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_VESA] Detected internal fatal error: init is called before preinit.\n"); return -1; } if(subdev_flags == 0xFFFFFFFFUL) return -1; if(flags & VOFLAG_FLIPPING) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_VESA_SwitchFlipIsNotSupported); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_VESA] The -flip option is not supported.\n"); } if(flags & VOFLAG_SWSCALE) use_scaler = 1; if(flags & VOFLAG_FULLSCREEN) @@ -656,30 +656,32 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin if(!vib_set && (err=vbeGetControllerInfo(&vib)) != VBE_OK) { PRINT_VBE_ERR("vbeGetControllerInfo",err); - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_VESA_PossibleReasonNoVbe2BiosFound); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_VESA] Possible reason: No VBE2 BIOS found.\n"); return -1; } vib_set = 1; /* Print general info here */ - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_VESA_FoundVesaVbeBiosVersion, + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_VESA] Found VESA VBE BIOS Version %x.%x Revision: %x.\n", (int)(vib.VESAVersion >> 8) & 0xff, (int)(vib.VESAVersion & 0xff), (int)(vib.OemSoftwareRev & 0xffff)); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_VESA_VideoMemory,vib.TotalMemory*64); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_VESA_Capabilites + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_VESA] Video memory: %u Kb.\n",vib.TotalMemory*64); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_VESA] VESA Capabilities: %s %s %s %s %s.\n" ,vib.Capabilities & VBE_DAC_8BIT ? "8-bit DAC," : "6-bit DAC," ,vib.Capabilities & VBE_NONVGA_CRTC ? "non-VGA CRTC,":"VGA CRTC," ,vib.Capabilities & VBE_SNOWED_RAMDAC ? "snowed RAMDAC,":"normal RAMDAC," ,vib.Capabilities & VBE_STEREOSCOPIC ? "stereoscopic,":"no stereoscopic," ,vib.Capabilities & VBE_STEREO_EVC ? "Stereo EVC":"no stereo"); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_VESA_BelowWillBePrintedOemInfo); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_VESA_YouShouldSee5OemRelatedLines); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_VESA_OemInfo,vib.OemStringPtr); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_VESA_OemRevision,vib.OemSoftwareRev); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_VESA_OemVendor,vib.OemVendorNamePtr); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_VESA_OemProductName,vib.OemProductNamePtr); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_VESA_OemProductRev,vib.OemProductRevPtr); - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_VESA_Hint); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_VESA] !!! OEM info will be printed below !!!\n"); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_VESA] You should see 5 OEM related lines below; If not, you've broken vm86.\n"); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_VESA] OEM info: %s.\n",vib.OemStringPtr); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_VESA] OEM Revision: %x.\n",vib.OemSoftwareRev); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_VESA] OEM vendor: %s.\n",vib.OemVendorNamePtr); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_VESA] OEM Product Name: %s.\n",vib.OemProductNamePtr); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_VESA] OEM Product Rev: %s.\n",vib.OemProductRevPtr); + mp_tmsg(MSGT_VO,MSGL_INFO, + "[VO_VESA] Hint: For working TV-Out you should have plugged in the TV connector\n"\ + "[VO_VESA] before booting since VESA BIOS initializes itself only during POST.\n"); /* Find best mode here */ num_modes = 0; mode_ptr = vib.VideoModePtr; @@ -795,7 +797,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin return -1; } dstBpp = video_mode_info.BitsPerPixel; - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_VESA_UsingVesaMode + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_VESA] Using VESA mode (%u) = %x [%ux%u@%u]\n" ,best_mode_idx,video_mode,video_mode_info.XResolution ,video_mode_info.YResolution,dstBpp); if(subdev_flags & SUBDEV_NODGA) video_mode_info.PhysBasePtr = 0; @@ -830,7 +832,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin sws = sws_getContextFromCmdLine(srcW,srcH,srcFourcc,dstW,dstH,dstFourcc); if(!sws) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_VESA_CantInitializeSwscaler); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_VESA] Can't initialize software scaler.\n"); return -1; } else if( mp_msg_test(MSGT_VO,MSGL_V) ) { @@ -850,7 +852,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin vsize = vib.TotalMemory*64*1024; lfb = vbeMapVideoBuffer(video_mode_info.PhysBasePtr,vsize); if(lfb == NULL) - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_VESA_CantUseDga); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_VESA] Can't use DGA. Force bank switching mode. :(\n"); else { video_base = win.ptr = lfb; @@ -858,7 +860,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin win.high = vsize; win.idx = -1; /* HAS_DGA() is on */ video_mode |= VESA_MODE_USE_LINEAR; - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_VESA_UsingDga + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_VESA] Using DGA (physical resources: %08lXh, %08lXh)" ,video_mode_info.PhysBasePtr ,vsize); if( mp_msg_test(MSGT_VO,MSGL_V) ) { @@ -866,30 +868,30 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin printf("\n"); if(!(multi_size = fillMultiBuffer(vsize,2))) return -1; if(vo_doublebuffering && multi_size < 2) - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_VESA_CantUseDoubleBuffering); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_VESA] Can't use double buffering: not enough video memory.\n"); } } if(win.idx == -2) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_VESA_CantFindNeitherDga); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_VESA] Can find neither DGA nor relocatable window frame.\n"); return -1; } if(!HAS_DGA()) { if(subdev_flags & SUBDEV_FORCEDGA) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_VESA_YouveForcedDga); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_VESA] You've forced DGA. Exiting\n"); return -1; } if(!(win_seg = win.idx == 0 ? video_mode_info.WinASegment:video_mode_info.WinBSegment)) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_VESA_CantFindValidWindowAddress); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_VESA] Can't find valid window address.\n"); return -1; } win.ptr = PhysToVirtSO(win_seg,0); win.low = 0L; win.high= video_mode_info.WinSize*1024; - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_VESA_UsingBankSwitchingMode + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_VESA] Using bank switching mode (physical resources: %08lXh, %08lXh).\n" ,(unsigned long)win.ptr,(unsigned long)win.high); } if(video_mode_info.XResolution > dstW) @@ -919,7 +921,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin { if(!(dga_buffer = memalign(64,video_mode_info.XResolution*video_mode_info.YResolution*dstBpp))) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_VESA_CantAllocateTemporaryBuffer); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_VESA] Can't allocate temporary buffer.\n"); return -1; } if( mp_msg_test(MSGT_VO,MSGL_V) ) { @@ -955,10 +957,10 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin if (neomagic_tvout) { err = vbeSetTV(video_mode,neomagic_tvnorm); if (err!=0x4f) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_VESA_SorryUnsupportedMode); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_VESA] Sorry, unsupported mode -- try -x 640 -zoom.\n"); } else { - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_VESA_OhYouReallyHavePictureOnTv); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_VESA] Oh you really have a picture on the TV!\n"); } } /* Now we are in video mode!!!*/ @@ -972,11 +974,11 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin { if(vlvo_init(width,height,x_offset,y_offset,dstW,dstH,format,dstBpp) != 0) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_VESA_CantInitialozeLinuxVideoOverlay); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_VESA] Can't initialize Linux Video Overlay.\n"); vesa_term(); return -1; } - else mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_VESA_UsingVideoOverlay,lvo_name); + else mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_VESA] Using video overlay: %s.\n",lvo_name); lvo_opened = 1; } #ifdef CONFIG_VIDIX @@ -987,11 +989,11 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin dstH,format,dstBpp, video_mode_info.XResolution,video_mode_info.YResolution) != 0) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_VESA_CantInitializeVidixDriver); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_VESA] Can't initialize VIDIX driver.\n"); vesa_term(); return -1; } - else mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_VESA_UsingVidix); + else mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_VESA] Using VIDIX.\n"); vidix_start(); /* set colorkey */ @@ -1017,12 +1019,12 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin } else { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_VESA_CantFindModeFor,width,height,bpp); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_VESA] Can't find mode for: %ux%u@%u.\n",width,height,bpp); return -1; } if( mp_msg_test(MSGT_VO,MSGL_V) ) { - mp_tmsg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_VESA_InitializationComplete); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_VESA] VESA initialization complete.\n"); fflush(stdout); } if(HAS_DGA() && vo_doublebuffering) diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 3a189b4104..18519ec666 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -217,7 +217,7 @@ static int config(struct vo *vo, uint32_t width, uint32_t height, if ((ctx->max_width != 0 && ctx->max_height != 0) && (ctx->image_width > ctx->max_width || ctx->image_height > ctx->max_height)) { - mp_tmsg(MSGT_VO, MSGL_ERR, MSGTR_VO_XV_ImagedimTooHigh, + mp_tmsg(MSGT_VO, MSGL_ERR, "Source image dimensions are too high: %ux%u (maximum is %ux%u)\n", ctx->image_width, ctx->image_height, ctx->max_width, ctx->max_height); return -1; @@ -335,7 +335,7 @@ static void allocate_xvimage(struct vo *vo, int foo) ctx->Shmem_Flag = 1; else { ctx->Shmem_Flag = 0; - mp_tmsg(MSGT_VO, MSGL_INFO, MSGTR_LIBVO_XV_SharedMemoryNotSupported); + mp_tmsg(MSGT_VO, MSGL_INFO, "[VO_XV] Shared memory not supported\nReverting to normal Xv.\n"); } if (ctx->Shmem_Flag) { ctx->xvimage[foo] = @@ -704,7 +704,7 @@ static int preinit(struct vo *vo, const char *arg) /* check for Xvideo extension */ unsigned int ver, rel, req, ev, err; if (Success != XvQueryExtension(x11->display, &ver, &rel, &req, &ev, &err)) { - mp_tmsg(MSGT_VO, MSGL_ERR, MSGTR_LIBVO_XV_XvNotSupportedByX11); + mp_tmsg(MSGT_VO, MSGL_ERR, "[VO_XV] Sorry, Xv not supported by this X11 version/driver\n[VO_XV] ******** Try with -vo x11 or -vo sdl *********\n"); goto error; } @@ -712,7 +712,7 @@ static int preinit(struct vo *vo, const char *arg) if (Success != XvQueryAdaptors(x11->display, DefaultRootWindow(x11->display), &ctx->adaptors, &ctx->ai)) { - mp_tmsg(MSGT_VO, MSGL_ERR, MSGTR_LIBVO_XV_XvQueryAdaptorsFailed); + mp_tmsg(MSGT_VO, MSGL_ERR, "[VO_XV] XvQueryAdaptors failed.\n"); goto error; } @@ -737,7 +737,7 @@ static int preinit(struct vo *vo, const char *arg) if (XvGrabPort(x11->display, x11->xv_port, CurrentTime)) x11->xv_port = 0; } else { - mp_tmsg(MSGT_VO, MSGL_WARN, MSGTR_LIBVO_XV_InvalidPortParameter); + mp_tmsg(MSGT_VO, MSGL_WARN, "[VO_XV] Invalid port parameter, overriding with port 0.\n"); x11->xv_port = 0; } } @@ -757,7 +757,7 @@ static int preinit(struct vo *vo, const char *arg) i, ctx->ai[i].name); break; } else { - mp_tmsg(MSGT_VO, MSGL_WARN, MSGTR_LIBVO_XV_CouldNotGrabPort, + mp_tmsg(MSGT_VO, MSGL_WARN, "[VO_XV] Could not grab port %i.\n", (int) xv_p); ++busy_ports; } @@ -765,9 +765,17 @@ static int preinit(struct vo *vo, const char *arg) } if (!x11->xv_port) { if (busy_ports) - mp_tmsg(MSGT_VO, MSGL_ERR, MSGTR_LIBVO_XV_CouldNotFindFreePort); + mp_tmsg(MSGT_VO, MSGL_ERR, + "[VO_XV] Could not find free Xvideo port - maybe another process is already\n"\ + "[VO_XV] using it. Close all video applications, and try again. If that does\n"\ + "[VO_XV] not help, see 'mplayer -vo help' for other (non-xv) video out drivers.\n"); else - mp_tmsg(MSGT_VO, MSGL_ERR, MSGTR_LIBVO_XV_NoXvideoSupport); + mp_tmsg(MSGT_VO, MSGL_ERR, + "[VO_XV] It seems there is no Xvideo support for your video card available.\n"\ + "[VO_XV] Run 'xvinfo' to verify its Xv support and read\n"\ + "[VO_XV] DOCS/HTML/en/video.html#xv!\n"\ + "[VO_XV] See 'mplayer -vo help' for other (non-xv) video out drivers.\n"\ + "[VO_XV] Try -vo x11.\n"); goto error; } diff --git a/libvo/vo_yuv4mpeg.c b/libvo/vo_yuv4mpeg.c index f3c5a60f57..dd51d6ccb7 100644 --- a/libvo/vo_yuv4mpeg.c +++ b/libvo/vo_yuv4mpeg.c @@ -123,7 +123,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, if (height % 4) { mp_tmsg(MSGT_VO,MSGL_FATAL, - MSGTR_VO_YUV4MPEG_InterlacedHeightDivisibleBy4); + "Interlaced mode requires image height to be divisible by 4."); return -1; } @@ -131,19 +131,19 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, if (!rgb_line_buffer) { mp_tmsg(MSGT_VO,MSGL_FATAL, - MSGTR_VO_YUV4MPEG_InterlacedLineBufAllocFail); + "Unable to allocate line buffer for interlaced mode."); return -1; } if (using_format == IMGFMT_YV12) mp_tmsg(MSGT_VO,MSGL_WARN, - MSGTR_VO_YUV4MPEG_InterlacedInputNotRGB); + "Input not RGB, can't separate chrominance by fields!"); } if (width % 2) { mp_tmsg(MSGT_VO,MSGL_FATAL, - MSGTR_VO_YUV4MPEG_WidthDivisibleBy2); + "Image width must be divisible by 2."); return -1; } @@ -154,7 +154,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, if (!rgb_buffer) { mp_tmsg(MSGT_VO,MSGL_FATAL, - MSGTR_VO_YUV4MPEG_NoMemRGBFrameBuf); + "Not enough memory to allocate RGB framebuffer."); return -1; } } @@ -166,7 +166,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, if (!yuv_out || image == 0) { mp_tmsg(MSGT_VO,MSGL_FATAL, - MSGTR_VO_YUV4MPEG_OutFileOpenError, + "Can't get memory or file handle to write \"%s\"!", yuv_filename); return -1; } @@ -263,7 +263,7 @@ static void vo_y4m_write(const void *ptr, const size_t num_bytes) { if (fwrite(ptr, 1, num_bytes, yuv_out) != num_bytes) mp_tmsg(MSGT_VO,MSGL_ERR, - MSGTR_VO_YUV4MPEG_OutFileWriteError); + "Error writing image to output!"); } static int write_last_frame(void) @@ -524,7 +524,7 @@ static int preinit(const char *arg) il_bf = 0; yuv_filename = strdup("stream.yuv"); if (subopt_parse(arg, subopts) != 0) { - mp_tmsg(MSGT_VO, MSGL_FATAL, MSGTR_VO_YUV4MPEG_UnknownSubDev, arg); + mp_tmsg(MSGT_VO, MSGL_FATAL, "Unknown subdevice: %s", arg); return -1; } @@ -539,15 +539,15 @@ static int preinit(const char *arg) { case Y4M_ILACE_TOP_FIRST: mp_tmsg(MSGT_VO,MSGL_STATUS, - MSGTR_VO_YUV4MPEG_InterlacedTFFMode); + "Using interlaced output mode, top-field first."); break; case Y4M_ILACE_BOTTOM_FIRST: mp_tmsg(MSGT_VO,MSGL_STATUS, - MSGTR_VO_YUV4MPEG_InterlacedBFFMode); + "Using interlaced output mode, bottom-field first."); break; default: mp_tmsg(MSGT_VO,MSGL_STATUS, - MSGTR_VO_YUV4MPEG_ProgressiveMode); + "Using (default) progressive frame mode."); break; } return 0; diff --git a/libvo/vosub_vidix.c b/libvo/vosub_vidix.c index 61dbde7671..7190bc3e41 100644 --- a/libvo/vosub_vidix.c +++ b/libvo/vosub_vidix.c @@ -69,7 +69,7 @@ int vidix_start(void) int err; if((err=vdlPlaybackOn(vidix_handler))!=0) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_CantStartPlayback,strerror(err)); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_SUB_VIDIX] Can't start playback: %s\n",strerror(err)); return -1; } video_on=1; @@ -81,7 +81,7 @@ int vidix_stop(void) int err; if((err=vdlPlaybackOff(vidix_handler))!=0) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_CantStopPlayback,strerror(err)); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_SUB_VIDIX] Can't stop playback: %s\n",strerror(err)); return -1; } video_on=0; @@ -179,7 +179,7 @@ static int vidix_draw_slice_410(uint8_t *image[], int stride[], int w,int h,int if (vidix_play.flags & VID_PLAY_INTERLEAVED_UV) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_SUB_VIDIX_InterleavedUvForYuv410pNotSupported); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_SUB_VIDIX] Interleaved UV for YUV410P not supported.\n"); } else { @@ -254,7 +254,7 @@ static int vidix_draw_slice_nv12(uint8_t *image[], int stride[], int w,int h,int static int vidix_draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_SUB_VIDIX_DummyVidixdrawsliceWasCalled); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_SUB_VIDIX] Dummy vidix_draw_slice() was called.\n"); return -1; } @@ -272,7 +272,7 @@ static uint32_t vidix_draw_image(mp_image_t *mpi){ static int vidix_draw_frame(uint8_t *image[]) { - mp_tmsg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_SUB_VIDIX_DummyVidixdrawframeWasCalled); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_SUB_VIDIX] Dummy vidix_draw_frame() was called.\n"); return -1; } @@ -392,7 +392,7 @@ int vidix_init(unsigned src_width,unsigned src_height, if(vidix_query_fourcc(format) == 0) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_UnsupportedFourccForThisVidixDriver, + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_SUB_VIDIX] Unsupported FourCC for this VIDIX driver: %x (%s).\n", format,vo_format_name(format)); return -1; } @@ -402,7 +402,7 @@ int vidix_init(unsigned src_width,unsigned src_height, ((vidix_cap.maxheight != -1) && (vid_h > vidix_cap.maxheight)) || ((vidix_cap.minwidth != -1 ) && (vid_h < vidix_cap.minheight))) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_VideoServerHasUnsupportedResolution, + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_SUB_VIDIX] Video server has unsupported resolution (%dx%d), supported: %dx%d-%dx%d.\n", vid_w, vid_h, vidix_cap.minwidth, vidix_cap.minheight, vidix_cap.maxwidth, vidix_cap.maxheight); return -1; @@ -424,19 +424,19 @@ int vidix_init(unsigned src_width,unsigned src_height, } if(err) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_VideoServerHasUnsupportedColorDepth + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_SUB_VIDIX] Video server has unsupported color depth by vidix (%d).\n" ,vidix_fourcc.depth); return -1; } if((dst_width > src_width || dst_height > src_height) && (vidix_cap.flags & FLAG_UPSCALER) != FLAG_UPSCALER) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_DriverCantUpscaleImage, + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_SUB_VIDIX] VIDIX driver can't upscale image (%d%d -> %d%d).\n", src_width, src_height, dst_width, dst_height); return -1; } if((dst_width > src_width || dst_height > src_height) && (vidix_cap.flags & FLAG_DOWNSCALER) != FLAG_DOWNSCALER) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_DriverCantDownscaleImage, + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_SUB_VIDIX] VIDIX driver can't downscale image (%d%d -> %d%d).\n", src_width, src_height, dst_width, dst_height); return -1; } @@ -464,7 +464,7 @@ int vidix_init(unsigned src_width,unsigned src_height, if((err=vdlConfigPlayback(vidix_handler,&vidix_play))!=0) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_CantConfigurePlayback,strerror(err)); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_SUB_VIDIX] Can't configure playback: %s.\n",strerror(err)); return -1; } if ( mp_msg_test(MSGT_VO,MSGL_V) ) { @@ -681,12 +681,12 @@ int vidix_preinit(const char *drvname, struct vo_old_functions *server) if(vidix_handler == NULL) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_CouldntFindWorkingVidixDriver); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_SUB_VIDIX] Couldn't find working VIDIX driver.\n"); return -1; } if((err=vdlGetCapability(vidix_handler,&vidix_cap)) != 0) { - mp_tmsg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SUB_VIDIX_CouldntGetCapability,strerror(err)); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_SUB_VIDIX] Couldn't get capability: %s.\n",strerror(err)); return -1; } mp_msg(MSGT_VO,MSGL_V, "[VO_SUB_VIDIX] Description: %s.\n", vidix_cap.name); diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 1fca3303ac..72d59924ff 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -144,7 +144,7 @@ void vo_x11_ewmh_fullscreen(struct vo_x11_state *x11, int action) SubstructureRedirectMask | SubstructureNotifyMask, &xev)) { - mp_tmsg(MSGT_VO, MSGL_ERR, MSGTR_EwmhFullscreenStateFailed); + mp_tmsg(MSGT_VO, MSGL_ERR, "\nX11: Couldn't send EWMH fullscreen event!\n"); } } } @@ -205,7 +205,7 @@ static int x11_errorhandler(Display * display, XErrorEvent * event) void fstype_help(void) { - mp_tmsg(MSGT_VO, MSGL_INFO, MSGTR_AvailableFsType); + mp_tmsg(MSGT_VO, MSGL_INFO, "Available fullscreen layer change modes:\n"); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_FULL_SCREEN_TYPES\n"); mp_msg(MSGT_VO, MSGL_INFO, " %-15s %s\n", "none", @@ -1625,7 +1625,7 @@ void vo_vm_switch(struct vo *vo) j = i; } - mp_tmsg(MSGT_VO, MSGL_INFO, MSGTR_SelectedVideoMode, + mp_tmsg(MSGT_VO, MSGL_INFO, "XF86VM: Selected video mode %dx%d for image size %dx%d.\n", modeline_width, modeline_height, X, Y); XF86VidModeLockModeSwitch(mDisplay, x11->screen, 0); XF86VidModeSwitchToMode(mDisplay, x11->screen, vidmodes[j]); diff --git a/loader/ldt_keeper.c b/loader/ldt_keeper.c index 871b78903c..f0ffe02dce 100644 --- a/loader/ldt_keeper.c +++ b/loader/ldt_keeper.c @@ -209,7 +209,7 @@ ldt_fs_t* Setup_LDT_Keeper(void) #ifdef __APPLE__ if (getenv("DYLD_BIND_AT_LAUNCH") == NULL) - mp_tmsg(MSGT_LOADER, MSGL_WARN, MSGTR_LOADER_DYLD_Warning); + mp_tmsg(MSGT_LOADER, MSGL_WARN, "WARNING: Attempting to use DLL codecs but environment variable\n DYLD_BIND_AT_LAUNCH not set. This will likely crash.\n"); #endif /* __APPLE__ */ fs_seg= diff --git a/m_config.c b/m_config.c index a5bd0d93b0..6a76b69af9 100644 --- a/m_config.c +++ b/m_config.c @@ -163,7 +163,7 @@ m_config_pop(m_config_t* config) { if(co->flags & M_CFG_OPT_ALIAS) continue; if(co->slots->lvl > config->lvl) - mp_tmsg(MSGT_CFGPARSER, MSGL_WARN,MSGTR_SaveSlotTooOld,config->lvl,co->slots->lvl); + mp_tmsg(MSGT_CFGPARSER, MSGL_WARN,"Save slot found from lvl %d is too old: %d !!!\n",config->lvl,co->slots->lvl); while(co->slots->lvl >= config->lvl) { m_option_free(co->opt,co->slots->data); @@ -306,11 +306,11 @@ m_config_parse_option(m_config_t *config, char* arg, char* param,int set) { // Check if this option isn't forbidden in the current mode if((config->mode == M_CONFIG_FILE) && (co->opt->flags & M_OPT_NOCFG)) { - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR,MSGTR_InvalidCfgfileOption,arg); + mp_tmsg(MSGT_CFGPARSER, MSGL_ERR,"The %s option can't be used in a config file.\n",arg); return M_OPT_INVALID; } if((config->mode == M_COMMAND_LINE) && (co->opt->flags & M_OPT_NOCMD)) { - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR,MSGTR_InvalidCmdlineOption,arg); + mp_tmsg(MSGT_CFGPARSER, MSGL_ERR,"The %s option can't be used on the command line.\n",arg); return M_OPT_INVALID; } // During command line preparse set only pre-parse options @@ -338,11 +338,11 @@ m_config_parse_option(m_config_t *config, char* arg, char* param,int set) { sr = m_config_parse_option(config,n,lst[2*i+1],set); if(sr < 0){ if(sr == M_OPT_UNKNOWN){ - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR,MSGTR_InvalidSuboption,co->name,lst[2*i]); + mp_tmsg(MSGT_CFGPARSER, MSGL_ERR,"Error: option '%s' has no suboption '%s'.\n",co->name,lst[2*i]); r = M_OPT_INVALID; } else if(sr == M_OPT_MISSING_PARAM){ - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR,MSGTR_MissingSuboptionParameter,lst[2*i],co->name); + mp_tmsg(MSGT_CFGPARSER, MSGL_ERR,"Error: suboption '%s' of '%s' must have a parameter!\n",lst[2*i],co->name); r = M_OPT_INVALID; } else r = sr; @@ -379,7 +379,7 @@ m_config_check_option(m_config_t *config, char* arg, char* param) { mp_msg(MSGT_CFGPARSER, MSGL_DBG2,"Checking %s=%s\n",arg,param); r=m_config_parse_option(config,arg,param,0); if(r==M_OPT_MISSING_PARAM){ - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR,MSGTR_MissingOptionParameter,arg); + mp_tmsg(MSGT_CFGPARSER, MSGL_ERR,"Error: option '%s' must have a parameter!\n",arg); return M_OPT_INVALID; } return r; @@ -411,7 +411,7 @@ m_config_print_option_list(m_config_t *config) { if(!config->opts) return; - mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, MSGTR_OptionListHeader); + mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, "\n Name Type Min Max Global CL Cfg\n\n"); for(co = config->opts ; co ; co = co->next) { const m_option_t* opt = co->opt; if(opt->type->flags & M_OPT_TYPE_HAS_CHILD) continue; @@ -433,7 +433,7 @@ m_config_print_option_list(m_config_t *config) { opt->flags & CONF_NOCFG ? "No" : "Yes"); count++; } - mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, MSGTR_TotalOptions,count); + mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, "\nTotal: %d options\n",count); } m_profile_t* @@ -478,7 +478,7 @@ void m_config_set_profile(m_config_t* config, m_profile_t* p) { int i; if(config->profile_depth > MAX_PROFILE_DEPTH) { - mp_tmsg(MSGT_CFGPARSER, MSGL_WARN, MSGTR_ProfileInclusionTooDeep); + mp_tmsg(MSGT_CFGPARSER, MSGL_WARN, "WARNING: Profile inclusion too deep.\n"); return; } config->profile_depth++; @@ -496,10 +496,10 @@ parse_profile(const m_option_t *opt, const char *name, char *param, void *dst, i if(param && !strcmp(param,"help")) { m_profile_t* p; if(!config->profiles) { - mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, MSGTR_NoProfileDefined); + mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, "No profiles have been defined.\n"); return M_OPT_EXIT-1; } - mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, MSGTR_AvailableProfiles); + mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, "Available profiles:\n"); for(p = config->profiles ; p ; p = p->next) mp_msg(MSGT_CFGPARSER, MSGL_INFO, "\t%s\t%s\n",p->name, p->desc ? p->desc : ""); @@ -512,7 +512,7 @@ parse_profile(const m_option_t *opt, const char *name, char *param, void *dst, i if(!list || !list[0]) return M_OPT_INVALID; for(i = 0 ; list[i] ; i++) if(!m_config_get_profile(config,list[i])) { - mp_tmsg(MSGT_CFGPARSER, MSGL_WARN, MSGTR_UnknownProfile, + mp_tmsg(MSGT_CFGPARSER, MSGL_WARN, "Unknown profile '%s'.\n", list[i]); r = M_OPT_INVALID; } @@ -546,11 +546,11 @@ show_profile(m_option_t *opt, char* name, char *param) { int i,j; if(!param) return M_OPT_MISSING_PARAM; if(!(p = m_config_get_profile(config,param))) { - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, MSGTR_UnknownProfile, param); + mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, "Unknown profile '%s'.\n", param); return M_OPT_EXIT-1; } if(!config->profile_depth) - mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, MSGTR_Profile, param, + mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, "Profile %s: %s\n", param, p->desc ? p->desc : ""); config->profile_depth++; for(i = 0 ; i < p->num_opts ; i++) { diff --git a/m_property.c b/m_property.c index ecf656f191..97f1340905 100644 --- a/m_property.c +++ b/m_property.c @@ -181,7 +181,7 @@ void m_properties_print_help_list(const m_option_t* list) { char min[50],max[50]; int i,count = 0; - mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, MSGTR_PropertyListHeader); + mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, "\n Name Type Min Max\n\n"); for(i = 0 ; list[i].name ; i++) { const m_option_t* opt = &list[i]; if(opt->flags & M_OPT_MIN) @@ -199,7 +199,7 @@ void m_properties_print_help_list(const m_option_t* list) { max); count++; } - mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, MSGTR_TotalProperties, count); + mp_tmsg(MSGT_CFGPARSER, MSGL_INFO, "\nTotal: %d properties\n", count); } // Some generic property implementations @@ -250,7 +250,7 @@ int m_property_flag_ro(const m_option_t* prop,int action, switch(action) { case M_PROPERTY_PRINT: if(!arg) return 0; - *(char**)arg = strdup((var > prop->min) ? _(MSGTR_Enabled) : _(MSGTR_Disabled)); + *(char**)arg = strdup((var > prop->min) ? _("enabled") : _("disabled")); return 1; } return m_property_int_ro(prop,action,arg,var); diff --git a/mencoder.c b/mencoder.c index b74e6c8b9b..98ea695332 100644 --- a/mencoder.c +++ b/mencoder.c @@ -296,9 +296,9 @@ static int edl_seek(edl_record_ptr next_edl_record, demuxer_t* demuxer, demux_st static void mencoder_exit(int level, const char *how) { if (how) - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_ExitingHow, how); + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "\nExiting... (%s)\n", how); else - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_Exiting); + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "\nExiting...\n"); exit(level); } @@ -308,14 +308,14 @@ static void parse_cfgfiles( m_config_t* conf ) char *conffile; if (!disable_system_conf && m_config_parse_config_file(conf, MPLAYER_CONFDIR "/mencoder.conf") < 0) - mencoder_exit(1,_(MSGTR_ConfigFileError)); + mencoder_exit(1,_("config file error")); if (!disable_user_conf) { if ((conffile = get_path("mencoder.conf")) == NULL) { - mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_GetpathProblem); + mp_tmsg(MSGT_CPLAYER,MSGL_ERR,"get_path(\"config\") problem\n"); } else { if (m_config_parse_config_file(conf, conffile) < 0) - mencoder_exit(1,_(MSGTR_ConfigFileError)); + mencoder_exit(1,_("config file error")); free(conffile); } } @@ -430,19 +430,19 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ if(!parse_codec_cfg(NULL)){ mencoder_exit(1,NULL); } - mp_tmsg(MSGT_MENCODER,MSGL_V,MSGTR_BuiltinCodecsConf); + mp_tmsg(MSGT_MENCODER,MSGL_V,"Using built-in default codecs.conf.\n"); } } } parse_cfgfiles(mconfig); filelist = m_config_parse_me_command_line(mconfig, argc, argv); - if(!filelist) mencoder_exit(1, _(MSGTR_ErrorParsingCommandLine)); + if(!filelist) mencoder_exit(1, _("error parsing command line")); { char *extension; - if (!out_filename) mencoder_exit(1,_(MSGTR_MissingOutputFilename)); + if (!out_filename) mencoder_exit(1,_("No output file specified, please see the -o option.")); extension=strrchr(out_filename,'.'); if (extension != NULL && strlen(extension) > 3 && strlen(extension) < 6) { @@ -452,14 +452,14 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ { case MUXER_TYPE_AVI: if (strcasecmp(extension,"avi")) - mp_tmsg(MSGT_MENCODER, MSGL_WARN, MSGTR_MencoderWrongFormatAVI); + mp_tmsg(MSGT_MENCODER, MSGL_WARN, "\nWARNING: OUTPUT FILE FORMAT IS _AVI_. See -of help.\n"); break; case MUXER_TYPE_MPEG: if (strcasecmp(extension,"mpg") && strcasecmp(extension,"mpeg") && strcasecmp(extension,"vob")) - mp_tmsg(MSGT_MENCODER, MSGL_WARN, MSGTR_MencoderWrongFormatMPG); + mp_tmsg(MSGT_MENCODER, MSGL_WARN, "\nWARNING: OUTPUT FILE FORMAT IS _MPEG_. See -of help.\n"); break; } } @@ -467,13 +467,16 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ /* Display what configure line was used */ mp_msg(MSGT_MENCODER, MSGL_V, "Configuration: " CONFIGURATION "\n"); +#define FormatNotRecognized _("============ Sorry, this file format is not recognized/supported =============\n"\ +"=== If this file is an AVI, ASF or MPEG stream, please contact the author! ===\n") + if (frameno_filename) { stream2=open_stream(frameno_filename,0,&i); if(stream2){ demuxer2=demux_open(&opts, stream2,DEMUXER_TYPE_AVI,-1,-1,-2,NULL); - if(demuxer2) mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_UsingPass3ControlFile, frameno_filename); - else mp_tmsg(MSGT_DEMUXER,MSGL_ERR,MSGTR_FormatNotRecognized); + if(demuxer2) mp_tmsg(MSGT_MENCODER, MSGL_INFO, "Using pass3 control file: %s\n", frameno_filename); + else mp_tmsg(MSGT_DEMUXER,MSGL_ERR, FormatNotRecognized); } } @@ -492,7 +495,7 @@ if (frameno_filename) { #ifdef CONFIG_BITMAP_FONT if(font_name){ vo_font=read_font_desc(font_name,font_factor,verbose>1); - if(!vo_font) mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadFont,font_name); + if(!vo_font) mp_tmsg(MSGT_CPLAYER,MSGL_ERR,"Cannot load bitmap font: %s\n",font_name); } else { // try default: vo_font=read_font_desc(get_path("font/font.desc"),font_factor,verbose>1); @@ -515,17 +518,17 @@ play_next_file: filename = filelist[curfile].name; if(!filename){ - mp_tmsg(MSGT_CPLAYER, MSGL_FATAL, MSGTR_MissingFilename); + mp_tmsg(MSGT_CPLAYER, MSGL_FATAL, "\nFilename missing.\n\n"); mencoder_exit(1,NULL); } stream=open_stream(filename,0,&file_format); if(!stream){ - mp_tmsg(MSGT_CPLAYER, MSGL_FATAL, MSGTR_CannotOpenFile_Device); + mp_tmsg(MSGT_CPLAYER, MSGL_FATAL, "Cannot open file/device.\n"); mencoder_exit(1,NULL); } - mp_tmsg(MSGT_CPLAYER, MSGL_INFO, MSGTR_OpenedStream, file_format, (int)(stream->start_pos), (int)(stream->end_pos)); + mp_tmsg(MSGT_CPLAYER, MSGL_INFO, "success: format: %d data: 0x%X - 0x%x\n", file_format, (int)(stream->start_pos), (int)(stream->end_pos)); #ifdef CONFIG_DVDREAD if(stream->type==STREAMTYPE_DVD){ @@ -550,8 +553,8 @@ if(stream->type==STREAMTYPE_DVDNAV){ //demuxer=demux_open(stream,file_format,opts.video_id,opts.audio_id,opts.sub_id); demuxer=demux_open(&opts, stream,file_format,opts.audio_id,opts.video_id,opts.sub_id,filename); if(!demuxer){ - mp_tmsg(MSGT_DEMUXER, MSGL_FATAL, MSGTR_FormatNotRecognized); - mp_tmsg(MSGT_DEMUXER, MSGL_FATAL, MSGTR_CannotOpenDemuxer); + mp_tmsg(MSGT_DEMUXER, MSGL_FATAL, FormatNotRecognized); + mp_tmsg(MSGT_DEMUXER, MSGL_FATAL, "Cannot open demuxer.\n"); mencoder_exit(1,NULL); } @@ -586,16 +589,16 @@ sh_video=d_video->sh; if(!sh_video) { - mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_VideoStreamRequired); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,"Video stream is mandatory!\n"); mencoder_exit(1,NULL); } if(!video_read_properties(sh_video)){ - mp_tmsg(MSGT_CPLAYER, MSGL_FATAL, MSGTR_CannotReadVideoProperties); + mp_tmsg(MSGT_CPLAYER, MSGL_FATAL, "Video: Cannot read properties.\n"); mencoder_exit(1,NULL); } - mp_tmsg(MSGT_MENCODER,MSGL_INFO, MSGTR_FilefmtFourccSizeFpsFtime, + mp_tmsg(MSGT_MENCODER,MSGL_INFO, "[V] filefmt:%d fourcc:0x%X size:%dx%d fps:%5.3f ftime:=%6.4f\n", demuxer->file_format,sh_video->format, sh_video->disp_w,sh_video->disp_h, sh_video->fps,sh_video->frametime ); @@ -603,17 +606,17 @@ sh_video=d_video->sh; if(force_fps){ sh_video->fps=force_fps; sh_video->frametime=1.0f/sh_video->fps; - mp_tmsg(MSGT_MENCODER,MSGL_INFO,MSGTR_ForcingInputFPS, sh_video->fps); + mp_tmsg(MSGT_MENCODER,MSGL_INFO,"Input fps will be interpreted as %5.3f instead.\n", sh_video->fps); } if(sh_audio && out_audio_codec<0){ if(opts.audio_id==-2) - mp_tmsg(MSGT_MENCODER,MSGL_ERR,MSGTR_DemuxerDoesntSupportNosound); - mp_tmsg(MSGT_MENCODER,MSGL_FATAL,MSGTR_NoAudioEncoderSelected); + mp_tmsg(MSGT_MENCODER,MSGL_ERR,"This demuxer doesn't support -nosound yet.\n"); + mp_tmsg(MSGT_MENCODER,MSGL_FATAL,"\nNo audio encoder (-oac) selected. Select one (see -oac help) or use -nosound.\n"); mencoder_exit(1,NULL); } if(sh_video && out_video_codec<0){ - mp_tmsg(MSGT_MENCODER,MSGL_FATAL,MSGTR_NoVideoEncoderSelected); + mp_tmsg(MSGT_MENCODER,MSGL_FATAL,"\nNo video encoder (-ovc) selected. Select one (see -ovc help).\n"); mencoder_exit(1,NULL); } @@ -643,7 +646,7 @@ if(sh_audio && (out_audio_codec || seek_to_sec || !sh_audio->wf || opts.playback // current_module="read_subtitles_file"; if(sub_name && sub_name[0]){ subdata=sub_read_file(sub_name[0], sh_video->fps); - if(!subdata) mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadSub,sub_name[0]); + if(!subdata) mp_tmsg(MSGT_CPLAYER,MSGL_ERR,"Cannot load subtitles: %s\n",sub_name[0]); } else if(sub_auto && filename) { // auto load sub file ... char **tmp = NULL; @@ -704,13 +707,13 @@ if (vo_spudec) ostream = open_output_stream(out_filename, 0); if(!ostream) { - mp_tmsg(MSGT_MENCODER, MSGL_FATAL, MSGTR_CannotOpenOutputFile, out_filename); + mp_tmsg(MSGT_MENCODER, MSGL_FATAL, "Cannot open output file '%s'.\n", out_filename); mencoder_exit(1,NULL); } muxer=muxer_new_muxer(out_file_format,ostream); if(!muxer) { - mp_tmsg(MSGT_MENCODER, MSGL_FATAL, MSGTR_CannotInitializeMuxer); + mp_tmsg(MSGT_MENCODER, MSGL_FATAL, "Cannot initialize muxer."); mencoder_exit(1,NULL); } #if 0 @@ -768,7 +771,7 @@ case VCODEC_COPY: mux_v->bih->biSizeImage=mux_v->bih->biWidth*mux_v->bih->biHeight*(mux_v->bih->biBitCount/8); } } - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_VCodecFramecopy, + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "videocodec: framecopy (%dx%d %dbpp fourcc=%x)\n", mux_v->bih->biWidth, mux_v->bih->biHeight, mux_v->bih->biBitCount, mux_v->bih->biCompression); @@ -777,10 +780,10 @@ case VCODEC_COPY: if ((mux_v->bih->biSize != sh_video->bih->biSize) || memcmp(mux_v->bih, sh_video->bih, sh_video->bih->biSize)) { - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_VCodecFramecopy, + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "videocodec: framecopy (%dx%d %dbpp fourcc=%x)\n", sh_video->bih->biWidth, sh_video->bih->biHeight, sh_video->bih->biBitCount, sh_video->bih->biCompression); - mp_tmsg(MSGT_MENCODER,MSGL_FATAL,MSGTR_FrameCopyFileMismatch); + mp_tmsg(MSGT_MENCODER,MSGL_FATAL,"\nAll video files must have identical fps, resolution, and codec for -ovc copy.\n"); mencoder_exit(1,NULL); } } @@ -788,9 +791,9 @@ case VCODEC_COPY: if ((mux_v->bih->biWidth != sh_video->disp_w) || (mux_v->bih->biHeight != sh_video->disp_h) || (mux_v->bih->biCompression != sh_video->format)) { - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_VCodecFramecopy, + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "videocodec: framecopy (%dx%d %dbpp fourcc=%x)\n", sh_video->disp_w, sh_video->disp_w, 24, sh_video->format); - mp_tmsg(MSGT_MENCODER,MSGL_FATAL,MSGTR_FrameCopyFileMismatch); + mp_tmsg(MSGT_MENCODER,MSGL_FATAL,"\nAll video files must have identical fps, resolution, and codec for -ovc copy.\n"); mencoder_exit(1,NULL); } } @@ -830,7 +833,7 @@ default: { sh_video->vfilter=vf_open_encoder(&opts, NULL,"x264",(char *)mux_v); break; } if(!mux_v->bih || !sh_video->vfilter){ - mp_tmsg(MSGT_MENCODER,MSGL_FATAL,MSGTR_EncoderOpenFailed); + mp_tmsg(MSGT_MENCODER,MSGL_FATAL,"Failed to open the encoder.\n"); mencoder_exit(1,NULL); } ve = sh_video->vfilter; @@ -855,7 +858,7 @@ if ((force_fourcc != NULL) && (strlen(force_fourcc) >= 4)) { mux_v->bih->biCompression = mmioFOURCC(force_fourcc[0], force_fourcc[1], force_fourcc[2], force_fourcc[3]); - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_ForcingOutputFourcc, + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "Forcing output FourCC to %x [%.4s].\n", mux_v->bih->biCompression, (char *)&mux_v->bih->biCompression); } @@ -872,7 +875,7 @@ if (force_audiofmttag != -1) { if (sh_audio->wf) { sh_audio->wf->wFormatTag = sh_audio->format; } - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_ForcingOutputAudiofmtTag, + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "Forcing output audio format tag to 0x%x.\n", force_audiofmttag); } @@ -881,7 +884,7 @@ mux_a=muxer_new_stream(muxer,MUXER_TYPE_AUDIO); mux_a->buffer_size=0x100000; //16384; mux_a->buffer=malloc(mux_a->buffer_size); if (!mux_a->buffer) - mencoder_exit(1,_(MSGTR_MemAllocFailed)); + mencoder_exit(1,_("Memory allocation failed.\n")); mux_a->source=sh_audio; @@ -895,7 +898,7 @@ if(!init_audio_filters(sh_audio, new_srate, // output: &ao_data.samplerate, &ao_data.channels, &ao_data.format)) { - mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_AudioFilterChainPreinitError); + mp_tmsg(MSGT_CPLAYER,MSGL_ERR,"Error at audio filter chain pre-init!\n"); mencoder_exit(1, NULL); } @@ -909,15 +912,19 @@ if(mux_a->codec != ACODEC_COPY) { if(!init_audio_filters(sh_audio, new_srate, &aparams.sample_rate, &aparams.channels, &aencoder->input_format)) { - mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_NoMatchingFilter); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,"Couldn't find matching filter/ao format!\n"); mencoder_exit(1,NULL); } } + +#define NoSpeedWithFrameCopy _("WARNING: -speed is not guaranteed to work correctly with -oac copy!\n"\ +"Your encode might be broken!\n") + switch(mux_a->codec){ case ACODEC_COPY: - if (opts.playback_speed != 1.0) mp_tmsg(MSGT_CPLAYER, MSGL_WARN, MSGTR_NoSpeedWithFrameCopy); + if (opts.playback_speed != 1.0) mp_tmsg(MSGT_CPLAYER, MSGL_WARN, NoSpeedWithFrameCopy); if (sh_audio->format >= 0x10000) { - mp_tmsg(MSGT_MENCODER,MSGL_ERR,MSGTR_CantCopyAudioFormat, sh_audio->format); + mp_tmsg(MSGT_MENCODER,MSGL_ERR,"Audio format 0x%x is incompatible with '-oac copy', please try '-oac pcm' instead or use '-fafmttag' to override it.\n", sh_audio->format); mencoder_exit(1,NULL); } if (sh_audio->wf){ @@ -945,7 +952,7 @@ case ACODEC_COPY: } mux_a->h.dwRate *= opts.playback_speed; mux_a->wf->nSamplesPerSec *= opts.playback_speed; - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_ACodecFramecopy, + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "audiocodec: framecopy (format=%x chans=%d rate=%d bits=%d B/s=%d sample-%d)\n", mux_a->wf->wFormatTag, mux_a->wf->nChannels, mux_a->wf->nSamplesPerSec, mux_a->wf->wBitsPerSample, mux_a->wf->nAvgBytesPerSec, mux_a->h.dwSampleSize); break; @@ -970,12 +977,12 @@ timer_start=GetTimerMS(); } // if (!curfile) // if this was the first file. else { if (!mux_a != !sh_audio) { - mp_tmsg(MSGT_MENCODER,MSGL_FATAL,MSGTR_NoAudioFileMismatch); + mp_tmsg(MSGT_MENCODER,MSGL_FATAL,"\nCannot mix video-only files with audio and video files. Try -nosound.\n"); mencoder_exit(1,NULL); } if (sh_audio && mux_a->codec == ACODEC_COPY) { - if (opts.playback_speed != 1.0) mp_tmsg(MSGT_CPLAYER, MSGL_WARN, MSGTR_NoSpeedWithFrameCopy); - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_ACodecFramecopy, + if (opts.playback_speed != 1.0) mp_tmsg(MSGT_CPLAYER, MSGL_WARN, NoSpeedWithFrameCopy); + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "audiocodec: framecopy (format=%x chans=%d rate=%d bits=%d B/s=%d sample-%d)\n", mux_a->wf->wFormatTag, mux_a->wf->nChannels, mux_a->wf->nSamplesPerSec, mux_a->wf->wBitsPerSample, mux_a->wf->nAvgBytesPerSec, mux_a->h.dwSampleSize); if (sh_audio->wf) { @@ -983,10 +990,10 @@ else { (mux_a->wf->nChannels != sh_audio->wf->nChannels) || (mux_a->wf->nSamplesPerSec != sh_audio->wf->nSamplesPerSec * opts.playback_speed)) { - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_ACodecFramecopy, + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "audiocodec: framecopy (format=%x chans=%d rate=%d bits=%d B/s=%d sample-%d)\n", sh_audio->wf->wFormatTag, sh_audio->wf->nChannels, (int)(sh_audio->wf->nSamplesPerSec * opts.playback_speed), sh_audio->wf->wBitsPerSample, sh_audio->wf->nAvgBytesPerSec, 0); - mp_tmsg(MSGT_MENCODER,MSGL_FATAL,MSGTR_AudioCopyFileMismatch); + mp_tmsg(MSGT_MENCODER,MSGL_FATAL,"\nAll files must have identical audio codec and format for -oac copy.\n"); mencoder_exit(1,NULL); } } else { @@ -994,10 +1001,10 @@ else { (mux_a->wf->nChannels != sh_audio->channels) || (mux_a->wf->nSamplesPerSec != sh_audio->samplerate * opts.playback_speed)) { - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_ACodecFramecopy, + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "audiocodec: framecopy (format=%x chans=%d rate=%d bits=%d B/s=%d sample-%d)\n", sh_audio->wf->wFormatTag, sh_audio->wf->nChannels, (int)(sh_audio->wf->nSamplesPerSec * opts.playback_speed), sh_audio->wf->wBitsPerSample, sh_audio->wf->nAvgBytesPerSec, 0); - mp_tmsg(MSGT_MENCODER,MSGL_FATAL,MSGTR_AudioCopyFileMismatch); + mp_tmsg(MSGT_MENCODER,MSGL_FATAL,"\nAll files must have identical audio codec and format for -oac copy.\n"); mencoder_exit(1,NULL); } } @@ -1008,7 +1015,7 @@ else { if (!init_audio_filters(sh_audio, new_srate, &out_srate, &out_channels, &out_format)) { - mp_tmsg(MSGT_CPLAYER, MSGL_FATAL, MSGTR_NoMatchingFilter); + mp_tmsg(MSGT_CPLAYER, MSGL_FATAL, "Couldn't find matching filter/ao format!\n"); mencoder_exit(1, NULL); } mux_a->wf->nSamplesPerSec = out_srate; @@ -1028,18 +1035,18 @@ if (seek_to_sec) { if (out_file_format == MUXER_TYPE_MPEG) { if (audio_preload > 0.4) { - mp_tmsg(MSGT_MENCODER, MSGL_WARN, MSGTR_LimitingAudioPreload); + mp_tmsg(MSGT_MENCODER, MSGL_WARN, "Limiting audio preload to 0.4s.\n"); audio_preload = 0.4; } if (audio_density < 4) { - mp_tmsg(MSGT_MENCODER, MSGL_WARN, MSGTR_IncreasingAudioDensity); + mp_tmsg(MSGT_MENCODER, MSGL_WARN, "Increasing audio density to 4.\n"); audio_density = 4; } } if(file_format == DEMUXER_TYPE_TV) { - mp_tmsg(MSGT_MENCODER, MSGL_WARN, MSGTR_ZeroingAudioPreloadAndMaxPtsCorrection); + mp_tmsg(MSGT_MENCODER, MSGL_WARN, "Forcing audio preload to 0, max pts correction to 0.\n"); audio_preload = 0.0; default_max_pts_correction = 0; } @@ -1339,7 +1346,7 @@ videorate+=(GetTimerMS() - ptimer_start); if(skip_flag<0){ // duplicate frame - if(!quiet) mp_tmsg(MSGT_MENCODER, MSGL_WARN, MSGTR_DuplicateFrames,-skip_flag); + if(!quiet) mp_tmsg(MSGT_MENCODER, MSGL_WARN, "\n%d duplicate frame(s)!\n",-skip_flag); while(skip_flag<0){ duplicatedframes++; if (!encode_duplicates || !sh_video->vfilter || sh_video->vfilter->control(sh_video->vfilter, VFCTRL_DUPLICATE_FRAME, 0) != CONTROL_TRUE) @@ -1349,7 +1356,7 @@ if(skip_flag<0){ } else if(skip_flag>0){ // skip frame - if(!quiet) mp_tmsg(MSGT_MENCODER, MSGL_WARN, MSGTR_SkipFrame); + if(!quiet) mp_tmsg(MSGT_MENCODER, MSGL_WARN, "\nSkipping frame!\n"); skippedframes++; --skip_flag; } @@ -1475,7 +1482,7 @@ if(sh_audio && !demuxer2){ #if 0 if(ferror(muxer_f)) { - mp_tmsg(MSGT_MENCODER,MSGL_FATAL,MSGTR_ErrorWritingFile, out_filename); + mp_tmsg(MSGT_MENCODER,MSGL_FATAL,"%s: Error writing file.\n", out_filename); mencoder_exit(1, NULL); } #endif @@ -1505,9 +1512,9 @@ if (!interrupted && filelist[++curfile].name != 0) { /* Emit the remaining frames in the video system */ /*TODO emit frmaes delayed by decoder lag*/ if(sh_video && sh_video->vfilter){ - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_FlushingVideoFrames); + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "\nFlushing video frames.\n"); if (!sh_video->vfilter->fmt.have_configured) - mp_tmsg(MSGT_MENCODER, MSGL_WARN, MSGTR_FiltersHaveNotBeenConfiguredEmptyFile); + mp_tmsg(MSGT_MENCODER, MSGL_WARN, "Filters have not been configured! Empty file?\n"); else sh_video->vfilter->control(sh_video->vfilter, VFCTRL_FLUSH_FRAMES, 0); @@ -1523,7 +1530,7 @@ stream_seek(muxer->stream,0); if (muxer->cont_write_header) muxer_write_header(muxer); // update header #if 0 if(ferror(muxer_f) || fclose(muxer_f) != 0) { - mp_tmsg(MSGT_MENCODER,MSGL_FATAL,MSGTR_ErrorWritingFile, out_filename); + mp_tmsg(MSGT_MENCODER,MSGL_FATAL,"%s: Error writing file.\n", out_filename); mencoder_exit(1, NULL); } #endif @@ -1531,18 +1538,18 @@ if(vobsub_writer) vobsub_out_close(vobsub_writer); if(out_video_codec==VCODEC_FRAMENO && mux_v->timer>100){ - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_RecommendedVideoBitrate,"650MB",(int)((650*1024*1024-muxer_f_size)/mux_v->timer/125)); - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_RecommendedVideoBitrate,"700MB",(int)((700*1024*1024-muxer_f_size)/mux_v->timer/125)); - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_RecommendedVideoBitrate,"800MB",(int)((800*1024*1024-muxer_f_size)/mux_v->timer/125)); - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_RecommendedVideoBitrate,"2 x 650MB",(int)((2*650*1024*1024-muxer_f_size)/mux_v->timer/125)); - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_RecommendedVideoBitrate,"2 x 700MB",(int)((2*700*1024*1024-muxer_f_size)/mux_v->timer/125)); - mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_RecommendedVideoBitrate,"2 x 800MB",(int)((2*800*1024*1024-muxer_f_size)/mux_v->timer/125)); + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "Recommended video bitrate for %s CD: %d\n","650MB",(int)((650*1024*1024-muxer_f_size)/mux_v->timer/125)); + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "Recommended video bitrate for %s CD: %d\n","700MB",(int)((700*1024*1024-muxer_f_size)/mux_v->timer/125)); + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "Recommended video bitrate for %s CD: %d\n","800MB",(int)((800*1024*1024-muxer_f_size)/mux_v->timer/125)); + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "Recommended video bitrate for %s CD: %d\n","2 x 650MB",(int)((2*650*1024*1024-muxer_f_size)/mux_v->timer/125)); + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "Recommended video bitrate for %s CD: %d\n","2 x 700MB",(int)((2*700*1024*1024-muxer_f_size)/mux_v->timer/125)); + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "Recommended video bitrate for %s CD: %d\n","2 x 800MB",(int)((2*800*1024*1024-muxer_f_size)/mux_v->timer/125)); } -mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_VideoStreamResult, +mp_tmsg(MSGT_MENCODER, MSGL_INFO, "\nVideo stream: %8.3f kbit/s (%d B/s) size: %"PRIu64" bytes %5.3f secs %d frames\n", (float)(mux_v->size/mux_v->timer*8.0f/1000.0f), (int)(mux_v->size/mux_v->timer), (uint64_t)mux_v->size, (float)mux_v->timer, decoded_frameno); if(sh_audio) -mp_tmsg(MSGT_MENCODER, MSGL_INFO, MSGTR_AudioStreamResult, +mp_tmsg(MSGT_MENCODER, MSGL_INFO, "\nAudio stream: %8.3f kbit/s (%d B/s) size: %"PRIu64" bytes %5.3f secs\n", (float)(mux_a->size/mux_a->timer*8.0f/1000.0f), (int)(mux_a->size/mux_a->timer), (uint64_t)mux_a->size, (float)mux_a->timer); if(sh_audio){ uninit_audio(sh_audio);sh_audio=NULL; } @@ -1677,7 +1684,7 @@ static int slowseek(float end_pts, demux_stream_t *d_video, demux_stream_t *d_au } if (print_info) mp_tmsg(MSGT_MENCODER, MSGL_STATUS, - _(MSGTR_EdlSkipStartEndCurrent), + "EDL SKIP: Start: %.2f End: %.2f Current: V: %.2f A: %.2f \r", next_edl_record->start_sec, next_edl_record->stop_sec, sh_video->pts, a_pts); } @@ -64,11 +64,11 @@ void mixer_setvolume(mixer_t *mixer, float l, float r) af_to_dB (AF_NCH, db_vals, db_vals, 20.0); if (!af_control_any_rev(mixer->afilter, AF_CONTROL_VOLUME_LEVEL | AF_CONTROL_SET, db_vals)) { - mp_tmsg(MSGT_GLOBAL, MSGL_INFO, MSGTR_InsertingAfVolume); + mp_tmsg(MSGT_GLOBAL, MSGL_INFO, "[Mixer] No hardware mixing, inserting volume filter.\n"); if (af_add(mixer->afilter, "volume")) { if (!af_control_any_rev(mixer->afilter, AF_CONTROL_VOLUME_LEVEL | AF_CONTROL_SET, db_vals)) { - mp_tmsg(MSGT_GLOBAL, MSGL_ERR, MSGTR_NoVolume); + mp_tmsg(MSGT_GLOBAL, MSGL_ERR, "[Mixer] No volume control available.\n"); return; } } @@ -142,7 +142,7 @@ void mixer_setbalance(mixer_t *mixer, float val) return; if (!(af_pan_balance = af_add(mixer->afilter, "pan"))) { - mp_tmsg(MSGT_GLOBAL, MSGL_ERR, MSGTR_NoBalance); + mp_tmsg(MSGT_GLOBAL, MSGL_ERR, "[Mixer] No balance control available.\n"); return; } diff --git a/mpcommon.c b/mpcommon.c index bae7fff151..732bd1dbb5 100644 --- a/mpcommon.c +++ b/mpcommon.c @@ -44,9 +44,9 @@ void print_version(const char* name) gCpuCaps.has3DNow, gCpuCaps.has3DNowExt, gCpuCaps.hasSSE, gCpuCaps.hasSSE2, gCpuCaps.hasSSSE3); #if CONFIG_RUNTIME_CPUDETECT - mp_tmsg(MSGT_CPLAYER,MSGL_V, MSGTR_CompiledWithRuntimeDetection); + mp_tmsg(MSGT_CPLAYER,MSGL_V, "Compiled with runtime CPU detection.\n"); #else - mp_tmsg(MSGT_CPLAYER,MSGL_V, MSGTR_CompiledWithCPUExtensions); + mp_tmsg(MSGT_CPLAYER,MSGL_V, "Compiled for x86 CPU with extensions:"); if (HAVE_MMX) mp_msg(MSGT_CPLAYER,MSGL_V," MMX"); if (HAVE_MMX2) @@ -173,6 +173,52 @@ static int max_framesize=0; #include "options.h" #include "defaultopts.h" +#define Exit_SIGILL_RTCpuSel _(\ +"- MPlayer crashed by an 'Illegal Instruction'.\n"\ +" It may be a bug in our new runtime CPU-detection code...\n"\ +" Please read DOCS/HTML/en/bugreports.html.\n") + +#define Exit_SIGILL _(\ +"- MPlayer crashed by an 'Illegal Instruction'.\n"\ +" It usually happens when you run it on a CPU different than the one it was\n"\ +" compiled/optimized for.\n"\ +" Verify this!\n") + +#define Exit_SIGSEGV_SIGFPE _(\ +"- MPlayer crashed by bad usage of CPU/FPU/RAM.\n"\ +" Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and\n"\ +" disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash.\n") + +#define Exit_SIGCRASH _(\ +"- MPlayer crashed. This shouldn't happen.\n"\ +" It can be a bug in the MPlayer code _or_ in your drivers _or_ in your\n"\ +" gcc version. If you think it's MPlayer's fault, please read\n"\ +" DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and\n"\ +" won't help unless you provide this information when reporting a possible bug.\n") + +#define SystemTooSlow _("\n\n"\ +" ************************************************\n"\ +" **** Your system is too SLOW to play this! ****\n"\ +" ************************************************\n\n"\ +"Possible reasons, problems, workarounds:\n"\ +"- Most common: broken/buggy _audio_ driver\n"\ +" - Try -ao sdl or use the OSS emulation of ALSA.\n"\ +" - Experiment with different values for -autosync, 30 is a good start.\n"\ +"- Slow video output\n"\ +" - Try a different -vo driver (-vo help for a list) or try -framedrop!\n"\ +"- Slow CPU\n"\ +" - Don't try to play a big DVD/DivX on a slow CPU! Try some of the lavdopts,\n"\ +" e.g. -vfm ffmpeg -lavdopts lowres=1:fast:skiploopfilter=all.\n"\ +"- Broken file\n"\ +" - Try various combinations of -nobps -ni -forceidx -mc 0.\n"\ +"- Slow media (NFS/SMB mounts, DVD, VCD etc)\n"\ +" - Try -cache 8192.\n"\ +"- Are you using -cache to play a non-interleaved AVI file?\n"\ +" - Try -nocache.\n"\ +"Read DOCS/HTML/en/video.html for tuning/speedup tips.\n"\ +"If none of this helps you, read DOCS/HTML/en/bugreports.html.\n\n") + + //**************************************************************************// //**************************************************************************// @@ -699,15 +745,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_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_ExitingHow,MSGTR_Exit_quit); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"\nExiting... (%s)\n","Quit"); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_EXIT=QUIT\n"); break; case EXIT_EOF: - mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_ExitingHow,MSGTR_Exit_eof); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"\nExiting... (%s)\n","End of file"); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_EXIT=EOF\n"); break; case EXIT_ERROR: - mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_ExitingHow,MSGTR_Exit_error); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"\nExiting... (%s)\n","Fatal error"); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_EXIT=ERROR\n"); break; default: @@ -757,7 +803,7 @@ static void exit_sighandler(int x){ kill(getpid(),SIGKILL); #endif } - mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,"\n" MSGTR_IntBySignal,x, + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,"\n" "\nMPlayer interrupted by signal %d in module: %s\n",x, current_module?current_module:"unknown" ); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SIGNAL=%d\n", x); @@ -771,15 +817,15 @@ static void exit_sighandler(int x){ return; // killed from keyboard (^C) or killed [-9] case SIGILL: #if CONFIG_RUNTIME_CPUDETECT - mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGILL_RTCpuSel); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,Exit_SIGILL_RTCpuSel); #else - mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGILL); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,Exit_SIGILL); #endif case SIGFPE: case SIGSEGV: - mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGSEGV_SIGFPE); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,Exit_SIGSEGV_SIGFPE); default: - mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_Exit_SIGCRASH); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,Exit_SIGCRASH); #ifdef CONFIG_CRASH_DEBUG if (crash_debug) { int gdb_pid; @@ -820,7 +866,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_tmsg(MSGT_CPLAYER,MSGL_WARN,MSGTR_NoHomeDir); + mp_tmsg(MSGT_CPLAYER,MSGL_WARN,"Cannot find HOME directory.\n"); } else { #ifdef __MINGW32__ mkdir(conffile); @@ -829,10 +875,10 @@ if ((conffile = get_path("")) == NULL) { #endif free(conffile); if ((conffile = get_path("config")) == NULL) { - mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_GetpathProblem); + mp_tmsg(MSGT_CPLAYER,MSGL_ERR,"get_path(\"config\") problem\n"); } else { if ((conffile_fd = open(conffile, O_CREAT | O_EXCL | O_WRONLY, 0666)) != -1) { - mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_CreatingCfgFile, conffile); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"Creating config file: %s\n", conffile); write(conffile_fd, default_config, strlen(default_config)); close(conffile_fd); } @@ -862,7 +908,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_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_LoadingProtocolProfile, protocol); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"Loading protocol-related profile '%s'\n", protocol); m_config_set_profile(conf,p); } } @@ -885,7 +931,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_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_LoadingExtensionProfile, extension); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"Loading extension-related profile '%s'\n", extension); m_config_set_profile(conf,p); } } @@ -902,7 +948,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_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_LoadingExtensionProfile, profile); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"Loading extension-related profile '%s'\n", profile); m_config_set_profile(conf,p); } } @@ -918,7 +964,7 @@ static void load_per_file_config (m_config_t* conf, const char *const file) if (use_filedir_conf && !stat (cfg, &st)) { - mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_LoadingConfig, cfg); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"Loading config '%s'\n", cfg); m_config_parse_config_file (conf, cfg); return; } @@ -932,7 +978,7 @@ static void load_per_file_config (m_config_t* conf, const char *const file) { if (!stat (confpath, &st)) { - mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_LoadingConfig, confpath); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"Loading config '%s'\n", confpath); m_config_parse_config_file (conf, confpath); } @@ -1032,7 +1078,7 @@ void add_subtitles(struct MPContext *mpctx, char *filename, float fps, int noerr #else if(!subd) #endif - mp_tmsg(MSGT_CPLAYER, noerr ? MSGL_WARN : MSGL_ERR, MSGTR_CantLoadSub, + mp_tmsg(MSGT_CPLAYER, noerr ? MSGL_WARN : MSGL_ERR, "Cannot load subtitles: %s\n", filename_recode(filename)); #ifdef CONFIG_ASS @@ -1046,7 +1092,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_tmsg(MSGT_CPLAYER, MSGL_INFO, MSGTR_AddedSubtitleFile, mpctx->set_of_sub_size, + mp_tmsg(MSGT_CPLAYER, MSGL_INFO, "SUB: Added subtitle file (%d): %s\n", mpctx->set_of_sub_size, filename_recode(filename)); } @@ -1178,7 +1224,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_tmsg(MSGT_AVSYNC,MSGL_WARN,MSGTR_SystemTooSlow); + mp_tmsg(MSGT_AVSYNC,MSGL_WARN,SystemTooSlow); mpctx->drop_message_shown = true; } } @@ -1616,7 +1662,7 @@ if(mpctx->sh_audio){ mpctx->sh_audio->samplerate, // output: &ao_data.samplerate, &ao_data.channels, &ao_data.format)){ - mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_AudioFilterChainPreinitError); + mp_tmsg(MSGT_CPLAYER,MSGL_ERR,"Error at audio filter chain pre-init!\n"); exit_player(mpctx, EXIT_ERROR); } #endif @@ -1627,7 +1673,7 @@ if(mpctx->sh_audio){ ao_data.channels, ao_data.format,0))){ // FAILED: - mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CannotInitAO); + mp_tmsg(MSGT_CPLAYER,MSGL_ERR,"Could not open/initialize audio device -> no sound.\n"); uninit_player(mpctx, INITIALIZED_ACODEC); // close codec mpctx->sh_audio=mpctx->d_audio->sh=NULL; // -> nosound mpctx->d_audio->id = -2; @@ -1648,7 +1694,7 @@ if(mpctx->sh_audio){ #if 1 current_module="af_init"; if(!build_afilter_chain(mpctx, mpctx->sh_audio, &ao_data)) { - mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_NoMatchingFilter); + mp_tmsg(MSGT_CPLAYER,MSGL_ERR,"Couldn't find matching filter/ao format!\n"); // 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 +1807,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_tmsg(MSGT_CPLAYER, MSGL_ERR, MSGTR_LinuxRTCReadError, strerror(errno)); + mp_tmsg(MSGT_CPLAYER, MSGL_ERR, "Linux RTC read error: %s\n", strerror(errno)); time_frame -= get_relative_time(mpctx); } } else @@ -1778,7 +1824,7 @@ static float timing_sleep(struct MPContext *mpctx, float time_frame) if (softsleep){ current_module = "sleep_soft"; if (time_frame < 0) - mp_tmsg(MSGT_AVSYNC, MSGL_WARN, MSGTR_SoftsleepUnderflow); + mp_tmsg(MSGT_AVSYNC, MSGL_WARN, "Warning! Softsleep underflow!\n"); while (time_frame > 0) time_frame -= get_relative_time(mpctx); // burn the CPU } @@ -2103,7 +2149,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_tmsg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_ErrorInitializingVODevice); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,"Error opening/initializing the selected video_out (-vo) device.\n"); goto err_out; } mpctx->initialized_flags|=INITIALIZED_VO; @@ -2121,7 +2167,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_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantOpenLibmenuFilterWithThisRootMenu,menu_root); + mp_tmsg(MSGT_CPLAYER,MSGL_ERR,"Can't open libmenu video filter with root menu %s.\n",menu_root); use_menu = 0; } } @@ -2389,13 +2435,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] = _("\n ===== PAUSE =====\r"); 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_tmsg(MSGT_CPLAYER,MSGL_STATUS,MSGTR_Paused); + mp_tmsg(MSGT_CPLAYER,MSGL_STATUS,"\n ===== PAUSE =====\r"); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_PAUSED\n"); } #ifdef CONFIG_GUI @@ -2469,7 +2515,7 @@ static void edl_update(MPContext *mpctx) return; if (!mpctx->sh_video) { - mp_tmsg(MSGT_CPLAYER, MSGL_ERR, MSGTR_EdlNOsh_video); + mp_tmsg(MSGT_CPLAYER, MSGL_ERR, "Cannot use EDL without video, disabling.\n"); free_edl(edl_records); next_edl_record = NULL; edl_records = NULL; @@ -2984,13 +3030,13 @@ int gui_no_filename=0; #ifndef CONFIG_GUI if(use_gui){ - mp_tmsg(MSGT_CPLAYER,MSGL_WARN,MSGTR_NoGui); + mp_tmsg(MSGT_CPLAYER,MSGL_WARN,"MPlayer was compiled WITHOUT GUI support.\n"); use_gui=0; } #else #if !defined(__MINGW32__) && !defined(__CYGWIN__) if(use_gui && !vo_init()){ - mp_tmsg(MSGT_CPLAYER,MSGL_WARN,MSGTR_GuiNeedsX); + mp_tmsg(MSGT_CPLAYER,MSGL_WARN,"MPlayer GUI requires X11.\n"); use_gui=0; } #endif @@ -3028,7 +3074,7 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ if(!parse_codec_cfg(NULL)){ exit_player_with_rc(mpctx, EXIT_NONE, 0); } - mp_tmsg(MSGT_CPLAYER,MSGL_V,MSGTR_BuiltinCodecsConf); + mp_tmsg(MSGT_CPLAYER,MSGL_V,"Using built-in default codecs.conf.\n"); } } free( mem_ptr ); // release the buffer created by get_path() @@ -3043,14 +3089,14 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ } #endif if(audio_codec_list && strcmp(audio_codec_list[0],"help")==0){ - mp_tmsg(MSGT_CPLAYER, MSGL_INFO, MSGTR_AvailableAudioCodecs); + mp_tmsg(MSGT_CPLAYER, MSGL_INFO, "Available audio codecs:\n"); 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_tmsg(MSGT_CPLAYER, MSGL_INFO, MSGTR_AvailableVideoCodecs); + mp_tmsg(MSGT_CPLAYER, MSGL_INFO, "Available video codecs:\n"); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VIDEO_CODECS\n"); list_codecs(0); mp_msg(MSGT_FIXME, MSGL_FIXME, "\n"); @@ -3094,7 +3140,7 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ exit_player(mpctx, EXIT_NONE); if (player_idle_mode && use_gui) { - mp_tmsg(MSGT_CPLAYER, MSGL_FATAL, MSGTR_NoIdleAndGui); + mp_tmsg(MSGT_CPLAYER, MSGL_FATAL, "The -idle option cannot be used with GMPlayer.\n"); exit_player_with_rc(mpctx, EXIT_NONE, 1); } @@ -3111,7 +3157,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_tmsg(MSGT_CPLAYER, MSGL_INFO, MSGTR_CommandLine); + mp_tmsg(MSGT_CPLAYER, MSGL_INFO, "CommandLine:"); for(i=1;i<argc;i++)mp_msg(MSGT_CPLAYER, MSGL_INFO," '%s'",argv[i]); mp_msg(MSGT_CPLAYER, MSGL_INFO, "\n"); } @@ -3131,7 +3177,7 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ #ifdef CONFIG_BITMAP_FONT if(font_name){ vo_font=read_font_desc(font_name,font_factor,verbose>1); - if(!vo_font) mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadFont, + if(!vo_font) mp_tmsg(MSGT_CPLAYER,MSGL_ERR,"Cannot load bitmap font: %s\n", filename_recode(font_name)); } else { // try default: @@ -3158,23 +3204,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_tmsg(MSGT_CPLAYER, MSGL_WARN, MSGTR_RTCDeviceNotOpenable, + mp_tmsg(MSGT_CPLAYER, MSGL_WARN, "Failed to open %s: %s (it should be readable by the user.)\n", 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_tmsg(MSGT_CPLAYER, MSGL_WARN, MSGTR_LinuxRTCInitErrorIrqpSet, irqp, strerror(errno)); - mp_tmsg(MSGT_CPLAYER, MSGL_HINT, MSGTR_IncreaseRTCMaxUserFreq, irqp); + mp_tmsg(MSGT_CPLAYER, MSGL_WARN, "Linux RTC init error in ioctl (rtc_irqp_set %lu): %s\n", irqp, strerror(errno)); + mp_tmsg(MSGT_CPLAYER, MSGL_HINT, "Try adding \"echo %lu > /proc/sys/dev/rtc/max-user-freq\" to your system startup scripts.\n", irqp); close (rtc_fd); rtc_fd = -1; } else if (ioctl(rtc_fd, RTC_PIE_ON, 0) < 0) { /* variable only by the root */ - mp_tmsg(MSGT_CPLAYER, MSGL_ERR, MSGTR_LinuxRTCInitErrorPieOn, strerror(errno)); + mp_tmsg(MSGT_CPLAYER, MSGL_ERR, "Linux RTC init error in ioctl (rtc_pie_on): %s\n", strerror(errno)); close (rtc_fd); rtc_fd = -1; } else - mp_tmsg(MSGT_CPLAYER, MSGL_V, MSGTR_UsingRTCTiming, irqp); + mp_tmsg(MSGT_CPLAYER, MSGL_V, "Using Linux hardware RTC timing (%ldHz).\n", irqp); } } #ifdef CONFIG_GUI @@ -3207,17 +3253,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_tmsg(MSGT_CPLAYER, MSGL_V, MSGTR_MenuInitialized, menu_cfg); + mp_tmsg(MSGT_CPLAYER, MSGL_V, "Menu initialized: %s\n", menu_cfg); else { menu_cfg = get_path("menu.conf"); if(menu_init(mpctx, mpctx->mconfig, mpctx->input, menu_cfg)) - mp_tmsg(MSGT_CPLAYER, MSGL_V, MSGTR_MenuInitialized, menu_cfg); + mp_tmsg(MSGT_CPLAYER, MSGL_V, "Menu initialized: %s\n", menu_cfg); else { if(menu_init(mpctx, mpctx->mconfig, mpctx->input, MPLAYER_CONFDIR "/menu.conf")) - mp_tmsg(MSGT_CPLAYER, MSGL_V, MSGTR_MenuInitialized, MPLAYER_CONFDIR"/menu.conf"); + mp_tmsg(MSGT_CPLAYER, MSGL_V, "Menu initialized: %s\n", MPLAYER_CONFDIR"/menu.conf"); else { - mp_tmsg(MSGT_CPLAYER, MSGL_ERR, MSGTR_MenuInitFailed); + mp_tmsg(MSGT_CPLAYER, MSGL_ERR, "Menu init failed.\n"); use_menu = 0; } } @@ -3289,7 +3335,7 @@ play_next_file: // or cache filling if(!noconsolecontrols && !slave_mode){ if(mpctx->initialized_flags&INITIALIZED_GETCH2) - mp_tmsg(MSGT_CPLAYER,MSGL_WARN,MSGTR_Getch2InitializedTwice); + mp_tmsg(MSGT_CPLAYER,MSGL_WARN,"WARNING: getch2_init called twice!\n"); else getch2_enable(); // prepare stdin for hotkeys... mpctx->initialized_flags|=INITIALIZED_GETCH2; @@ -3393,7 +3439,7 @@ while (player_idle_mode && !mpctx->filename) { //--------------------------------------------------------------------------- if(mpctx->filename) - mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_Playing, + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"\nPlaying %s.\n", filename_recode(mpctx->filename)); if (edl_filename) { @@ -3404,7 +3450,7 @@ if (edl_output_filename) { if (edl_fd) fclose(edl_fd); if ((edl_fd = fopen(edl_output_filename, "w")) == NULL) { - mp_tmsg(MSGT_CPLAYER, MSGL_ERR, MSGTR_EdlCantOpenForWrite, + mp_tmsg(MSGT_CPLAYER, MSGL_ERR, "Can't open EDL file [%s] for writing.\n", filename_recode(edl_output_filename)); } } @@ -3415,7 +3461,7 @@ if (edl_output_filename) { if (vobsub_name){ vo_vobsub=vobsub_open(vobsub_name,spudec_ifo,1,&vo_spudec); if(vo_vobsub==NULL) - mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadSub, + mp_tmsg(MSGT_CPLAYER,MSGL_ERR,"Cannot load subtitles: %s\n", filename_recode(vobsub_name)); } else if (sub_auto && mpctx->filename){ /* try to autodetect vobsub from movie filename ::atmos */ @@ -3507,14 +3553,14 @@ if(stream_dump_type==5){ FILE *f; current_module="dumpstream"; if(mpctx->stream->type==STREAMTYPE_STREAM && mpctx->stream->fd<0){ - mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_DumpstreamFdUnavailable); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,"Cannot dump this stream - no file descriptor available.\n"); 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_tmsg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CantOpenDumpfile); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,"Cannot open dump file.\n"); exit_player(mpctx, EXIT_ERROR); } if (dvd_chapter > 1) { @@ -3525,7 +3571,7 @@ if(stream_dump_type==5){ len=stream_read(mpctx->stream,buf,4096); if(len>0) { if(fwrite(buf,len,1,f) != 1) { - mp_tmsg(MSGT_MENCODER,MSGL_FATAL,MSGTR_ErrorWritingFile,stream_dump_name); + mp_tmsg(MSGT_MENCODER,MSGL_FATAL,"%s: Error writing file.\n",stream_dump_name); exit_player(mpctx, EXIT_ERROR); } } @@ -3537,10 +3583,10 @@ if(stream_dump_type==5){ } } if(fclose(f)) { - mp_tmsg(MSGT_MENCODER,MSGL_FATAL,MSGTR_ErrorWritingFile,stream_dump_name); + mp_tmsg(MSGT_MENCODER,MSGL_FATAL,"%s: Error writing file.\n",stream_dump_name); exit_player(mpctx, EXIT_ERROR); } - mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_CoreDumped); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"Core dumped ;)\n"); exit_player_with_rc(mpctx, EXIT_EOF, 0); } @@ -3716,7 +3762,7 @@ if((stream_dump_type)&&(stream_dump_type<4)){ case 3: ds=mpctx->d_sub;break; } if(!ds){ - mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_DumpSelectedStreamMissing); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,"dump: FATAL: Selected stream missing!\n"); exit_player(mpctx, EXIT_ERROR); } // disable other streams: @@ -3726,7 +3772,7 @@ if((stream_dump_type)&&(stream_dump_type<4)){ // let's dump it! f=fopen(stream_dump_name,"wb"); if(!f){ - mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CantOpenDumpfile); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,"Cannot open dump file.\n"); exit_player(mpctx, EXIT_ERROR); } while(!ds->eof){ @@ -3742,7 +3788,7 @@ if((stream_dump_type)&&(stream_dump_type<4)){ } } fclose(f); - mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_CoreDumped); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"Core dumped ;)\n"); exit_player_with_rc(mpctx, EXIT_EOF, 0); } @@ -3753,10 +3799,10 @@ if(mpctx->sh_video){ current_module="video_read_properties"; if(!video_read_properties(mpctx->sh_video)) { - mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CannotReadVideoProperties); + mp_tmsg(MSGT_CPLAYER,MSGL_ERR,"Video: Cannot read properties.\n"); mpctx->sh_video=mpctx->d_video->sh=NULL; } else { - mp_tmsg(MSGT_CPLAYER,MSGL_V,MSGTR_FilefmtFourccSizeFpsFtime, + mp_tmsg(MSGT_CPLAYER,MSGL_V,"[V] filefmt:%d fourcc:0x%X size:%dx%d fps:%5.3f ftime:=%6.4f\n", 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 +3815,7 @@ if(mpctx->sh_video){ vo_fps = mpctx->sh_video->fps; if(!mpctx->sh_video->fps && !force_fps){ - mp_tmsg(MSGT_CPLAYER,MSGL_ERR,MSGTR_FPSnotspecified); + mp_tmsg(MSGT_CPLAYER,MSGL_ERR,"FPS not specified in the header or invalid, use the -fps option.\n"); mpctx->sh_video=mpctx->d_video->sh=NULL; } } @@ -3777,7 +3823,7 @@ if(mpctx->sh_video){ } if(!mpctx->sh_video && !mpctx->sh_audio){ - mp_tmsg(MSGT_CPLAYER,MSGL_FATAL, MSGTR_NoStreamFound); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL, "No stream found.\n"); #ifdef CONFIG_DVBIN if(mpctx->stream->type == STREAMTYPE_DVB) { @@ -3794,7 +3840,7 @@ if(!mpctx->sh_video && !mpctx->sh_audio){ } } #endif - goto goto_next_file; // exit_player(_(MSGTR_Exit_error)); + goto goto_next_file; // exit_player(_("Fatal error")); } /* display clip info */ @@ -3907,7 +3953,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(_("Fatal error")); } } @@ -3970,14 +4016,14 @@ if(mpctx->sh_audio){ } if(!mpctx->sh_audio){ - mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_NoSound); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"Audio: no sound\n"); 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_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_Video_NoVideo); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"Video: no video\n"); 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 +4037,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_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_FPSforced,mpctx->sh_video->fps,mpctx->sh_video->frametime); + mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"FPS forced to be %5.3f (ftime: %5.3f).\n",mpctx->sh_video->fps,mpctx->sh_video->frametime); } #ifdef CONFIG_GUI @@ -4014,7 +4060,7 @@ if ( use_gui ) { if(opts->loop_times>1) opts->loop_times--; else if(opts->loop_times==1) opts->loop_times = -1; -mp_tmsg(MSGT_CPLAYER,MSGL_INFO,MSGTR_StartPlaying); +mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"Starting playback...\n"); total_time_usage_start=GetTimer(); audio_time_usage=0; video_time_usage=0; vout_time_usage=0; @@ -4031,7 +4077,7 @@ if (seek_to_sec) { } if (end_at.type == END_AT_SIZE) { - mp_tmsg(MSGT_CPLAYER, MSGL_WARN, MSGTR_MPEndposNoSizeBased); + mp_tmsg(MSGT_CPLAYER, MSGL_WARN, "Option -endpos in MPlayer does not yet support size units.\n"); end_at.type = END_AT_NONE; } @@ -4102,7 +4148,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_tmsg(MSGT_CPLAYER,MSGL_FATAL, MSGTR_NotInitializeVOPorVO); + mp_tmsg(MSGT_CPLAYER,MSGL_FATAL, "\nFATAL: Could not initialize video filters (-vf) or video output (-vo).\n"); mpctx->stop_play = PT_NEXT_ENTRY; goto goto_next_file; } diff --git a/osdep/priority.c b/osdep/priority.c index 8f57d295e3..ffc589386f 100644 --- a/osdep/priority.c +++ b/osdep/priority.c @@ -73,7 +73,7 @@ void set_priority(void) if (strcasecmp(priority_presets_defs[i].name, proc_priority) == 0) break; } - mp_tmsg(MSGT_CPLAYER, MSGL_STATUS, MSGTR_SettingProcessPriority, + mp_tmsg(MSGT_CPLAYER, MSGL_STATUS, "Setting process priority: %s\n", priority_presets_defs[i].name); #ifdef __OS2__ diff --git a/parser-mecmd.c b/parser-mecmd.c index 85c4f0708d..5792475f32 100644 --- a/parser-mecmd.c +++ b/parser-mecmd.c @@ -78,7 +78,7 @@ m_config_parse_me_command_line(m_config_t *config, int argc, char **argv) no_more_opts = 1; if (i+1 >= argc) { - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, MSGTR_NoFileGivenOnCommandLine); + mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, "'--' indicates no more options, but no filename was given on the command line.\n"); goto err_out; } continue; @@ -93,7 +93,7 @@ m_config_parse_me_command_line(m_config_t *config, int argc, char **argv) mp_opt = m_config_get_option(config,opt); if(!mp_opt) { tmp = M_OPT_UNKNOWN; - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, MSGTR_NotAnMEncoderOption, opt); + mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, "-%s is not an MEncoder option\n", opt); goto err_out; } if(!entry || (mp_opt->flags & M_OPT_GLOBAL)){ @@ -105,7 +105,7 @@ m_config_parse_me_command_line(m_config_t *config, int argc, char **argv) else if(tmp < 0){ // mp_msg(MSGT_CFGPARSER, MSGL_ERR, "m_config_set_option() failed (%d)\n",tmp); - mp_tmsg(MSGT_CFGPARSER, MSGL_FATAL, MSGTR_ErrorParsingOptionOnCommandLine, opt); + mp_tmsg(MSGT_CFGPARSER, MSGL_FATAL, "Error parsing option on the command line: -%s\n", opt); goto err_out; } } else { @@ -142,7 +142,7 @@ m_config_parse_me_command_line(m_config_t *config, int argc, char **argv) exit(0); if(nf == 0) { m_entry_list_free(lst); - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, MSGTR_NoFileGiven); + mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, "No file given\n"); return NULL; } return lst; diff --git a/parser-mpcmd.c b/parser-mpcmd.c index d88129c1f9..d6c3d375ce 100644 --- a/parser-mpcmd.c +++ b/parser-mpcmd.c @@ -107,7 +107,7 @@ m_config_parse_mp_command_line(m_config_t *config, int argc, char **argv) no_more_opts = 1; if (i+1 >= argc) { - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, MSGTR_NoFileGivenOnCommandLine); + mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, "'--' indicates no more options, but no filename was given on the command line.\n"); goto err_out; } continue; @@ -154,7 +154,7 @@ m_config_parse_mp_command_line(m_config_t *config, int argc, char **argv) char* end = NULL; l = (i+1<argc) ? strtol(argv[i+1],&end,0) : 0; if(!end || *end != '\0') { - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, MSGTR_TheLoopOptionMustBeAnInteger, argv[i+1]); + mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, "The loop option must be an integer: %s\n", argv[i+1]); tmp = ERR_OUT_OF_RANGE; } else { play_tree_t* pt = last_entry ? last_entry : last_parent; @@ -200,7 +200,7 @@ m_config_parse_mp_command_line(m_config_t *config, int argc, char **argv) } } else { tmp = M_OPT_UNKNOWN; - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, MSGTR_UnknownOptionOnCommandLine, opt); + mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, "Unknown option on the command line: -%s\n", opt); } } } @@ -210,7 +210,7 @@ m_config_parse_mp_command_line(m_config_t *config, int argc, char **argv) tmp = M_OPT_EXIT - tmp; } else if (tmp < 0) { - mp_tmsg(MSGT_CFGPARSER, MSGL_FATAL, MSGTR_ErrorParsingOptionOnCommandLine, opt); + mp_tmsg(MSGT_CFGPARSER, MSGL_FATAL, "Error parsing option on the command line: -%s\n", opt); goto err_out; } i += tmp; @@ -245,7 +245,7 @@ m_config_parse_mp_command_line(m_config_t *config, int argc, char **argv) last_entry = entry; } } else { - mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, MSGTR_InvalidPlayEntry, argv[i]); + mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, "Invalid play entry %s\n", argv[i]); } } else { // dvd:// or dvd://x entry diff --git a/stream/ai_alsa.c b/stream/ai_alsa.c index 20c3e4d168..002ea36f71 100644 --- a/stream/ai_alsa.c +++ b/stream/ai_alsa.c @@ -23,24 +23,24 @@ int ai_alsa_setup(audio_in_t *ai) err = snd_pcm_hw_params_any(ai->alsa.handle, params); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_PcmBrokenConfig); + mp_tmsg(MSGT_TV, MSGL_ERR, "Broken configuration for this PCM: no configurations available.\n"); return -1; } err = snd_pcm_hw_params_set_access(ai->alsa.handle, params, SND_PCM_ACCESS_RW_INTERLEAVED); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_UnavailableAccessType); + mp_tmsg(MSGT_TV, MSGL_ERR, "Access type not available.\n"); return -1; } err = snd_pcm_hw_params_set_format(ai->alsa.handle, params, SND_PCM_FORMAT_S16_LE); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_UnavailableSampleFmt); + mp_tmsg(MSGT_TV, MSGL_ERR, "Sample format not available.\n"); return -1; } err = snd_pcm_hw_params_set_channels(ai->alsa.handle, params, ai->req_channels); if (err < 0) { ai->channels = snd_pcm_hw_params_get_channels(params); - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_UnavailableChanCount, + mp_tmsg(MSGT_TV, MSGL_ERR, "Channel count not available - reverting to default: %d\n", ai->channels); } else { ai->channels = ai->req_channels; @@ -61,14 +61,14 @@ int ai_alsa_setup(audio_in_t *ai) assert(ai->alsa.period_time >= 0); err = snd_pcm_hw_params(ai->alsa.handle, params); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_CannotInstallHWParams); + mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to install hardware paramameters: %s"); snd_pcm_hw_params_dump(params, ai->alsa.log); return -1; } ai->alsa.chunk_size = snd_pcm_hw_params_get_period_size(params, 0); buffer_size = snd_pcm_hw_params_get_buffer_size(params); if (ai->alsa.chunk_size == buffer_size) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_PeriodEqualsBufferSize, ai->alsa.chunk_size, (long)buffer_size); + mp_tmsg(MSGT_TV, MSGL_ERR, "Can't use period equal to buffer size (%u == %lu)\n", ai->alsa.chunk_size, (long)buffer_size); return -1; } snd_pcm_sw_params_current(ai->alsa.handle, swparams); @@ -84,7 +84,7 @@ int ai_alsa_setup(audio_in_t *ai) assert(err >= 0); if (snd_pcm_sw_params(ai->alsa.handle, swparams) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_CannotInstallSWParams); + mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to install software parameters:\n"); snd_pcm_sw_params_dump(swparams, ai->alsa.log); return -1; } @@ -108,7 +108,7 @@ int ai_alsa_init(audio_in_t *ai) err = snd_pcm_open(&ai->alsa.handle, ai->alsa.device, SND_PCM_STREAM_CAPTURE, 0); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_ErrorOpeningAudio, snd_strerror(err)); + mp_tmsg(MSGT_TV, MSGL_ERR, "Error opening audio: %s\n", snd_strerror(err)); return -1; } @@ -142,7 +142,7 @@ int ai_alsa_xrun(audio_in_t *ai) snd_pcm_status_alloca(&status); if ((res = snd_pcm_status(ai->alsa.handle, status))<0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaStatusError, snd_strerror(res)); + mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA status error: %s", snd_strerror(res)); return -1; } if (snd_pcm_status_get_state(status) == SND_PCM_STATE_XRUN) { @@ -150,18 +150,18 @@ int ai_alsa_xrun(audio_in_t *ai) gettimeofday(&now, 0); snd_pcm_status_get_trigger_tstamp(status, &tstamp); timersub(&now, &tstamp, &diff); - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaXRUN, + mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA xrun!!! (at least %.3f ms long)\n", diff.tv_sec * 1000 + diff.tv_usec / 1000.0); if (mp_msg_test(MSGT_TV, MSGL_V)) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaStatus); + mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA Status:\n"); snd_pcm_status_dump(status, ai->alsa.log); } if ((res = snd_pcm_prepare(ai->alsa.handle))<0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaXRUNPrepareError, snd_strerror(res)); + mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA xrun: prepare error: %s", snd_strerror(res)); return -1; } return 0; /* ok, data should be accepted again */ } - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError); + mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA read/write error"); return -1; } diff --git a/stream/ai_alsa1x.c b/stream/ai_alsa1x.c index 924fed941f..625ccdf387 100644 --- a/stream/ai_alsa1x.c +++ b/stream/ai_alsa1x.c @@ -24,27 +24,27 @@ int ai_alsa_setup(audio_in_t *ai) err = snd_pcm_hw_params_any(ai->alsa.handle, params); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_PcmBrokenConfig); + mp_tmsg(MSGT_TV, MSGL_ERR, "Broken configuration for this PCM: no configurations available.\n"); return -1; } err = snd_pcm_hw_params_set_access(ai->alsa.handle, params, SND_PCM_ACCESS_RW_INTERLEAVED); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_UnavailableAccessType); + mp_tmsg(MSGT_TV, MSGL_ERR, "Access type not available.\n"); return -1; } err = snd_pcm_hw_params_set_format(ai->alsa.handle, params, SND_PCM_FORMAT_S16_LE); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_UnavailableSampleFmt); + mp_tmsg(MSGT_TV, MSGL_ERR, "Sample format not available.\n"); return -1; } err = snd_pcm_hw_params_set_channels(ai->alsa.handle, params, ai->req_channels); if (err < 0) { snd_pcm_hw_params_get_channels(params, &ai->channels); - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_UnavailableChanCount, + mp_tmsg(MSGT_TV, MSGL_ERR, "Channel count not available - reverting to default: %d\n", ai->channels); } else { ai->channels = ai->req_channels; @@ -54,7 +54,7 @@ int ai_alsa_setup(audio_in_t *ai) rate = ai->req_samplerate; err = snd_pcm_hw_params_set_rate_near(ai->alsa.handle, params, &rate, &dir); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA1X_CannotSetSamplerate); + mp_tmsg(MSGT_TV, MSGL_ERR, "Cannot set samplerate.\n"); } ai->samplerate = rate; @@ -63,7 +63,7 @@ int ai_alsa_setup(audio_in_t *ai) err = snd_pcm_hw_params_set_buffer_time_near(ai->alsa.handle, params, &ai->alsa.buffer_time, &dir); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA1X_CannotSetBufferTime); + mp_tmsg(MSGT_TV, MSGL_ERR, "Cannot set buffer time.\n"); } dir = 0; @@ -71,12 +71,12 @@ int ai_alsa_setup(audio_in_t *ai) err = snd_pcm_hw_params_set_period_time_near(ai->alsa.handle, params, &ai->alsa.period_time, &dir); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA1X_CannotSetPeriodTime); + mp_tmsg(MSGT_TV, MSGL_ERR, "Cannot set period time.\n"); } err = snd_pcm_hw_params(ai->alsa.handle, params); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_CannotInstallHWParams, snd_strerror(err)); + mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to install hardware paramameters: %s", snd_strerror(err)); snd_pcm_hw_params_dump(params, ai->alsa.log); return -1; } @@ -86,7 +86,7 @@ int ai_alsa_setup(audio_in_t *ai) snd_pcm_hw_params_get_buffer_size(params, &buffer_size); ai->alsa.chunk_size = period_size; if (period_size == buffer_size) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_PeriodEqualsBufferSize, ai->alsa.chunk_size, (long)buffer_size); + mp_tmsg(MSGT_TV, MSGL_ERR, "Can't use period equal to buffer size (%u == %lu)\n", ai->alsa.chunk_size, (long)buffer_size); return -1; } @@ -98,7 +98,7 @@ int ai_alsa_setup(audio_in_t *ai) err = snd_pcm_sw_params_set_stop_threshold(ai->alsa.handle, swparams, buffer_size); if (snd_pcm_sw_params(ai->alsa.handle, swparams) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_CannotInstallSWParams); + mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to install software parameters:\n"); snd_pcm_sw_params_dump(swparams, ai->alsa.log); return -1; } @@ -122,7 +122,7 @@ int ai_alsa_init(audio_in_t *ai) err = snd_pcm_open(&ai->alsa.handle, ai->alsa.device, SND_PCM_STREAM_CAPTURE, 0); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_ErrorOpeningAudio, snd_strerror(err)); + mp_tmsg(MSGT_TV, MSGL_ERR, "Error opening audio: %s\n", snd_strerror(err)); return -1; } @@ -156,7 +156,7 @@ int ai_alsa_xrun(audio_in_t *ai) snd_pcm_status_alloca(&status); if ((res = snd_pcm_status(ai->alsa.handle, status))<0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaStatusError, snd_strerror(res)); + mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA status error: %s", snd_strerror(res)); return -1; } if (snd_pcm_status_get_state(status) == SND_PCM_STATE_XRUN) { @@ -164,18 +164,18 @@ int ai_alsa_xrun(audio_in_t *ai) gettimeofday(&now, 0); snd_pcm_status_get_trigger_tstamp(status, &tstamp); timersub(&now, &tstamp, &diff); - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaXRUN, + mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA xrun!!! (at least %.3f ms long)\n", diff.tv_sec * 1000 + diff.tv_usec / 1000.0); if (mp_msg_test(MSGT_TV, MSGL_V)) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaStatus); + mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA Status:\n"); snd_pcm_status_dump(status, ai->alsa.log); } if ((res = snd_pcm_prepare(ai->alsa.handle))<0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaXRUNPrepareError, snd_strerror(res)); + mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA xrun: prepare error: %s", snd_strerror(res)); return -1; } return 0; /* ok, data should be accepted again */ } - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError); + mp_tmsg(MSGT_TV, MSGL_ERR, "ALSA read/write error"); return -1; } diff --git a/stream/ai_oss.c b/stream/ai_oss.c index 3f90423f1e..b662445128 100644 --- a/stream/ai_oss.c +++ b/stream/ai_oss.c @@ -41,7 +41,7 @@ int ai_oss_set_channels(audio_in_t *ai) mp_msg(MSGT_TV, MSGL_V, "ioctl dsp channels: %d\n", err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_CHANNELS, &ioctl_param)); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIOSS_Unable2SetChanCount, + mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set channel count: %d\n", ai->req_channels); return -1; } @@ -54,7 +54,7 @@ int ai_oss_set_channels(audio_in_t *ai) err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_STEREO, &ioctl_param), ioctl_param); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIOSS_Unable2SetStereo, + mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set stereo: %d\n", ai->req_channels == 2); return -1; } @@ -71,7 +71,7 @@ int ai_oss_init(audio_in_t *ai) ai->oss.audio_fd = open(ai->oss.device, O_RDONLY); if (ai->oss.audio_fd < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIOSS_Unable2Open, + mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to open '%s': %s\n", ai->oss.device, strerror(errno)); return -1; } @@ -82,13 +82,13 @@ int ai_oss_init(audio_in_t *ai) mp_msg(MSGT_TV, MSGL_V, "Supported formats: %x\n", ioctl_param); if (!(ioctl_param & AFMT_S16_LE)) - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIOSS_UnsupportedFmt); + mp_tmsg(MSGT_TV, MSGL_ERR, "unsupported format\n"); ioctl_param = AFMT_S16_LE; mp_msg(MSGT_TV, MSGL_V, "ioctl dsp setfmt: %d\n", err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_SETFMT, &ioctl_param)); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIOSS_Unable2SetAudioFmt); + mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set audio format."); return -1; } @@ -98,7 +98,7 @@ int ai_oss_init(audio_in_t *ai) mp_msg(MSGT_TV, MSGL_V, "ioctl dsp speed: %d\n", err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_SPEED, &ioctl_param)); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIOSS_Unable2SetSamplerate, + mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set samplerate: %d\n", ai->req_samplerate); return -1; } @@ -111,7 +111,7 @@ int ai_oss_init(audio_in_t *ai) mp_msg(MSGT_TV, MSGL_V, "ioctl dsp trigger: %d\n", err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_SETTRIGGER, &ioctl_param)); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIOSS_Unable2SetTrigger, + mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set trigger: %d\n", PCM_ENABLE_INPUT); } @@ -119,17 +119,17 @@ int ai_oss_init(audio_in_t *ai) mp_msg(MSGT_TV, MSGL_V, "ioctl dsp getblocksize: %d\n", err = ioctl(ai->oss.audio_fd, SNDCTL_DSP_GETBLKSIZE, &ai->blocksize)); if (err < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIOSS_Unable2GetBlockSize); + mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to get block size!\n"); } mp_msg(MSGT_TV, MSGL_V, "blocksize: %d\n", ai->blocksize); // correct the blocksize to a reasonable value if (ai->blocksize <= 0) { ai->blocksize = 4096*ai->channels*2; - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIOSS_AudioBlockSizeZero, ai->blocksize); + mp_tmsg(MSGT_TV, MSGL_ERR, "Audio block size is zero, setting to %d!\n", ai->blocksize); } else if (ai->blocksize < 4096*ai->channels*2) { ai->blocksize *= 4096*ai->channels*2/ai->blocksize; - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIOSS_AudioBlockSize2Low, ai->blocksize); + mp_tmsg(MSGT_TV, MSGL_ERR, "Audio block size too low, setting to %d!\n", ai->blocksize); } ai->samplesize = 16; diff --git a/stream/asf_mmst_streaming.c b/stream/asf_mmst_streaming.c index 3bd8944039..65398c1602 100644 --- a/stream/asf_mmst_streaming.c +++ b/stream/asf_mmst_streaming.c @@ -137,7 +137,7 @@ static void send_command (int s, int command, uint32_t switches, memset(&cmd.buf[48 + length], 0, 8 - (length & 7)); if (send (s, cmd.buf, len8*8+48, 0) != (len8*8+48)) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_WriteError); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"write error\n"); } } @@ -185,7 +185,7 @@ static void get_answer (int s) len = recv (s, data, BUF_SIZE, 0) ; if (!len) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_EOFAlert); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"\nAlert! EOF\n"); return; } @@ -232,7 +232,7 @@ static int get_header (int s, uint8_t *header, streaming_ctrl_t *streaming_ctrl) while (1) { if (!get_data (s, pre_header, 8)) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_PreHeaderReadFailed); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"pre-header read failed\n"); return 0; } if (pre_header[4] == 0x02) { @@ -244,12 +244,12 @@ static int get_header (int s, uint8_t *header, streaming_ctrl_t *streaming_ctrl) // mp_msg(MSGT_NETWORK,MSGL_INFO,"asf header packet detected, len=%d\n", packet_len); if (packet_len < 0 || packet_len > HDR_BUF_SIZE - header_len) { - mp_tmsg(MSGT_NETWORK, MSGL_FATAL, MSGTR_MPDEMUX_MMST_InvalidHeaderSize); + mp_tmsg(MSGT_NETWORK, MSGL_FATAL, "Invalid header size, giving up.\n"); return 0; } if (!get_data (s, &header[header_len], packet_len)) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_HeaderDataReadFailed); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Header data read failed.\n"); return 0; } @@ -275,7 +275,7 @@ static int get_header (int s, uint8_t *header, streaming_ctrl_t *streaming_ctrl) char data[BUF_SIZE]; if (!get_data (s, (char*)&packet_len, 4)) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_packet_lenReadFailed); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"packet_len read failed.\n"); return 0; } @@ -285,12 +285,12 @@ static int get_header (int s, uint8_t *header, streaming_ctrl_t *streaming_ctrl) if (packet_len < 0 || packet_len > BUF_SIZE) { mp_tmsg(MSGT_NETWORK, MSGL_FATAL, - MSGTR_MPDEMUX_MMST_InvalidRTSPPacketSize); + "Invalid RTSP packet size, giving up.\n"); return 0; } if (!get_data (s, data, packet_len)) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_CmdDataReadFailed); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Command data read failed.\n"); return 0; } @@ -343,14 +343,14 @@ static int interp_header (uint8_t *header, int header_len) i += 8; if ( (guid_1 == 0x6cce6200aa00d9a6ULL) && (guid_2 == 0x11cf668e75b22630ULL) ) { - mp_tmsg(MSGT_NETWORK,MSGL_INFO,MSGTR_MPDEMUX_MMST_HeaderObject); + mp_tmsg(MSGT_NETWORK,MSGL_INFO,"header object\n"); } else if ((guid_1 == 0x6cce6200aa00d9a6ULL) && (guid_2 == 0x11cf668e75b22636ULL)) { - mp_tmsg(MSGT_NETWORK,MSGL_INFO,MSGTR_MPDEMUX_MMST_DataObject); + mp_tmsg(MSGT_NETWORK,MSGL_INFO,"data object\n"); } else if ((guid_1 == 0x6553200cc000e48eULL) && (guid_2 == 0x11cfa9478cabdca1ULL)) { packet_length = get_32(header, i+92-24); - mp_tmsg(MSGT_NETWORK,MSGL_INFO,MSGTR_MPDEMUX_MMST_FileObjectPacketLen, + mp_tmsg(MSGT_NETWORK,MSGL_INFO,"file object, packet length = %d (%d)\n", packet_length, get_32(header, i+96-24)); @@ -358,13 +358,13 @@ static int interp_header (uint8_t *header, int header_len) int stream_id = header[i+48] | header[i+49] << 8; - mp_tmsg(MSGT_NETWORK,MSGL_INFO,MSGTR_MPDEMUX_MMST_StreamObjectStreamID, stream_id); + mp_tmsg(MSGT_NETWORK,MSGL_INFO,"stream object, stream ID: %d\n", stream_id); if (num_stream_ids < MAX_STREAMS) { stream_ids[num_stream_ids] = stream_id; num_stream_ids++; } else { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_2ManyStreamID); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Too many IDs, stream skipped."); } } else { @@ -380,7 +380,7 @@ static int interp_header (uint8_t *header, int header_len) } printf("\n"); #else - mp_tmsg(MSGT_NETWORK,MSGL_WARN,MSGTR_MPDEMUX_MMST_UnknownObject); + mp_tmsg(MSGT_NETWORK,MSGL_WARN,"unknown object\n"); #endif } @@ -400,7 +400,7 @@ static int get_media_packet (int s, int padding, streaming_ctrl_t *stream_ctrl) char data[BUF_SIZE]; if (!get_data (s, pre_header, 8)) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_PreHeaderReadFailed); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"pre-header read failed\n"); return 0; } @@ -417,12 +417,12 @@ static int get_media_packet (int s, int padding, streaming_ctrl_t *stream_ctrl) // mp_msg(MSGT_NETWORK,MSGL_INFO,"asf media packet detected, len=%d\n", packet_len); if (packet_len < 0 || packet_len > BUF_SIZE) { - mp_tmsg(MSGT_NETWORK, MSGL_FATAL, MSGTR_MPDEMUX_MMST_InvalidRTSPPacketSize); + mp_tmsg(MSGT_NETWORK, MSGL_FATAL, "Invalid RTSP packet size, giving up.\n"); return 0; } if (!get_data (s, data, packet_len)) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_MediaDataReadFailed); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Media data read failed.\n"); return 0; } @@ -434,26 +434,26 @@ static int get_media_packet (int s, int padding, streaming_ctrl_t *stream_ctrl) int command; if (!get_data (s, (char*)&packet_len, 4)) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_packet_lenReadFailed); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"packet_len read failed.\n"); return 0; } packet_len = get_32 ((unsigned char*)&packet_len, 0) + 4; if (packet_len < 0 || packet_len > BUF_SIZE) { - mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MPDEMUX_MMST_InvalidRTSPPacketSize); + mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Invalid RTSP packet size, giving up.\n"); return 0; } if (!get_data (s, data, packet_len)) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_CmdDataReadFailed); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Command data read failed.\n"); return 0; } if ( (pre_header[7] != 0xb0) || (pre_header[6] != 0x0b) || (pre_header[5] != 0xfa) || (pre_header[4] != 0xce) ) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_MissingSignature); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"missing signature\n"); return -1; } @@ -464,7 +464,7 @@ static int get_media_packet (int s, int padding, streaming_ctrl_t *stream_ctrl) if (command == 0x1b) send_command (s, 0x1b, 0, 0, 0, data); else if (command == 0x1e) { - mp_tmsg(MSGT_NETWORK,MSGL_INFO,MSGTR_MPDEMUX_MMST_PatentedTechnologyJoke); + mp_tmsg(MSGT_NETWORK,MSGL_INFO,"Everything done. Thank you for downloading a media file containing proprietary and patented technology.\n"); return 0; } else if (command == 0x21 ) { @@ -473,7 +473,7 @@ static int get_media_packet (int s, int padding, streaming_ctrl_t *stream_ctrl) return 0; } else if (command != 0x05) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_UnknownCmd,command); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"unknown command %02x\n",command); return -1; } } @@ -494,7 +494,7 @@ static int asf_mmst_streaming_read( int fd, char *buffer, int size, streaming_ct // buffer is empty - fill it! int ret = get_media_packet( fd, packet_length1, stream_ctrl); if( ret<0 ) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_GetMediaPacketErr,strerror(errno)); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"get_media_packet error : %s\n",strerror(errno)); return -1; } else if (ret==0) //EOF? return ret; @@ -547,7 +547,7 @@ int asf_mmst_streaming_start(stream_t *stream) */ unescpath=malloc(strlen(path)+1); if (!unescpath) { - mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed); + mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n"); return -1; } url_unescape_string(unescpath,path); @@ -562,7 +562,7 @@ int asf_mmst_streaming_start(stream_t *stream) free(path); return s; } - mp_tmsg(MSGT_NETWORK,MSGL_INFO,MSGTR_MPDEMUX_MMST_Connected); + mp_tmsg(MSGT_NETWORK,MSGL_INFO,"Connected\n"); seq_num=0; diff --git a/stream/asf_streaming.c b/stream/asf_streaming.c index 4d4303bdae..59f2450eb7 100644 --- a/stream/asf_streaming.c +++ b/stream/asf_streaming.c @@ -38,7 +38,7 @@ static int asf_read_wrapper(int fd, void *buffer, int len, streaming_ctrl_t *str while (len > 0) { int got = nop_streaming_read(fd, buf, len, stream_ctrl); if (got <= 0) { - mp_tmsg(MSGT_NETWORK, MSGL_ERR, MSGTR_MPDEMUX_ASF_ErrReadingNetworkStream); + mp_tmsg(MSGT_NETWORK, MSGL_ERR, "Error while reading network stream.\n"); return got; } buf += got; @@ -109,11 +109,11 @@ printf("0x%02X\n", stream_chunck->type ); if( drop_packet!=NULL ) *drop_packet = 0; if( stream_chunck->size<8 ) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_StreamChunkSize2Small, stream_chunck->size); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Ahhhh, stream_chunck size is too small: %d\n", stream_chunck->size); return -1; } if( stream_chunck->size!=stream_chunck->size_confirm ) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_SizeConfirmMismatch, stream_chunck->size, stream_chunck->size_confirm); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"size_confirm mismatch!: %d %d\n", stream_chunck->size, stream_chunck->size_confirm); return -1; } /* @@ -185,13 +185,13 @@ static int asf_streaming_parse_header(int fd, streaming_ctrl_t* streaming_ctrl) // Endian handling of the stream chunk le2me_ASF_stream_chunck_t(&chunk); size = asf_streaming( &chunk, &r) - sizeof(ASF_stream_chunck_t); - if(r) mp_tmsg(MSGT_NETWORK,MSGL_WARN,MSGTR_MPDEMUX_ASF_WarnDropHeader); + if(r) mp_tmsg(MSGT_NETWORK,MSGL_WARN,"Warning: drop header ????\n"); if(size < 0){ - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_ErrorParsingChunkHeader); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Error while parsing chunk header\n"); return -1; } if (chunk.type != ASF_STREAMING_HEADER) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_NoHeaderAtFirstChunk); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Didn't get a header as first chunk !!!!\n"); return -1; } @@ -199,7 +199,7 @@ static int asf_streaming_parse_header(int fd, streaming_ctrl_t* streaming_ctrl) if (size > SIZE_MAX - buffer_size) return -1; buffer = malloc(size+buffer_size); if(buffer == NULL) { - mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MPDEMUX_ASF_BufferMallocFailed,size+buffer_size); + mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Error: Can't allocate %d bytes buffer.\n",size+buffer_size); return -1; } if( chunk_buffer!=NULL ) { @@ -216,7 +216,7 @@ static int asf_streaming_parse_header(int fd, streaming_ctrl_t* streaming_ctrl) if( chunk_size2read==0 ) { ASF_header_t *asfh = (ASF_header_t *)buffer; if(size < (int)sizeof(ASF_header_t)) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_ErrChunk2Small); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Error: Chunk is too small.\n"); return -1; } else mp_msg(MSGT_NETWORK,MSGL_DBG2,"Got chunk\n"); chunk_size2read = AV_RL64(&asfh->objh.size); @@ -357,7 +357,7 @@ static int asf_streaming_parse_header(int fd, streaming_ctrl_t* streaming_ctrl) free(a_rates); if (a_idx < 0 && v_idx < 0) { - mp_tmsg(MSGT_NETWORK, MSGL_FATAL, MSGTR_MPDEMUX_ASF_Bandwidth2SmallCannotPlay); + mp_tmsg(MSGT_NETWORK, MSGL_FATAL, "Bandwidth too small, file cannot be played!\n"); return -1; } @@ -367,7 +367,7 @@ static int asf_streaming_parse_header(int fd, streaming_ctrl_t* streaming_ctrl) else if (a_idx >= 0) asf_ctrl->audio_id = asf_ctrl->audio_streams[a_idx]; else if (asf_ctrl->n_audio) { - mp_tmsg(MSGT_NETWORK, MSGL_WARN, MSGTR_MPDEMUX_ASF_Bandwidth2SmallDeselectedAudio); + mp_tmsg(MSGT_NETWORK, MSGL_WARN, "Bandwidth too small, deselected audio stream.\n"); *streaming_ctrl->audio_id_ptr = -2; } @@ -377,14 +377,14 @@ static int asf_streaming_parse_header(int fd, streaming_ctrl_t* streaming_ctrl) else if (v_idx >= 0) asf_ctrl->video_id = asf_ctrl->video_streams[v_idx]; else if (asf_ctrl->n_video) { - mp_tmsg(MSGT_NETWORK, MSGL_WARN, MSGTR_MPDEMUX_ASF_Bandwidth2SmallDeselectedVideo); + mp_tmsg(MSGT_NETWORK, MSGL_WARN, "Bandwidth too small, deselected video stream.\n"); *streaming_ctrl->video_id_ptr = -2; } return 1; len_err_out: - mp_tmsg(MSGT_NETWORK, MSGL_FATAL, MSGTR_MPDEMUX_ASF_InvalidLenInHeader); + mp_tmsg(MSGT_NETWORK, MSGL_FATAL, "Invalid length in ASF header!\n"); if (buffer) free(buffer); if (v_rates) free(v_rates); if (a_rates) free(a_rates); @@ -406,14 +406,14 @@ static int asf_http_streaming_read( int fd, char *buffer, int size, streaming_ct le2me_ASF_stream_chunck_t(&chunk); chunk_size = asf_streaming( &chunk, &drop_chunk ); if(chunk_size < 0) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_ErrorParsingChunkHeader); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Error while parsing chunk header\n"); return -1; } chunk_size -= sizeof(ASF_stream_chunck_t); if(chunk.type != ASF_STREAMING_HEADER && (!drop_chunk)) { if (asf_http_ctrl->packet_size < chunk_size) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_ErrChunkBiggerThanPacket); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Error: chunk_size > packet_size\n"); return -1; } waiting = asf_http_ctrl->packet_size; @@ -505,7 +505,7 @@ static int asf_http_streaming_type(char *content_type, char *features, HTTP_head (!strcasecmp(content_type, "video/x-ms-afs")) || (!strcasecmp(content_type, "video/x-ms-wmv")) || (!strcasecmp(content_type, "video/x-ms-wma")) ) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_ASFRedirector); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"=====> ASF Redirector\n"); return ASF_Redirector_e; } else if( !strcasecmp(content_type, "text/plain") ) { mp_msg(MSGT_NETWORK,MSGL_V,"=====> ASF Plain text\n"); @@ -547,7 +547,7 @@ static HTTP_header_t *asf_http_request(streaming_ctrl_t *streaming_ctrl) { if( !strcasecmp( url->protocol, "http_proxy" ) ) { server_url = url_new( (url->file)+1 ); if( server_url==NULL ) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_InvalidProxyURL); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"invalid proxy URL\n"); http_free( http_hdr ); return NULL; } @@ -608,7 +608,7 @@ static HTTP_header_t *asf_http_request(streaming_ctrl_t *streaming_ctrl) { // First request goes here. break; default: - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_UnknownASFStreamType); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"unknown ASF stream type\n"); } http_set_field( http_hdr, "Connection: Close" ); @@ -622,7 +622,7 @@ static int asf_http_parse_response(asf_http_streaming_ctrl_t *asf_http_ctrl, HTT char features[64] = "\0"; size_t len; if( http_response_parse(http_hdr)<0 ) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_Failed2ParseHTTPResponse); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Failed to parse HTTP response.\n"); return -1; } switch( http_hdr->status_code ) { @@ -631,7 +631,7 @@ static int asf_http_parse_response(asf_http_streaming_ctrl_t *asf_http_ctrl, HTT case 401: // Authentication required return ASF_Authenticate_e; default: - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_ServerReturn, http_hdr->status_code, http_hdr->reason_phrase); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Server returned %d:%s\n", http_hdr->status_code, http_hdr->reason_phrase); return -1; } @@ -655,7 +655,7 @@ static int asf_http_parse_response(asf_http_streaming_ctrl_t *asf_http_ctrl, HTT len = (unsigned int)(end-pragma); } if(len > sizeof(features) - 1) { - mp_tmsg(MSGT_NETWORK,MSGL_WARN,MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma,pragma,len,sizeof(features) - 1); + mp_tmsg(MSGT_NETWORK,MSGL_WARN,"ASF HTTP PARSE WARNING : Pragma %s cut from %d bytes to %d\n",pragma,len,sizeof(features) - 1); len = sizeof(features) - 1; } strncpy( features, pragma, len ); @@ -686,7 +686,7 @@ static int asf_http_streaming_start( stream_t *stream, int *demuxer_type ) { asf_http_ctrl = malloc(sizeof(asf_http_streaming_ctrl_t)); if( asf_http_ctrl==NULL ) { - mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed); + mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n"); return -1; } asf_http_ctrl->streaming_type = ASF_Unknown_e; @@ -712,7 +712,7 @@ static int asf_http_streaming_start( stream_t *stream, int *demuxer_type ) { for(i=0; i < (int)http_hdr->buffer_size ; ) { int r = send( fd, http_hdr->buffer+i, http_hdr->buffer_size-i, 0 ); if(r <0) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_SocketWriteError,strerror(errno)); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"socket write error: %s\n",strerror(errno)); goto err_out; } i += r; @@ -734,7 +734,7 @@ static int asf_http_streaming_start( stream_t *stream, int *demuxer_type ) { } ret = asf_http_parse_response(asf_http_ctrl, http_hdr); if( ret<0 ) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_HeaderParseFailed); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Failed to parse header.\n"); goto err_out; } switch( asf_http_ctrl->streaming_type ) { @@ -752,7 +752,7 @@ static int asf_http_streaming_start( stream_t *stream, int *demuxer_type ) { ret = asf_streaming_parse_header(fd,stream->streaming_ctrl); if(ret < 0) goto err_out; if(asf_http_ctrl->n_audio == 0 && asf_http_ctrl->n_video == 0) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_NoStreamFound); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"No stream found.\n"); goto err_out; } asf_http_ctrl->request++; @@ -778,7 +778,7 @@ static int asf_http_streaming_start( stream_t *stream, int *demuxer_type ) { break; case ASF_Unknown_e: default: - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_ASF_UnknownASFStreamingType); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"unknown ASF streaming type\n"); goto err_out; } // Check if we got a redirect. @@ -821,7 +821,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { stream->streaming_ctrl->url = check4proxies(url); url_free(url); - mp_tmsg(MSGT_OPEN, MSGL_INFO, MSGTR_MPDEMUX_ASF_InfoStreamASFURL, stream->url); + mp_tmsg(MSGT_OPEN, MSGL_INFO, "STREAM_ASF, URL: %s\n", stream->url); if((!strncmp(stream->url, "http", 4)) && (*file_format!=DEMUXER_TYPE_ASF && *file_format!=DEMUXER_TYPE_UNKNOWN)) { streaming_ctrl_free(stream->streaming_ctrl); stream->streaming_ctrl = NULL; @@ -829,7 +829,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { } if(asf_streaming_start(stream, file_format) < 0) { - mp_tmsg(MSGT_OPEN, MSGL_ERR, MSGTR_MPDEMUX_ASF_StreamingFailed); + mp_tmsg(MSGT_OPEN, MSGL_ERR, "Failed, exiting.\n"); streaming_ctrl_free(stream->streaming_ctrl); stream->streaming_ctrl = NULL; return STREAM_UNSUPPORTED; diff --git a/stream/audio_in.c b/stream/audio_in.c index 40169535b4..c092e7f500 100644 --- a/stream/audio_in.c +++ b/stream/audio_in.c @@ -185,16 +185,16 @@ int audio_in_read_chunk(audio_in_t *ai, unsigned char *buffer) ret = snd_pcm_readi(ai->alsa.handle, buffer, ai->alsa.chunk_size); if (ret != ai->alsa.chunk_size) { if (ret < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_ErrReadingAudio, snd_strerror(ret)); + mp_tmsg(MSGT_TV, MSGL_ERR, "\nError reading audio: %s\n", snd_strerror(ret)); if (ret == -EPIPE) { if (ai_alsa_xrun(ai) == 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_XRUNSomeFramesMayBeLeftOut); + mp_tmsg(MSGT_TV, MSGL_ERR, "Recovered from cross-run, some frames may be left out!\n"); } else { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_ErrFatalCannotRecover); + mp_tmsg(MSGT_TV, MSGL_ERR, "Fatal error, cannot recover!\n"); } } } else { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_NotEnoughSamples); + mp_tmsg(MSGT_TV, MSGL_ERR, "\nNot enough audio samples!\n"); } return -1; } @@ -205,9 +205,9 @@ int audio_in_read_chunk(audio_in_t *ai, unsigned char *buffer) ret = read(ai->oss.audio_fd, buffer, ai->blocksize); if (ret != ai->blocksize) { if (ret < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_ErrReadingAudio, strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "\nError reading audio: %s\n", strerror(errno)); } else { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_NotEnoughSamples); + mp_tmsg(MSGT_TV, MSGL_ERR, "\nNot enough audio samples!\n"); } return -1; } diff --git a/stream/cache2.c b/stream/cache2.c index 92f77ad312..d1f047b034 100644 --- a/stream/cache2.c +++ b/stream/cache2.c @@ -353,7 +353,7 @@ int stream_enable_cache(stream_t *stream,int size,int min,int seek_limit){ mp_msg(MSGT_CACHE,MSGL_V,"CACHE_PRE_INIT: %"PRId64" [%"PRId64"] %"PRId64" pre:%d eof:%d \n", (int64_t)s->min_filepos,(int64_t)s->read_filepos,(int64_t)s->max_filepos,min,s->eof); while(s->read_filepos<s->min_filepos || s->max_filepos-s->read_filepos<min){ - mp_tmsg(MSGT_CACHE,MSGL_STATUS,MSGTR_CacheFill, + mp_tmsg(MSGT_CACHE,MSGL_STATUS,"\rCache fill: %5.2f%% (%"PRId64" bytes) ", 100.0*(float)(s->max_filepos-s->read_filepos)/(float)(s->buffer_size), (int64_t)s->max_filepos-s->read_filepos ); diff --git a/stream/cdinfo.c b/stream/cdinfo.c index 88aedac05b..48e970c72b 100644 --- a/stream/cdinfo.c +++ b/stream/cdinfo.c @@ -25,7 +25,7 @@ cd_info_new(void) { cd_info = malloc(sizeof(cd_info_t)); if( cd_info==NULL ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MemAllocFailed); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n"); return NULL; } @@ -59,14 +59,14 @@ cd_info_add_track(cd_info_t *cd_info, char *track_name, unsigned int track_nb, u cd_track = malloc(sizeof(cd_track_t)); if( cd_track==NULL ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MemAllocFailed); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n"); return NULL; } memset(cd_track, 0, sizeof(cd_track_t)); cd_track->name = malloc(strlen(track_name)+1); if( cd_track->name==NULL ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MemAllocFailed); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n"); free(cd_track); return NULL; } diff --git a/stream/network.c b/stream/network.c index c5b31a1b12..682bbf53d4 100644 --- a/stream/network.c +++ b/stream/network.c @@ -98,7 +98,7 @@ streaming_ctrl_new(void) { streaming_ctrl_t *streaming_ctrl; streaming_ctrl = malloc(sizeof(streaming_ctrl_t)); if( streaming_ctrl==NULL ) { - mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed); + mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n"); return NULL; } memset( streaming_ctrl, 0, sizeof(streaming_ctrl_t) ); @@ -136,14 +136,14 @@ check4proxies( URL_t *url ) { if( proxy_url==NULL ) { mp_tmsg(MSGT_NETWORK,MSGL_WARN, - MSGTR_MPDEMUX_NW_InvalidProxySettingTryingWithout); + "Invalid proxy setting... Trying without proxy.\n"); return url_out; } #ifdef HAVE_AF_INET6 if (network_ipv4_only_proxy && (gethostbyname(url->hostname)==NULL)) { mp_tmsg(MSGT_NETWORK,MSGL_WARN, - MSGTR_MPDEMUX_NW_CantResolvTryingWithoutProxy); + "Could not resolve remote hostname for AF_INET. Trying without proxy.\n"); url_free(proxy_url); return url_out; } @@ -153,7 +153,7 @@ check4proxies( URL_t *url ) { len = strlen( proxy_url->hostname ) + strlen( url->url ) + 20; // 20 = http_proxy:// + port new_url = malloc( len+1 ); if( new_url==NULL ) { - mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed); + mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n"); url_free(proxy_url); return url_out; } @@ -238,7 +238,7 @@ http_send_request( URL_t *url, off_t pos ) { ret = send( fd, http_hdr->buffer, http_hdr->buffer_size, 0 ); if( ret!=(int)http_hdr->buffer_size ) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_ErrSendingHTTPRequest); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Error while sending HTTP request: Didn't send all the request.\n"); goto err_out; } @@ -267,12 +267,12 @@ http_read_response( int fd ) { do { i = recv( fd, response, BUFFER_SIZE, 0 ); if( i<0 ) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_ReadFailed); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Read failed.\n"); http_free( http_hdr ); return NULL; } if( i==0 ) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_Read0CouldBeEOF); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"http_read_response read 0 (i.e. EOF).\n"); http_free( http_hdr ); return NULL; } @@ -286,8 +286,14 @@ int http_authenticate(HTTP_header_t *http_hdr, URL_t *url, int *auth_retry) { char *aut; +#define MPDEMUX_NW_AuthFailed _(\ +"Authentication failed. Please use the -user and -passwd options to provide your\n"\ +"username/password for a list of URLs, or form an URL like:\n"\ +"http://username:password@hostname/file\n") + + if( *auth_retry==1 ) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_AuthFailed); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,MPDEMUX_NW_AuthFailed); return -1; } if( *auth_retry>0 ) { @@ -306,28 +312,28 @@ http_authenticate(HTTP_header_t *http_hdr, URL_t *url, int *auth_retry) { char *aut_space; aut_space = strstr(aut, "realm="); if( aut_space!=NULL ) aut_space += 6; - mp_tmsg(MSGT_NETWORK,MSGL_INFO,MSGTR_MPDEMUX_NW_AuthRequiredFor, aut_space); + mp_tmsg(MSGT_NETWORK,MSGL_INFO,"Authentication required for %s\n", aut_space); } else { - mp_tmsg(MSGT_NETWORK,MSGL_INFO,MSGTR_MPDEMUX_NW_AuthRequired); + mp_tmsg(MSGT_NETWORK,MSGL_INFO,"Authentication required.\n"); } if( network_username ) { url->username = strdup(network_username); if( url->username==NULL ) { - mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed); + mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n"); return -1; } } else { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_AuthFailed); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,MPDEMUX_NW_AuthFailed); return -1; } if( network_password ) { url->password = strdup(network_password); if( url->password==NULL ) { - mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed); + mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n"); return -1; } } else { - mp_tmsg(MSGT_NETWORK,MSGL_INFO,MSGTR_MPDEMUX_NW_NoPasswdProvidedTryingBlank); + mp_tmsg(MSGT_NETWORK,MSGL_INFO,"No password provided, trying blank password.\n"); } (*auth_retry)++; return 0; @@ -360,7 +366,7 @@ http_seek( stream_t *stream, off_t pos ) { } break; default: - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_ErrServerReturned, http_hdr->status_code, http_hdr->reason_phrase ); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Server returns %d: %s\n", http_hdr->status_code, http_hdr->reason_phrase ); close( fd ); fd = -1; } @@ -382,7 +388,7 @@ streaming_bufferize( streaming_ctrl_t *streaming_ctrl, char *buffer, int size) { //printf("streaming_bufferize\n"); streaming_ctrl->buffer = malloc(size); if( streaming_ctrl->buffer==NULL ) { - mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed); + mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n"); return -1; } memcpy( streaming_ctrl->buffer, buffer, size ); @@ -442,7 +448,7 @@ void fixup_network_stream_cache(stream_t *stream) { stream_cache_size = (stream->streaming_ctrl->prebuffer_size/1024)*5; if( stream_cache_size<64 ) stream_cache_size = 64; // 16KBytes min buffer } - mp_tmsg(MSGT_NETWORK,MSGL_INFO,MSGTR_MPDEMUX_NW_CacheSizeSetTo, stream_cache_size); + mp_tmsg(MSGT_NETWORK,MSGL_INFO,"Cache size set to %d KBytes\n", stream_cache_size); } } diff --git a/stream/stream.c b/stream/stream.c index 5e47c27a14..7d74a02987 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -213,7 +213,7 @@ stream_t *open_stream_full(char *filename,int mode, struct MPOpts *options, return s; } else if(r != STREAM_UNSUPPORTED) { - mp_tmsg(MSGT_OPEN,MSGL_ERR, MSGTR_FailedToOpen,filename); + mp_tmsg(MSGT_OPEN,MSGL_ERR, "Failed to open %s.\n",filename); return NULL; } break; diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c index ba6c5c68d4..bbd307ffcd 100644 --- a/stream/stream_cdda.c +++ b/stream/stream_cdda.c @@ -195,7 +195,7 @@ static int open_cdda(stream_t *st,int m, void* opts, int* file_format) { #endif if(!cdd) { - mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_MPDEMUX_CDDA_CantOpenCDDADevice); + mp_tmsg(MSGT_OPEN,MSGL_ERR,"Can't open CDDA device.\n"); m_struct_free(&stream_opts,opts); free(cddb_info); return STREAM_ERROR; @@ -211,7 +211,7 @@ static int open_cdda(stream_t *st,int m, void* opts, int* file_format) { } if(cdda_open(cdd) != 0) { - mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_MPDEMUX_CDDA_CantOpenDisc); + mp_tmsg(MSGT_OPEN,MSGL_ERR,"Can't open disc.\n"); cdda_close(cdd); m_struct_free(&stream_opts,opts); free(cddb_info); @@ -219,7 +219,7 @@ static int open_cdda(stream_t *st,int m, void* opts, int* file_format) { } cd_info = cd_info_new(); - mp_tmsg(MSGT_OPEN,MSGL_INFO,MSGTR_MPDEMUX_CDDA_AudioCDFoundWithNTracks,cdda_tracks(cdd)); + mp_tmsg(MSGT_OPEN,MSGL_INFO,"Found audio CD with %ld tracks.\n",cdda_tracks(cdd)); for(i=0;i<cdd->tracks;i++) { char track_name[80]; long sec=cdda_track_firstsector(cdd,i+1); diff --git a/stream/stream_cddb.c b/stream/stream_cddb.c index a8dd3a1a12..0c8ef85a8b 100644 --- a/stream/stream_cddb.c +++ b/stream/stream_cddb.c @@ -82,7 +82,7 @@ read_toc(const char *dev) { drive = CreateFile(device, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); if(!DeviceIoControl(drive, IOCTL_CDROM_READ_TOC, NULL, 0, &toc, sizeof(CDROM_TOC), &r, 0)) { - mp_tmsg(MSGT_OPEN, MSGL_ERR, MSGTR_MPDEMUX_CDDB_FailedToReadTOC); + mp_tmsg(MSGT_OPEN, MSGL_ERR, "Failed to read TOC.\n"); return 0; } @@ -219,7 +219,7 @@ int cdd_identify(const char *dev) int i, min, sec, frame; cdtoc_last_track = read_toc(dev); if (cdtoc_last_track < 0) { - mp_tmsg(MSGT_OPEN, MSGL_ERR, MSGTR_MPDEMUX_CDDB_FailedToOpenDevice, dev); + mp_tmsg(MSGT_OPEN, MSGL_ERR, "Failed to open %s device.\n", dev); return -1; } mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_CDDA_TRACKS=%d\n", cdtoc_last_track); @@ -278,19 +278,19 @@ cddb_http_request(char *command, int (*reply_parser)(HTTP_header_t*,cddb_data_t* url = url_new(request); if( url==NULL ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_NotAValidURL); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "not a valid URL\n"); return -1; } fd = http_send_request(url,0); if( fd<0 ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_FailedToSendHTTPRequest); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Failed to send the HTTP request.\n"); return -1; } http_hdr = http_read_response( fd ); if( http_hdr==NULL ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_FailedToReadHTTPResponse); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Failed to read the HTTP response.\n"); return -1; } @@ -302,10 +302,10 @@ cddb_http_request(char *command, int (*reply_parser)(HTTP_header_t*,cddb_data_t* ret = reply_parser(http_hdr, cddb_data); break; case 400: - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_HTTPErrorNOTFOUND); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Not Found.\n"); break; default: - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_HTTPErrorUnknown); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "unknown error code\n"); } http_free( http_hdr ); @@ -331,7 +331,7 @@ cddb_read_cache(cddb_data_t *cddb_data) { #endif ); if( file_fd<0 ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_NoCacheFound); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "No cache found.\n"); return -1; } @@ -345,13 +345,13 @@ cddb_read_cache(cddb_data_t *cddb_data) { cddb_data->xmcd_file = malloc(file_size+1); if( cddb_data->xmcd_file==NULL ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MemAllocFailed); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n"); close(file_fd); return -1; } cddb_data->xmcd_file_size = read(file_fd, cddb_data->xmcd_file, file_size); if( cddb_data->xmcd_file_size!=file_size ) { - mp_tmsg(MSGT_DEMUX, MSGL_WARN, MSGTR_MPDEMUX_CDDB_NotAllXMCDFileHasBeenRead); + mp_tmsg(MSGT_DEMUX, MSGL_WARN, "Not all the xmcd file has been read.\n"); close(file_fd); return -1; } @@ -383,7 +383,7 @@ cddb_write_cache(cddb_data_t *cddb_data) { if( ret<0 ) { #endif perror("mkdir"); - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_FailedToCreateDirectory, cddb_data->cache_dir); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Failed to create directory %s.\n", cddb_data->cache_dir); return -1; } } @@ -403,7 +403,7 @@ cddb_write_cache(cddb_data_t *cddb_data) { return -1; } if( (unsigned int)wrote!=cddb_data->xmcd_file_size ) { - mp_tmsg(MSGT_DEMUX, MSGL_WARN, MSGTR_MPDEMUX_CDDB_NotAllXMCDFileHasBeenWritten); + mp_tmsg(MSGT_DEMUX, MSGL_WARN, "Not all of the xmcd file has been written.\n"); close(file_fd); return -1; } @@ -424,7 +424,7 @@ cddb_read_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) { ret = sscanf( http_hdr->body, "%d ", &status); if( ret!=1 ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_ParseError); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "parse error"); return -1; } @@ -432,13 +432,13 @@ cddb_read_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) { case 210: ret = sscanf( http_hdr->body, "%d %99s %08lx", &status, category, &disc_id); if( ret!=3 ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_ParseError); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "parse error"); return -1; } // Check if it's a xmcd database file ptr = strstr(http_hdr->body, "# xmcd"); if( ptr==NULL ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_InvalidXMCDDatabaseReturned); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Invalid xmcd database file returned.\n"); return -1; } ptr = strdup(ptr); @@ -455,7 +455,7 @@ cddb_read_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) { // Ok found the end // do a sanity check if( http_hdr->body_size<(unsigned int)(ptr2-ptr) ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_UnexpectedFIXME); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "unexpected FIXME\n"); return -1; } cddb_data->xmcd_file = ptr; @@ -463,7 +463,7 @@ cddb_read_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) { cddb_data->xmcd_file[cddb_data->xmcd_file_size] = '\0'; return cddb_write_cache(cddb_data); default: - mp_tmsg(MSGT_DEMUX, MSGL_FIXME, MSGTR_MPDEMUX_CDDB_UnhandledCode); + mp_tmsg(MSGT_DEMUX, MSGL_FIXME, "unhandled code\n"); } return 0; } @@ -483,7 +483,7 @@ cddb_parse_matches_list(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) { ptr = strstr(http_hdr->body, "\n"); if( ptr==NULL ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_UnableToFindEOL); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Unable to find end of line.\n"); return -1; } ptr++; @@ -491,7 +491,7 @@ cddb_parse_matches_list(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) { // So let's take the first one. ret = sscanf(ptr, "%99s %08lx %99s", cddb_data->category, &(cddb_data->disc_id), album_title); if( ret!=3 ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_ParseError); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "parse error"); return -1; } ptr = strstr(http_hdr->body, album_title); @@ -508,7 +508,7 @@ cddb_parse_matches_list(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) { strncpy(album_title, ptr, len); album_title[len]='\0'; } - mp_tmsg(MSGT_DEMUX, MSGL_STATUS, MSGTR_MPDEMUX_CDDB_ParseOKFoundAlbumTitle, album_title); + mp_tmsg(MSGT_DEMUX, MSGL_STATUS, "Parse OK, found: %s\n", album_title); return 0; } @@ -520,7 +520,7 @@ cddb_query_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) { ret = sscanf( http_hdr->body, "%d ", &status); if( ret!=1 ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_ParseError); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "parse error"); return -1; } @@ -529,7 +529,7 @@ cddb_query_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) { // Found exact match ret = sscanf(http_hdr->body, "%d %99s %08lx %99s", &status, cddb_data->category, &(cddb_data->disc_id), album_title); if( ret!=4 ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_ParseError); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "parse error"); return -1; } ptr = strstr(http_hdr->body, album_title); @@ -546,11 +546,11 @@ cddb_query_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) { strncpy(album_title, ptr, len); album_title[len]='\0'; } - mp_tmsg(MSGT_DEMUX, MSGL_STATUS, MSGTR_MPDEMUX_CDDB_ParseOKFoundAlbumTitle, album_title); + mp_tmsg(MSGT_DEMUX, MSGL_STATUS, "Parse OK, found: %s\n", album_title); return cddb_request_titles(cddb_data); case 202: // No match found - mp_tmsg(MSGT_DEMUX, MSGL_WARN, MSGTR_MPDEMUX_CDDB_AlbumNotFound); + mp_tmsg(MSGT_DEMUX, MSGL_WARN, "Album not found.\n"); break; case 210: // Found exact matches, list follows @@ -568,10 +568,10 @@ blues c711930d Santana / Supernatural cddb_parse_matches_list(http_hdr, cddb_data); return cddb_request_titles(cddb_data); case 500: - mp_tmsg(MSGT_DEMUX, MSGL_FIXME, MSGTR_MPDEMUX_CDDB_ServerReturnsCommandSyntaxErr); + mp_tmsg(MSGT_DEMUX, MSGL_FIXME, "Server returns: Command syntax error\n"); break; default: - mp_tmsg(MSGT_DEMUX, MSGL_FIXME, MSGTR_MPDEMUX_CDDB_UnhandledCode); + mp_tmsg(MSGT_DEMUX, MSGL_FIXME, "unhandled code\n"); } return -1; } @@ -584,7 +584,7 @@ cddb_proto_level_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) { ret = sscanf( http_hdr->body, "%d ", &status); if( ret!=1 ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_ParseError); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "parse error"); return -1; } @@ -592,18 +592,18 @@ cddb_proto_level_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) { case 210: ptr = strstr(http_hdr->body, "max proto:"); if( ptr==NULL ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_ParseError); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "parse error"); return -1; } ret = sscanf(ptr, "max proto: %d", &max); if( ret!=1 ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_ParseError); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "parse error"); return -1; } cddb_data->freedb_proto_level = max; return 0; default: - mp_tmsg(MSGT_DEMUX, MSGL_FIXME, MSGTR_MPDEMUX_CDDB_UnhandledCode); + mp_tmsg(MSGT_DEMUX, MSGL_FIXME, "unhandled code\n"); } return -1; } @@ -619,7 +619,7 @@ cddb_freedb_sites_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) { ret = sscanf( http_hdr->body, "%d ", &status); if( ret!=1 ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_ParseError); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "parse error"); return -1; } @@ -629,10 +629,10 @@ cddb_freedb_sites_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) { ret = cddb_data->anonymous; // For gcc complaining about unused parameter. return 0; case 401: - mp_tmsg(MSGT_DEMUX, MSGL_FIXME, MSGTR_MPDEMUX_CDDB_NoSitesInfoAvailable); + mp_tmsg(MSGT_DEMUX, MSGL_FIXME, "No sites information available.\n"); break; default: - mp_tmsg(MSGT_DEMUX, MSGL_FIXME, MSGTR_MPDEMUX_CDDB_UnhandledCode); + mp_tmsg(MSGT_DEMUX, MSGL_FIXME, "unhandled code\n"); } return -1; } @@ -685,7 +685,7 @@ cddb_retrieve(cddb_data_t *cddb_data) { cddb_create_hello(cddb_data); if( cddb_get_proto_level(cddb_data)<0 ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_FailedToGetProtocolLevel); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Failed to get the protocol level.\n"); return -1; } @@ -711,7 +711,7 @@ cddb_resolve(const char *dev, char **xmcd_file) { { cdtoc_last_track = read_toc(dev); if (cdtoc_last_track < 0) { - mp_tmsg(MSGT_OPEN, MSGL_ERR, MSGTR_MPDEMUX_CDDB_FailedToOpenDevice, dev); + mp_tmsg(MSGT_OPEN, MSGL_ERR, "Failed to open %s device.\n", dev); return -1; } } @@ -724,7 +724,7 @@ cddb_resolve(const char *dev, char **xmcd_file) { // Check if there is a CD in the drive // FIXME: That's not really a good way to check if( cddb_data.disc_id==0 ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_NoCDInDrive); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "No CD in the drive.\n"); return -1; } @@ -740,7 +740,7 @@ cddb_resolve(const char *dev, char **xmcd_file) { } else { cddb_data.cache_dir = malloc(strlen(home_dir)+strlen(cddb_cache_dir)+1); if( cddb_data.cache_dir==NULL ) { - mp_tmsg(MSGT_DEMUX, MSGL_ERR, MSGTR_MemAllocFailed); + mp_tmsg(MSGT_DEMUX, MSGL_ERR, "Memory allocation failed.\n"); return -1; } sprintf(cddb_data.cache_dir, "%s%s", home_dir, cddb_cache_dir ); diff --git a/stream/stream_cue.c b/stream/stream_cue.c index 6b43c00e0f..77afa387db 100644 --- a/stream/stream_cue.c +++ b/stream/stream_cue.c @@ -148,7 +148,7 @@ static int cue_getTrackinfo(char *Line, tTrack *track) else if (strncmp(&Line[4], "PREGAP ", 7)==0) { ; /* ignore */ } else if (strncmp(&Line[4], "FLAGS ", 6)==0) { ; /* ignore */ } else mp_tmsg (MSGT_OPEN,MSGL_INFO, - MSGTR_MPDEMUX_CUEREAD_UnexpectedCuefileLine, Line); + "[bincue] Unexpected cuefile line: %s\n", Line); } return 0; } @@ -199,7 +199,7 @@ static int cue_find_bin (char *firstline) { fd_bin = open (bin_filename, O_RDONLY); if (fd_bin == -1) { - mp_tmsg(MSGT_OPEN,MSGL_STATUS, MSGTR_MPDEMUX_CUEREAD_BinFilenameTested, + mp_tmsg(MSGT_OPEN,MSGL_STATUS, "[bincue] bin filename tested: %s\n", bin_filename); /* now try to find it with the path of the cue file */ @@ -208,7 +208,7 @@ static int cue_find_bin (char *firstline) { if (fd_bin == -1) { mp_tmsg(MSGT_OPEN,MSGL_STATUS, - MSGTR_MPDEMUX_CUEREAD_BinFilenameTested, s); + "[bincue] bin filename tested: %s\n", s); /* now I would say the whole filename is shit, build our own */ strncpy(s, cue_filename, strlen(cue_filename) - 3 ); s[strlen(cue_filename) - 3] = '\0'; @@ -217,7 +217,7 @@ static int cue_find_bin (char *firstline) { if (fd_bin == -1) { mp_tmsg(MSGT_OPEN,MSGL_STATUS, - MSGTR_MPDEMUX_CUEREAD_BinFilenameTested, s); + "[bincue] bin filename tested: %s\n", s); /* ok try it with path */ snprintf(t, sizeof( t ), "%s/%s", bincue_path, s); @@ -225,7 +225,7 @@ static int cue_find_bin (char *firstline) { if (fd_bin == -1) { mp_tmsg(MSGT_OPEN,MSGL_STATUS, - MSGTR_MPDEMUX_CUEREAD_BinFilenameTested,t); + "[bincue] bin filename tested: %s\n",t); /* now I would say the whole filename is shit, build our own */ strncpy(s, cue_filename, strlen(cue_filename) - 3 ); s[strlen(cue_filename) - 3] = '\0'; @@ -234,18 +234,18 @@ static int cue_find_bin (char *firstline) { if (fd_bin == -1) { mp_tmsg(MSGT_OPEN,MSGL_STATUS, - MSGTR_MPDEMUX_CUEREAD_BinFilenameTested, s); + "[bincue] bin filename tested: %s\n", s); /* ok try it with path */ snprintf(t, sizeof( t ), "%s/%s", bincue_path, s); fd_bin = open (t, O_RDONLY); if (fd_bin == -1) { mp_tmsg(MSGT_OPEN,MSGL_STATUS, - MSGTR_MPDEMUX_CUEREAD_BinFilenameTested, s); + "[bincue] bin filename tested: %s\n", s); /* I'll give up */ mp_tmsg(MSGT_OPEN,MSGL_ERR, - MSGTR_MPDEMUX_CUEREAD_CannotFindBinFile); + "[bincue] Couldn't find the bin file - giving up.\n"); return -1; } } @@ -258,7 +258,7 @@ static int cue_find_bin (char *firstline) { } mp_tmsg(MSGT_OPEN,MSGL_INFO, - MSGTR_MPDEMUX_CUEREAD_UsingBinFile, bin_filename); + "[bincue] Using bin file %s.\n", bin_filename); return 0; } @@ -292,7 +292,7 @@ static inline int cue_mode_2_sector_size(int mode) default: mp_tmsg(MSGT_OPEN,MSGL_FATAL, - MSGTR_MPDEMUX_CUEREAD_UnknownModeForBinfile); + "[bincue] unknown mode for binfile. Should not happen. Aborting.\n"); abort(); } @@ -343,7 +343,7 @@ static int cue_read_cue (char *in_cue_filename) if (fd_cue == NULL) { mp_tmsg(MSGT_OPEN,MSGL_ERR, - MSGTR_MPDEMUX_CUEREAD_CannotOpenCueFile, in_cue_filename); + "[bincue] Cannot open %s.\n", in_cue_filename); return -1; } @@ -353,7 +353,7 @@ static int cue_read_cue (char *in_cue_filename) if(! fgets( sLine, 256, fd_cue ) ) { mp_tmsg(MSGT_OPEN,MSGL_ERR, - MSGTR_MPDEMUX_CUEREAD_ErrReadingFromCueFile, in_cue_filename); + "[bincue] Error reading from %s\n", in_cue_filename); fclose (fd_cue); return -1; } @@ -369,7 +369,7 @@ static int cue_read_cue (char *in_cue_filename) if(! fgets( sLine, 256, fd_cue ) ) { mp_tmsg(MSGT_OPEN,MSGL_ERR, - MSGTR_MPDEMUX_CUEREAD_ErrReadingFromCueFile, in_cue_filename); + "[bincue] Error reading from %s\n", in_cue_filename); fclose (fd_cue); return -1; } @@ -379,7 +379,7 @@ static int cue_read_cue (char *in_cue_filename) if (cue_getTrackinfo(sLine, &tracks[nTracks++]) != 0) { mp_tmsg(MSGT_OPEN,MSGL_ERR, - MSGTR_MPDEMUX_CUEREAD_ErrReadingFromCueFile, in_cue_filename); + "[bincue] Error reading from %s\n", in_cue_filename); fclose (fd_cue); return -1; } @@ -388,7 +388,7 @@ static int cue_read_cue (char *in_cue_filename) /* make a fake track with stands for the Lead out */ if (fstat (fd_bin, &filestat) == -1) { mp_tmsg(MSGT_OPEN,MSGL_ERR, - MSGTR_MPDEMUX_CUEREAD_ErrGettingBinFileSize); + "[bincue] Error getting size of bin file.\n"); fclose (fd_cue); return -1; } @@ -483,7 +483,7 @@ static void cue_vcd_read_toc(void){ for (i = 0; i < nTracks; ++i) { mp_tmsg(MSGT_OPEN,MSGL_INFO, - MSGTR_MPDEMUX_CUEREAD_InfoTrackFormat, + "track %02d: format=%d %02d:%02d:%02d\n", i+1, tracks[i].mode, tracks[i].minute, @@ -509,12 +509,12 @@ static int cue_vcd_read(stream_t *stream, char *mem, int size) { return 0; if(lseek(fd_bin, position+VCD_SECTOR_OFFS, SEEK_SET) == -1) { - mp_tmsg(MSGT_OPEN,MSGL_ERR, MSGTR_MPDEMUX_CUEREAD_UnexpectedBinFileEOF); + mp_tmsg(MSGT_OPEN,MSGL_ERR, "[bincue] unexpected end of bin file\n"); return 0; } if(read(fd_bin, mem, VCD_SECTOR_DATA) != VCD_SECTOR_DATA) { - mp_tmsg(MSGT_OPEN,MSGL_ERR, MSGTR_MPDEMUX_CUEREAD_CannotReadNBytesOfPayload, VCD_SECTOR_DATA); + mp_tmsg(MSGT_OPEN,MSGL_ERR, "[bincue] Couldn't read %d bytes of payload.\n", VCD_SECTOR_DATA); return 0; } @@ -570,10 +570,10 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { ret2=cue_vcd_get_track_end(track); ret=cue_vcd_seek_to_track(track); if(ret<0){ - mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_ErrTrackSelect " (seek)\n"); + mp_tmsg(MSGT_OPEN,MSGL_ERR,"Error selecting VCD track." " (seek)\n"); return STREAM_UNSUPPORTED; } - mp_tmsg(MSGT_OPEN,MSGL_INFO,MSGTR_MPDEMUX_CUEREAD_CueStreamInfo_FilenameTrackTracksavail, filename, track, ret, ret2); + mp_tmsg(MSGT_OPEN,MSGL_INFO,"CUE stream_open, filename=%s, track=%d, available tracks: %d -> %d\n", filename, track, ret, ret2); stream->fd = f; stream->type = STREAMTYPE_VCDBINCUE; diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c index 2c4dc9c82b..238ccf0e67 100644 --- a/stream/stream_dvd.c +++ b/stream/stream_dvd.c @@ -66,13 +66,13 @@ static void dvd_set_speed(char *device, unsigned speed) return; case -1: /* restore default value */ if (dvd_speed == 0) return; /* we haven't touched the speed setting */ - mp_tmsg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDrestoreSpeed); + mp_tmsg(MSGT_OPEN, MSGL_INFO, "Restoring DVD speed... "); break; default: /* limit to <speed> KB/s */ // speed < 100 is multiple of DVD single speed (1350KB/s) if (speed < 100) speed *= 1350; - mp_tmsg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDlimitSpeed, speed); + mp_tmsg(MSGT_OPEN, MSGL_INFO, "Limiting DVD speed to %dKB/s... ", speed); break; } @@ -105,14 +105,14 @@ static void dvd_set_speed(char *device, unsigned speed) fd = open(device, O_RDWR | O_NONBLOCK); if (fd == -1) { - mp_tmsg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDspeedCantOpen); + mp_tmsg(MSGT_OPEN, MSGL_INFO, "Couldn't open DVD device for writing, changing DVD speed needs write access.\n"); return; } if (ioctl(fd, SG_IO, &sghdr) < 0) - mp_tmsg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDlimitFail); + mp_tmsg(MSGT_OPEN, MSGL_INFO, "failed\n"); else - mp_tmsg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDlimitOk); + mp_tmsg(MSGT_OPEN, MSGL_INFO, "successful\n"); close(fd); #endif @@ -170,26 +170,26 @@ int dvd_parse_chapter_range(const m_option_t *conf, const char *range) { if(*range && isdigit(*range)) { dvd_chapter = strtol(range, &s, 10); if(range == s) { - mp_tmsg(MSGT_OPEN, MSGL_ERR, MSGTR_DVDinvalidChapterRange, range); + mp_tmsg(MSGT_OPEN, MSGL_ERR, "Invalid chapter range specification %s\n", range); return M_OPT_INVALID; } } if(*s == 0) return 0; else if(*s != '-') { - mp_tmsg(MSGT_OPEN, MSGL_ERR, MSGTR_DVDinvalidChapterRange, range); + mp_tmsg(MSGT_OPEN, MSGL_ERR, "Invalid chapter range specification %s\n", range); return M_OPT_INVALID; } ++s; if(*s == 0) return 0; if(! isdigit(*s)) { - mp_tmsg(MSGT_OPEN, MSGL_ERR, MSGTR_DVDinvalidChapterRange, range); + mp_tmsg(MSGT_OPEN, MSGL_ERR, "Invalid chapter range specification %s\n", range); return M_OPT_INVALID; } dvd_last_chapter = strtol(s, &t, 10); if (s == t || *t) { - mp_tmsg(MSGT_OPEN, MSGL_ERR, MSGTR_DVDinvalidChapterRange, range); + mp_tmsg(MSGT_OPEN, MSGL_ERR, "Invalid chapter range specification %s\n", range); return M_OPT_INVALID; } return 0; @@ -245,7 +245,7 @@ int dvd_aid_from_lang(stream_t *stream, unsigned char* lang) { code=lang[1]|(lang[0]<<8); for(i=0;i<d->nr_of_channels;i++) { if(d->audio_streams[i].language==code) { - mp_tmsg(MSGT_OPEN,MSGL_INFO,MSGTR_DVDaudioChannel, + mp_tmsg(MSGT_OPEN,MSGL_INFO,"Selected DVD audio channel: %d language: %c%c\n", d->audio_streams[i].id, lang[0],lang[1]); return d->audio_streams[i].id; } @@ -253,7 +253,7 @@ int dvd_aid_from_lang(stream_t *stream, unsigned char* lang) { } lang+=2; while (lang[0]==',' || lang[0]==' ') ++lang; } - mp_tmsg(MSGT_OPEN,MSGL_WARN,MSGTR_DVDnoMatchingAudio); + mp_tmsg(MSGT_OPEN,MSGL_WARN,"No matching DVD audio language found!\n"); } return -1; } @@ -288,14 +288,14 @@ int dvd_sid_from_lang(stream_t *stream, unsigned char* lang) { code=lang[1]|(lang[0]<<8); for(i=0;i<d->nr_of_subtitles;i++) { if(d->subtitles[i].language==code) { - mp_tmsg(MSGT_OPEN,MSGL_INFO,MSGTR_DVDsubtitleChannel, i, lang[0],lang[1]); + mp_tmsg(MSGT_OPEN,MSGL_INFO,"Selected DVD subtitle channel: %d language: %c%c\n", i, lang[0],lang[1]); return d->subtitles[i].id; } } lang+=2; while (lang[0]==',' || lang[0]==' ') ++lang; } - mp_tmsg(MSGT_OPEN,MSGL_WARN,MSGTR_DVDnoMatchingSubtitle); + mp_tmsg(MSGT_OPEN,MSGL_WARN,"No matching DVD subtitle language found!\n"); return -1; } @@ -813,12 +813,12 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { snprintf(temp_device, len, "/dev/rdisk%d", i); dvd = DVDOpen(temp_device); if(!dvd) { - mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,temp_device, strerror(errno)); + mp_tmsg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",temp_device, strerror(errno)); } else { #if DVDREAD_VERSION <= LIBDVDREAD_VERSION(0,9,4) dvd_file_t *dvdfile = DVDOpenFile(dvd,dvd_title,DVD_READ_INFO_FILE); if(!dvdfile) { - mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,temp_device, strerror(errno)); + mp_tmsg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",temp_device, strerror(errno)); DVDClose(dvd); continue; } @@ -838,7 +838,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { { dvd = DVDOpen(dvd_device_current); if(!dvd) { - mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,dvd_device_current, strerror(errno)); + mp_tmsg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",dvd_device_current, strerror(errno)); m_struct_free(&stream_opts,opts); return STREAM_UNSUPPORTED; } @@ -852,7 +852,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { */ vmg_file = ifoOpen(dvd, 0); if(!vmg_file) { - mp_tmsg(MSGT_OPEN,MSGL_ERR, MSGTR_DVDnoVMG); + mp_tmsg(MSGT_OPEN,MSGL_ERR, "Can't open VMG info!\n"); DVDClose( dvd ); m_struct_free(&stream_opts,opts); return STREAM_UNSUPPORTED; @@ -889,9 +889,9 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { /** * Make sure our title number is valid. */ - mp_tmsg(MSGT_OPEN,MSGL_STATUS, MSGTR_DVDnumTitles, tt_srpt->nr_of_srpts ); + mp_tmsg(MSGT_OPEN,MSGL_STATUS, "There are %d titles on this DVD.\n", tt_srpt->nr_of_srpts ); if(dvd_title < 1 || dvd_title > tt_srpt->nr_of_srpts) { - mp_tmsg(MSGT_OPEN,MSGL_ERR, MSGTR_DVDinvalidTitle, dvd_title); + mp_tmsg(MSGT_OPEN,MSGL_ERR, "Invalid DVD title number: %d\n", dvd_title); ifoClose( vmg_file ); DVDClose( dvd ); m_struct_free(&stream_opts,opts); @@ -902,9 +902,9 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { /** * Make sure the angle number is valid for this title. */ - mp_tmsg(MSGT_OPEN,MSGL_STATUS, MSGTR_DVDnumAngles, tt_srpt->title[dvd_title].nr_of_angles); + mp_tmsg(MSGT_OPEN,MSGL_STATUS, "There are %d angles in this DVD title.\n", tt_srpt->title[dvd_title].nr_of_angles); if(dvd_angle<1 || dvd_angle>tt_srpt->title[dvd_title].nr_of_angles) { - mp_tmsg(MSGT_OPEN,MSGL_ERR, MSGTR_DVDinvalidAngle, dvd_angle); + mp_tmsg(MSGT_OPEN,MSGL_ERR, "Invalid DVD angle number: %d\n", dvd_angle); goto fail; } --dvd_angle; // remap 1.. -> 0.. @@ -915,7 +915,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { */ vts_file = ifoOpen( dvd, tt_srpt->title[dvd_title].title_set_nr ); if(!vts_file) { - mp_tmsg(MSGT_OPEN,MSGL_ERR, MSGTR_DVDnoIFO, tt_srpt->title[dvd_title].title_set_nr ); + mp_tmsg(MSGT_OPEN,MSGL_ERR, "Cannot open the IFO file for DVD title %d.\n", tt_srpt->title[dvd_title].title_set_nr ); goto fail; } /** @@ -923,7 +923,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { */ title = DVDOpenFile(dvd, tt_srpt->title[dvd_title].title_set_nr, DVD_READ_TITLE_VOBS); if(!title) { - mp_tmsg(MSGT_OPEN,MSGL_ERR, MSGTR_DVDnoVOBs, tt_srpt->title[dvd_title].title_set_nr); + mp_tmsg(MSGT_OPEN,MSGL_ERR, "Cannot open title VOBS (VTS_%02d_1.VOB).\n", tt_srpt->title[dvd_title].title_set_nr); ifoClose( vts_file ); goto fail; } @@ -983,7 +983,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { // 1 - stereo // 5 - 5.1 audio_stream->channels=audio->channels; - mp_tmsg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDaudioStreamInfo, + mp_tmsg(MSGT_OPEN,MSGL_STATUS,"audio stream: %d format: %s (%s) language: %s aid: %d.\n", d->nr_of_channels, dvd_audio_stream_types[ audio->audio_format ], dvd_audio_stream_channels[ audio->channels ], @@ -997,7 +997,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { d->nr_of_channels++; } } - mp_tmsg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDnumAudioChannels,d->nr_of_channels ); + mp_tmsg(MSGT_OPEN,MSGL_STATUS,"number of audio channels on disk: %d.\n",d->nr_of_channels ); } /** @@ -1029,13 +1029,13 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { else if(video->display_aspect_ratio == 3) /* 16:9 */ sub_stream->id = pgc->subp_control[i] >> 8 & 31; - mp_tmsg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDsubtitleLanguage, sub_stream->id, tmp); + mp_tmsg(MSGT_OPEN,MSGL_STATUS,"subtitle ( sid ): %d language: %s\n", sub_stream->id, tmp); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SUBTITLE_ID=%d\n", sub_stream->id); if(language && tmp[0]) mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SID_%d_LANG=%s\n", sub_stream->id, tmp); d->nr_of_subtitles++; } - mp_tmsg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDnumSubtitles,d->nr_of_subtitles); + mp_tmsg(MSGT_OPEN,MSGL_STATUS,"number of subtitles on disk: %d\n",d->nr_of_subtitles); } /** @@ -1087,7 +1087,7 @@ fail: m_struct_free(&stream_opts, opts); return STREAM_UNSUPPORTED; } - mp_tmsg(MSGT_DVD,MSGL_ERR,MSGTR_NoDVDSupport); + mp_tmsg(MSGT_DVD,MSGL_ERR,"MPlayer was compiled without DVD support, exiting.\n"); m_struct_free(&stream_opts,opts); return STREAM_UNSUPPORTED; } diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c index f92c4877cc..d8dd416f9d 100644 --- a/stream/stream_dvdnav.c +++ b/stream/stream_dvdnav.c @@ -541,7 +541,7 @@ static void show_audio_subs_languages(dvdnav_t *nav) format = 1; //unknown id = i + base[format]; if (lang != 0xFFFF) { - mp_tmsg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDaudioStreamInfo, i, + mp_tmsg(MSGT_OPEN,MSGL_STATUS,"audio stream: %d format: %s (%s) language: %s aid: %d.\n", i, dvd_audio_stream_types[format], dvd_audio_stream_channels[channels], tmp, id); if(lang && tmp[0]) mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AID_%d_LANG=%s\n", id, tmp); @@ -562,7 +562,7 @@ static void show_audio_subs_languages(dvdnav_t *nav) } tmp[2] = 0; if (lang != 0xFFFF) - mp_tmsg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDsubtitleLanguage, i+0x20, tmp); + mp_tmsg(MSGT_OPEN,MSGL_STATUS,"subtitle ( sid ): %d language: %s\n", i+0x20, tmp); } } @@ -575,7 +575,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { else if(dvd_device) filename= dvd_device; else filename = DEFAULT_DVD_DEVICE; if(!(priv=new_dvdnav_stream(filename))) { - mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,filename, strerror(errno)); + mp_tmsg(MSGT_OPEN,MSGL_ERR,"Couldn't open DVD device: %s (%s)\n",filename, strerror(errno)); return STREAM_UNSUPPORTED; } diff --git a/stream/stream_file.c b/stream/stream_file.c index de89baea6f..8d3111f4ea 100644 --- a/stream/stream_file.c +++ b/stream/stream_file.c @@ -126,7 +126,7 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) { if(!strcmp(filename,"-")){ if(mode == STREAM_READ) { // read from stdin - mp_tmsg(MSGT_OPEN,MSGL_INFO,MSGTR_ReadSTDIN); + mp_tmsg(MSGT_OPEN,MSGL_INFO,"Reading from stdin...\n"); f=0; // 0=stdin #ifdef __MINGW32__ setmode(fileno(stdin),O_BINARY); @@ -145,7 +145,7 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) { #endif f=open(filename,m, openmode); if(f<0) { - mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_FileNotFound,filename); + mp_tmsg(MSGT_OPEN,MSGL_ERR,"File not found: '%s'\n",filename); m_struct_free(&stream_opts,opts); return STREAM_ERROR; } diff --git a/stream/stream_live555.c b/stream/stream_live555.c index db32150f08..77aec3eda4 100644 --- a/stream/stream_live555.c +++ b/stream/stream_live555.c @@ -67,7 +67,7 @@ static int open_live_sdp(stream_t *stream,int mode, void* opts, int* file_format f = open(filename,O_RDONLY); #endif if(f < 0) { - mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_FileNotFound,filename); + mp_tmsg(MSGT_OPEN,MSGL_ERR,"File not found: '%s'\n",filename); return STREAM_ERROR; } diff --git a/stream/stream_radio.c b/stream/stream_radio.c index 965ee52626..df8ed8628b 100644 --- a/stream/stream_radio.c +++ b/stream/stream_radio.c @@ -183,7 +183,7 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){ /*parsing channels string*/ channels=priv->radio_param->channels; - mp_tmsg(MSGT_RADIO, MSGL_INFO, MSGTR_RADIO_ChannelNamesDetected); + mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Radio channel names detected.\n"); priv->radio_channel_list = malloc(sizeof(radio_channels_t)); priv->radio_channel_list->index=1; priv->radio_channel_list->next=NULL; @@ -201,7 +201,7 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){ priv->radio_channel_current->freq=atof(tmp); if ((priv->radio_channel_current->freq>priv->rangehigh)||(priv->radio_channel_current->freq<priv->rangelow)) - mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_WrongFreqForChannel, + mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong frequency for channel %s\n", priv->radio_channel_current->name); while ((sep=strchr(priv->radio_channel_current->name, '_'))) sep[0] = ' '; @@ -227,17 +227,17 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){ priv->radio_channel_current = priv->radio_channel_current->next; if (priv->radio_channel_current->index!=channel){ if (((float)((int)freq_channel))!=freq_channel) - mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_WrongChannelNumberFloat,freq_channel); + mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong channel number: %.2f\n",freq_channel); else - mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_WrongChannelNumberInt,(int)freq_channel); + mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong channel number: %d\n",(int)freq_channel); return STREAM_ERROR; } - mp_tmsg(MSGT_RADIO, MSGL_INFO, MSGTR_RADIO_SelectedChannel, priv->radio_channel_current->index, + mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Selected channel: %d - %s (freq: %.2f)\n", priv->radio_channel_current->index, priv->radio_channel_current->name, priv->radio_channel_current->freq); *pfreq=priv->radio_channel_current->freq; }else{ if (freq_channel){ - mp_tmsg(MSGT_RADIO, MSGL_INFO, MSGTR_RADIO_FreqParameterDetected); + mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Radio frequency parameter detected.\n"); priv->radio_channel_list=malloc(sizeof(radio_channels_t)); priv->radio_channel_list->next=NULL; priv->radio_channel_list->prev=NULL; @@ -248,7 +248,7 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){ *pfreq=freq_channel; } } - mp_tmsg(MSGT_RADIO, MSGL_DBG2, MSGTR_RADIO_DoneParsingChannels); + mp_tmsg(MSGT_RADIO, MSGL_DBG2, "[radio] Done parsing channels.\n"); return STREAM_OK; } @@ -271,25 +271,25 @@ static int init_frac_v4l2(radio_priv_t* priv){ memset(&tuner,0,sizeof(tuner)); tuner.index=0; if (ioctl(priv->radio_fd, VIDIOC_G_TUNER, &tuner)<0){ - mp_tmsg(MSGT_RADIO,MSGL_WARN,MSGTR_RADIO_GetTunerFailed,strerror(errno),priv->frac); + mp_tmsg(MSGT_RADIO,MSGL_WARN,"[radio] Warning: ioctl get tuner failed: %s. Setting frac to %d.\n",strerror(errno),priv->frac); return STREAM_ERROR; } if(tuner.type!=V4L2_TUNER_RADIO){ - mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_NotRadioDevice,priv->radio_param->device); + mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] %s is no radio device!\n",priv->radio_param->device); return STREAM_ERROR; } if(tuner.capability & V4L2_TUNER_CAP_LOW){ priv->frac=16000; - mp_tmsg(MSGT_RADIO,MSGL_DBG2,MSGTR_RADIO_TunerCapLowYes,priv->frac); + mp_tmsg(MSGT_RADIO,MSGL_DBG2,"[radio] tuner is low:yes frac=%d\n",priv->frac); } else{ priv->frac=16; - mp_tmsg(MSGT_RADIO,MSGL_DBG2,MSGTR_RADIO_TunerCapLowNo,priv->frac); + mp_tmsg(MSGT_RADIO,MSGL_DBG2,"[radio] tuner is low:no frac=%d\n",priv->frac); } priv->rangelow=((float)tuner.rangelow)/priv->frac; priv->rangehigh=((float)tuner.rangehigh)/priv->frac; - mp_tmsg(MSGT_RADIO,MSGL_V,MSGTR_RADIO_FreqRange,priv->rangelow,priv->rangehigh); + mp_tmsg(MSGT_RADIO,MSGL_V,"[radio] Allowed frequency range is %.2f-%.2f MHz.\n",priv->rangelow,priv->rangehigh); return STREAM_OK; } @@ -306,7 +306,7 @@ static int set_frequency_v4l2(radio_priv_t* priv,float frequency){ freq.type=V4L2_TUNER_RADIO; freq.frequency=frequency*priv->frac; if(ioctl(priv->radio_fd,VIDIOC_S_FREQUENCY,&freq)<0){ - mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_SetFreqFailed,freq.frequency, + mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl set frequency 0x%x (%.2f) failed: %s\n",freq.frequency, frequency,strerror(errno)); return STREAM_ERROR; } @@ -322,7 +322,7 @@ static int get_frequency_v4l2(radio_priv_t* priv,float* frequency){ struct v4l2_frequency freq; memset(&freq,0,sizeof(freq)); if (ioctl(priv->radio_fd, VIDIOC_G_FREQUENCY, &freq) < 0) { - mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_GetFreqFailed,strerror(errno)); + mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl get frequency failed: %s\n",strerror(errno)); return STREAM_ERROR; } *frequency=((float)freq.frequency)/priv->frac; @@ -346,13 +346,13 @@ static void set_volume_v4l2(radio_priv_t* priv,int volume){ control.id=V4L2_CID_AUDIO_MUTE; control.value = (volume==0?1:0); if (ioctl(priv->radio_fd, VIDIOC_S_CTRL, &control)<0){ - mp_tmsg(MSGT_RADIO,MSGL_WARN,MSGTR_RADIO_SetMuteFailed,strerror(errno)); + mp_tmsg(MSGT_RADIO,MSGL_WARN,"[radio] ioctl set mute failed: %s\n",strerror(errno)); } memset(&qctrl,0,sizeof(qctrl)); qctrl.id = V4L2_CID_AUDIO_VOLUME; if (ioctl(priv->radio_fd, VIDIOC_QUERYCTRL, &qctrl) < 0) { - mp_tmsg(MSGT_RADIO, MSGL_WARN, MSGTR_RADIO_QueryControlFailed,strerror(errno)); + mp_tmsg(MSGT_RADIO, MSGL_WARN, "[radio] ioctl query control failed: %s\n",strerror(errno)); return; } @@ -360,7 +360,7 @@ static void set_volume_v4l2(radio_priv_t* priv,int volume){ control.id=V4L2_CID_AUDIO_VOLUME; control.value=qctrl.minimum+volume*(qctrl.maximum-qctrl.minimum)/100; if (ioctl(priv->radio_fd, VIDIOC_S_CTRL, &control) < 0) { - mp_tmsg(MSGT_RADIO, MSGL_WARN,MSGTR_RADIO_SetVolumeFailed,strerror(errno)); + mp_tmsg(MSGT_RADIO, MSGL_WARN,"[radio] ioctl set volume failed: %s\n",strerror(errno)); } } @@ -376,14 +376,14 @@ static int get_volume_v4l2(radio_priv_t* priv,int* volume){ memset(&qctrl,0,sizeof(qctrl)); qctrl.id = V4L2_CID_AUDIO_VOLUME; if (ioctl(priv->radio_fd, VIDIOC_QUERYCTRL, &qctrl) < 0) { - mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_QueryControlFailed,strerror(errno)); + mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] ioctl query control failed: %s\n",strerror(errno)); return STREAM_ERROR; } memset(&control,0,sizeof(control)); control.id=V4L2_CID_AUDIO_VOLUME; if (ioctl(priv->radio_fd, VIDIOC_G_CTRL, &control) < 0) { - mp_tmsg(MSGT_RADIO, MSGL_ERR,MSGTR_RADIO_GetVolumeFailed,strerror(errno)); + mp_tmsg(MSGT_RADIO, MSGL_ERR,"[radio] ioctl get volume failed: %s\n",strerror(errno)); return STREAM_ERROR; } @@ -402,7 +402,7 @@ static int get_volume_v4l2(radio_priv_t* priv,int* volume){ /* v4l2 driver info structure */ static const radio_driver_t radio_driver_v4l2={ "v4l2", - _(MSGTR_RADIO_DriverV4L)2, + _("[radio] Using V4Lv1 radio interface.\n")2, init_frac_v4l2, set_volume_v4l2, get_volume_v4l2, @@ -428,20 +428,20 @@ static int init_frac_v4l(radio_priv_t* priv){ struct video_tuner tuner; memset(&tuner,0,sizeof(tuner)); if (ioctl(priv->radio_fd, VIDIOCGTUNER, &tuner) <0){ - mp_tmsg(MSGT_RADIO,MSGL_WARN,MSGTR_RADIO_GetTunerFailed,strerror(errno),priv->frac); + mp_tmsg(MSGT_RADIO,MSGL_WARN,"[radio] Warning: ioctl get tuner failed: %s. Setting frac to %d.\n",strerror(errno),priv->frac); return STREAM_ERROR; } if(tuner.flags & VIDEO_TUNER_LOW){ priv->frac=16000; - mp_tmsg(MSGT_RADIO,MSGL_DBG2,MSGTR_RADIO_TunerCapLowYes,priv->frac); + mp_tmsg(MSGT_RADIO,MSGL_DBG2,"[radio] tuner is low:yes frac=%d\n",priv->frac); }else{ priv->frac=16; - mp_tmsg(MSGT_RADIO,MSGL_DBG2,MSGTR_RADIO_TunerCapLowNo,priv->frac); + mp_tmsg(MSGT_RADIO,MSGL_DBG2,"[radio] tuner is low:no frac=%d\n",priv->frac); } priv->rangelow=((float)tuner.rangelow)/priv->frac; priv->rangehigh=((float)tuner.rangehigh)/priv->frac; - mp_tmsg(MSGT_RADIO,MSGL_V,MSGTR_RADIO_FreqRange,priv->rangelow,priv->rangehigh); + mp_tmsg(MSGT_RADIO,MSGL_V,"[radio] Allowed frequency range is %.2f-%.2f MHz.\n",priv->rangelow,priv->rangehigh); return STREAM_OK; } @@ -455,7 +455,7 @@ static int set_frequency_v4l(radio_priv_t* priv,float frequency){ __u32 freq; freq=frequency*priv->frac; if (ioctl(priv->radio_fd, VIDIOCSFREQ, &freq) < 0) { - mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_SetFreqFailed,freq,frequency,strerror(errno)); + mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl set frequency 0x%x (%.2f) failed: %s\n",freq,frequency,strerror(errno)); return STREAM_ERROR; } return STREAM_OK; @@ -468,7 +468,7 @@ static int set_frequency_v4l(radio_priv_t* priv,float frequency){ static int get_frequency_v4l(radio_priv_t* priv,float* frequency){ __u32 freq; if (ioctl(priv->radio_fd, VIDIOCGFREQ, &freq) < 0) { - mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_GetFreqFailed,strerror(errno)); + mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl get frequency failed: %s\n",strerror(errno)); return STREAM_ERROR; } *frequency=((float)freq)/priv->frac; @@ -490,7 +490,7 @@ static void set_volume_v4l(radio_priv_t* priv,int volume){ memset(&audio,0,sizeof(audio)); audio.flags = (volume==0?VIDEO_AUDIO_MUTE:0); if (ioctl(priv->radio_fd, VIDIOCSAUDIO, &audio)<0){ - mp_tmsg(MSGT_RADIO,MSGL_WARN,MSGTR_RADIO_SetMuteFailed,strerror(errno)); + mp_tmsg(MSGT_RADIO,MSGL_WARN,"[radio] ioctl set mute failed: %s\n",strerror(errno)); } memset(&audio,0,sizeof(audio)); @@ -500,7 +500,7 @@ static void set_volume_v4l(radio_priv_t* priv,int volume){ audio.volume = volume* (65535 / 100); if (ioctl(priv->radio_fd, VIDIOCSAUDIO, &audio) < 0){ - mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_SetVolumeFailed,strerror(errno)); + mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl set volume failed: %s\n",strerror(errno)); } } @@ -515,7 +515,7 @@ static int get_volume_v4l(radio_priv_t* priv,int* volume){ memset(&audio,0,sizeof(audio)); audio.audio=0; if (ioctl(priv->radio_fd, VIDIOCGAUDIO, &audio) < 0){ - mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_GetVolumeFailed,strerror(errno)); + mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl get volume failed: %s\n",strerror(errno)); return STREAM_ERROR; } @@ -533,7 +533,7 @@ static int get_volume_v4l(radio_priv_t* priv,int* volume){ /* v4l driver info structure */ static const radio_driver_t radio_driver_v4l={ "v4l", - _(MSGTR_RADIO_DriverV4L), + _("[radio] Using V4Lv1 radio interface.\n"), init_frac_v4l, set_volume_v4l, get_volume_v4l, @@ -576,7 +576,7 @@ static int set_frequency_bsdbt848(radio_priv_t* priv,float frequency){ unsigned int freq; freq=frequency*priv->frac; if(ioctl(priv->radio_fd,RADIO_SETFREQ,&freq)<0){ - mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_SetFreqFailed,freq, frequency, strerror(errno)); + mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl set frequency 0x%x (%.2f) failed: %s\n",freq, frequency, strerror(errno)); return STREAM_ERROR; } return STREAM_OK; @@ -590,7 +590,7 @@ static int set_frequency_bsdbt848(radio_priv_t* priv,float frequency){ static int get_frequency_bsdbt848(radio_priv_t* priv,float* frequency){ unsigned int freq; if (ioctl(priv->radio_fd, RADIO_GETFREQ, &freq) < 0) { - mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_GetFreqFailed,strerror(errno)); + mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl get frequency failed: %s\n",strerror(errno)); return STREAM_ERROR; } *frequency=((float)freq)/priv->frac; @@ -614,7 +614,7 @@ static void set_volume_bsdbt848(radio_priv_t* priv,int volume){ audio_flags = (volume==0?AUDIO_MUTE:AUDIO_UNMUTE); if (ioctl(priv->radio_fd, BT848_SAUDIO, &audio_flags)<0){ - mp_tmsg(MSGT_RADIO,MSGL_WARN,MSGTR_RADIO_SetMuteFailed,strerror(errno)); + mp_tmsg(MSGT_RADIO,MSGL_WARN,"[radio] ioctl set mute failed: %s\n",strerror(errno)); } } @@ -630,7 +630,7 @@ static int get_volume_bsdbt848(radio_priv_t* priv,int* volume){ int audio_flags; if (ioctl(priv->radio_fd, BT848_GAUDIO, &audio_flags)<0){ - mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_GetVolumeFailed,strerror(errno)); + mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] ioctl get volume failed: %s\n",strerror(errno)); return STREAM_ERROR; } @@ -645,7 +645,7 @@ static int get_volume_bsdbt848(radio_priv_t* priv,int* volume){ /* bsdbt848 driver info structure */ static const radio_driver_t radio_driver_bsdbt848={ "bsdbt848", - _(MSGTR_RADIO_DriverBSDBT848), + _("[radio] Using *BSD BT848 radio interface.\n"), init_frac_bsdbt848, set_volume_bsdbt848, get_volume_bsdbt848, @@ -659,7 +659,7 @@ static inline int init_frac(radio_priv_t* priv){ } static inline int set_frequency(radio_priv_t* priv,float frequency){ if ((frequency<priv->rangelow)||(frequency>priv->rangehigh)){ - mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_WrongFreq,frequency); + mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong frequency: %.2f\n",frequency); return STREAM_ERROR; } if(priv->driver->set_frequency(priv,frequency)!=STREAM_OK) @@ -667,7 +667,7 @@ static inline int set_frequency(radio_priv_t* priv,float frequency){ #ifdef CONFIG_RADIO_CAPTURE if(clear_buffer(priv)!=STREAM_OK){ - mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_ClearBufferFailed,strerror(errno)); + mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] Clearing buffer failed: %s\n",strerror(errno)); return STREAM_ERROR; } #endif @@ -722,16 +722,16 @@ static int read_chunk(audio_in_t *ai, unsigned char *buffer) if (ret != ai->alsa.chunk_size) { if (ret < 0) { if (ret==-EAGAIN) return -1; - mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_ErrReadingAudio, snd_strerror(ret)); + mp_tmsg(MSGT_RADIO, MSGL_ERR, "\nError reading audio: %s\n", snd_strerror(ret)); if (ret == -EPIPE) { if (ai_alsa_xrun(ai) == 0) { - mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_XRUNSomeFramesMayBeLeftOut); + mp_tmsg(MSGT_RADIO, MSGL_ERR, "Recovered from cross-run, some frames may be left out!\n"); } else { - mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_ErrFatalCannotRecover); + mp_tmsg(MSGT_RADIO, MSGL_ERR, "Fatal error, cannot recover!\n"); } } } else { - mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_NotEnoughSamples); + mp_tmsg(MSGT_RADIO, MSGL_ERR, "\nNot enough audio samples!\n"); } return -1; } @@ -753,7 +753,7 @@ static int read_chunk(audio_in_t *ai, unsigned char *buffer) if (ret<0){ if (errno==EAGAIN && bt==0) return -1; //no data avail yet if (errno==EAGAIN) { usleep(1000); continue;} //nilling buffer to blocksize size - mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_MPDEMUX_AUDIOIN_ErrReadingAudio, strerror(errno)); + mp_tmsg(MSGT_RADIO, MSGL_ERR, "\nError reading audio: %s\n", strerror(errno)); return -1; } bt+=ret; @@ -785,7 +785,7 @@ static int read_chunk(audio_in_t *ai, unsigned char *buffer) static int grab_audio_frame(radio_priv_t *priv, char *buffer, int len) { int i; - mp_tmsg(MSGT_RADIO, MSGL_DBG3, MSGTR_RADIO_BufferString,"grab_audio_frame",priv->audio_cnt,priv->audio_drop); + mp_tmsg(MSGT_RADIO, MSGL_DBG3, "[radio] %s: in buffer=%d dropped=%d\n","grab_audio_frame",priv->audio_cnt,priv->audio_drop); /* Cache buffer must be filled by some audio packets when playing starts. Otherwise MPlayer will quit with EOF error. Probably, there is need more carefull checking rather than simple 'for' loop @@ -835,7 +835,7 @@ static int init_audio(radio_priv_t *priv) } priv->do_capture=1; - mp_tmsg(MSGT_RADIO,MSGL_V,MSGTR_RADIO_CaptureStarting); + mp_tmsg(MSGT_RADIO,MSGL_V,"[radio] Starting capture stuff.\n"); #ifdef CONFIG_ALSA while ((tmp = strrchr(priv->radio_param->adevice, '='))){ tmp[0] = ':'; @@ -847,7 +847,7 @@ static int init_audio(radio_priv_t *priv) #endif if(audio_in_init(&priv->audio_in, is_oss?AUDIO_IN_OSS:AUDIO_IN_ALSA)<0){ - mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_AudioInInitFailed); + mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] audio_in_init failed.\n"); } audio_in_set_device(&priv->audio_in, priv->radio_param->adevice); @@ -855,7 +855,7 @@ static int init_audio(radio_priv_t *priv) audio_in_set_samplerate(&priv->audio_in, priv->radio_param->arate); if (audio_in_setup(&priv->audio_in) < 0) { - mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_AudioInSetupFailed, strerror(errno)); + mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] audio_in_setup call failed: %s\n", strerror(errno)); return STREAM_ERROR; } #ifdef CONFIG_OSS_AUDIO @@ -871,12 +871,12 @@ static int init_audio(radio_priv_t *priv) priv->audio_in.bytes_per_sample+priv->audio_in.blocksize; if (priv->audio_buffer_size < 256*priv->audio_in.blocksize) priv->audio_buffer_size = 256*priv->audio_in.blocksize; - mp_tmsg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_AudioBuffer, + mp_tmsg(MSGT_RADIO, MSGL_V, "[radio] Audio capture - buffer=%d bytes (block=%d bytes).\n", priv->audio_buffer_size,priv->audio_in.blocksize); /* start capture */ priv->audio_ringbuffer = calloc(1, priv->audio_buffer_size); if (!priv->audio_ringbuffer) { - mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_AllocateBufferFailed,priv->audio_in.blocksize, priv->audio_buffer_size, strerror(errno)); + mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] cannot allocate audio buffer (block=%d,buf=%d): %s\n",priv->audio_in.blocksize, priv->audio_buffer_size, strerror(errno)); return STREAM_ERROR; } priv->audio_head = 0; @@ -924,7 +924,7 @@ int radio_set_freq(struct stream *stream, float frequency){ if (get_frequency(priv,&frequency)!=STREAM_OK){ return 0; } - mp_tmsg(MSGT_RADIO, MSGL_INFO, MSGTR_RADIO_CurrentFreq,frequency); + mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Current frequency: %.2f\n",frequency); return 1; } @@ -969,7 +969,7 @@ int radio_step_channel(struct stream *stream, int direction) { priv->radio_channel_current = priv->radio_channel_list; if(!radio_set_freq(stream,priv->radio_channel_current->freq)) return 0; - mp_tmsg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_SelectedChannel, + mp_tmsg(MSGT_RADIO, MSGL_V, "[radio] Selected channel: %d - %s (freq: %.2f)\n", priv->radio_channel_current->index, priv->radio_channel_current->name, priv->radio_channel_current->freq); break; @@ -981,13 +981,13 @@ int radio_step_channel(struct stream *stream, int direction) { priv->radio_channel_current = priv->radio_channel_current->next; if(!radio_set_freq(stream,priv->radio_channel_current->freq)) return 0; - mp_tmsg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_SelectedChannel, + mp_tmsg(MSGT_RADIO, MSGL_V, "[radio] Selected channel: %d - %s (freq: %.2f)\n", priv->radio_channel_current->index, priv->radio_channel_current->name, priv->radio_channel_current->freq); break; } }else - mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_ChangeChannelNoChannelList); + mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Can not change channel: no channel list given.\n"); return 1; } @@ -1006,7 +1006,7 @@ int radio_set_channel(struct stream *stream, char *channel) { char* endptr; if (*channel=='\0') - mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_WrongChannelName,channel); + mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong channel name: %s\n",channel); if (priv->radio_channel_list) { channel_int = strtol(channel,&endptr,10); @@ -1017,7 +1017,7 @@ int radio_set_channel(struct stream *stream, char *channel) { if (!strncmp(channel,tmp->name,sizeof(tmp->name)-1)) break; if (!tmp){ - mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_WrongChannelName,channel); + mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong channel name: %s\n",channel); return 0; } }else{ @@ -1027,17 +1027,17 @@ int radio_set_channel(struct stream *stream, char *channel) { else break; if (tmp->index!=channel_int){ - mp_tmsg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_WrongChannelNumberInt,channel_int); + mp_tmsg(MSGT_RADIO,MSGL_ERR,"[radio] Wrong channel number: %d\n",channel_int); return 0; } } priv->radio_channel_current=tmp; - mp_tmsg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_SelectedChannel, priv->radio_channel_current->index, + mp_tmsg(MSGT_RADIO, MSGL_V, "[radio] Selected channel: %d - %s (freq: %.2f)\n", priv->radio_channel_current->index, priv->radio_channel_current->name, priv->radio_channel_current->freq); if(!radio_set_freq(stream, priv->radio_channel_current->freq)) return 0; } else - mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_ChangeChannelNoChannelList); + mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Can not change channel: no channel list given.\n"); return 1; } @@ -1129,7 +1129,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { else priv->driver=NULL; - mp_tmsg(MSGT_RADIO,MSGL_V,MSGTR_RADIO_AvailableDrivers); + mp_tmsg(MSGT_RADIO,MSGL_V,"[radio] Available drivers: "); for(i=0;radio_drivers[i];i++){ mp_msg(MSGT_RADIO,MSGL_V,"%s, ",radio_drivers[i]->name); if(strcmp(priv->radio_param->driver,radio_drivers[i]->name)==0) @@ -1140,7 +1140,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { if(priv->driver) mp_msg(MSGT_RADIO, MSGL_INFO, priv->driver->info); else{ - mp_tmsg(MSGT_RADIO, MSGL_INFO, MSGTR_RADIO_DriverUnknownStr,priv->radio_param->driver); + mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Unknown driver name: %s\n",priv->radio_param->driver); close_s(stream); return STREAM_ERROR; } @@ -1160,12 +1160,12 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { priv->radio_fd = open(priv->radio_param->device, O_RDONLY); if (priv->radio_fd < 0) { - mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_UnableOpenDevice, + mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Unable to open '%s': %s\n", priv->radio_param->device, strerror(errno)); close_s(stream); return STREAM_ERROR; } - mp_tmsg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_RadioDevice, priv->radio_fd,priv->radio_param->device); + mp_tmsg(MSGT_RADIO, MSGL_V, "[radio] Radio fd: %d, %s\n", priv->radio_fd,priv->radio_param->device); fcntl(priv->radio_fd, F_SETFD, FD_CLOEXEC); get_volume(priv, &priv->old_snd_volume); @@ -1182,11 +1182,11 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { } if ((frequency<priv->rangelow)||(frequency>priv->rangehigh)){ - mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_WrongFreq,frequency); + mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Wrong frequency: %.2f\n",frequency); close_s(stream); return STREAM_ERROR; }else - mp_tmsg(MSGT_RADIO, MSGL_INFO, MSGTR_RADIO_UsingFreq,frequency); + mp_tmsg(MSGT_RADIO, MSGL_INFO, "[radio] Using frequency: %.2f.\n",frequency); if(set_frequency(priv,frequency)!=STREAM_OK){ close_s(stream); @@ -1205,7 +1205,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { if(!stream_enable_cache(stream,5*priv->audio_in.samplerate*priv->audio_in.channels* priv->audio_in.bytes_per_sample,2*priv->audio_in.samplerate*priv->audio_in.channels* priv->audio_in.bytes_per_sample,priv->audio_in.blocksize)) { - mp_tmsg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_StreamEnableCacheFailed,strerror(errno)); + mp_tmsg(MSGT_RADIO, MSGL_ERR, "[radio] Call to stream_enable_cache failed: %s\n",strerror(errno)); close_s(stream); return STREAM_ERROR; } diff --git a/stream/stream_smb.c b/stream/stream_smb.c index 627361fdde..0c6fcac923 100644 --- a/stream/stream_smb.c +++ b/stream/stream_smb.c @@ -119,14 +119,14 @@ static int open_f (stream_t *stream, int mode, void *opts, int* file_format) { err = smbc_init(smb_auth_fn, 1); if (err < 0) { - mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_SMBInitError,err); + mp_tmsg(MSGT_OPEN,MSGL_ERR,"Cannot init the libsmbclient library: %d\n",err); m_struct_free(&stream_opts, opts); return STREAM_ERROR; } fd = smbc_open(filename, m,0644); if (fd < 0) { - mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_SMBFileNotFound, filename); + mp_tmsg(MSGT_OPEN,MSGL_ERR,"Could not open from LAN: '%s'\n", filename); m_struct_free(&stream_opts, opts); return STREAM_ERROR; } diff --git a/stream/stream_vcd.c b/stream/stream_vcd.c index fbda28d236..338afc1a14 100644 --- a/stream/stream_vcd.c +++ b/stream/stream_vcd.c @@ -112,7 +112,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { f=open(p->device,O_RDONLY); #endif if(f<0){ - mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_CdDevNotfound,p->device); + mp_tmsg(MSGT_OPEN,MSGL_ERR,"CD-ROM Device '%s' not found.\n",p->device); m_struct_free(&stream_opts,opts); return STREAM_ERROR; } @@ -126,7 +126,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { } ret2=vcd_get_track_end(vcd,p->track); if(ret2<0){ - mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_ErrTrackSelect " (get)\n"); + mp_tmsg(MSGT_OPEN,MSGL_ERR,"Error selecting VCD track." " (get)\n"); close(f); free(vcd); m_struct_free(&stream_opts,opts); @@ -134,7 +134,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { } ret=vcd_seek_to_track(vcd,p->track); if(ret<0){ - mp_tmsg(MSGT_OPEN,MSGL_ERR,MSGTR_ErrTrackSelect " (seek)\n"); + mp_tmsg(MSGT_OPEN,MSGL_ERR,"Error selecting VCD track." " (seek)\n"); close(f); free(vcd); m_struct_free(&stream_opts,opts); diff --git a/stream/tcp.c b/stream/tcp.c index 1857b4e57d..e0f1795bf9 100644 --- a/stream/tcp.c +++ b/stream/tcp.c @@ -108,7 +108,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) { case AF_INET6: our_s_addr = (void *) &server_address.six.sin6_addr; break; #endif default: - mp_tmsg(MSGT_NETWORK,MSGL_ERR, MSGTR_MPDEMUX_NW_UnknownAF, af); + mp_tmsg(MSGT_NETWORK,MSGL_ERR, "Unknown address family %d\n", af); return TCP_ERROR_FATAL; } @@ -123,7 +123,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) { if ( inet_addr(host)==INADDR_NONE ) #endif { - if(verb) mp_tmsg(MSGT_NETWORK,MSGL_STATUS,MSGTR_MPDEMUX_NW_ResolvingHostForAF, host, af2String(af)); + if(verb) mp_tmsg(MSGT_NETWORK,MSGL_STATUS,"Resolving %s for %s...\n", host, af2String(af)); #ifdef HAVE_GETHOSTBYNAME2 hp=(struct hostent*)gethostbyname2( host, af ); @@ -131,7 +131,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) { hp=(struct hostent*)gethostbyname( host ); #endif if( hp==NULL ) { - if(verb) mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_CantResolv, af2String(af), host); + if(verb) mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Couldn't resolve name for %s: %s\n", af2String(af), host); return TCP_ERROR_FATAL; } @@ -158,7 +158,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) { break; #endif default: - mp_tmsg(MSGT_NETWORK,MSGL_ERR, MSGTR_MPDEMUX_NW_UnknownAF, af); + mp_tmsg(MSGT_NETWORK,MSGL_ERR, "Unknown address family %d\n", af); return TCP_ERROR_FATAL; } @@ -167,7 +167,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) { #else inet_ntop(af, our_s_addr, buf, 255); #endif - if(verb) mp_tmsg(MSGT_NETWORK,MSGL_STATUS,MSGTR_MPDEMUX_NW_ConnectingToServer, host, buf , port ); + if(verb) mp_tmsg(MSGT_NETWORK,MSGL_STATUS,"Connecting to server %s[%s]: %d...\n", host, buf , port ); // Turn the socket as non blocking so we can timeout on the connection #if !HAVE_WINSOCK2_H @@ -182,7 +182,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) { #else if( (WSAGetLastError() != WSAEINPROGRESS) && (WSAGetLastError() != WSAEWOULDBLOCK) ) { #endif - if(verb) mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_CantConnect2Server, af2String(af)); + if(verb) mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Failed to connect to server with %s\n", af2String(af)); closesocket(socket_server_fd); return TCP_ERROR_PORT; } @@ -195,7 +195,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) { while((ret = select(socket_server_fd+1, NULL, &set, NULL, &tv)) == 0) { if(count > 30 || stream_check_interrupt(500)) { if(count > 30) - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_ConnTimeout); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"connection timeout\n"); else mp_msg(MSGT_NETWORK,MSGL_V,"Connection interrupted by user\n"); return TCP_ERROR_TIMEOUT; @@ -206,7 +206,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) { tv.tv_sec = 0; tv.tv_usec = 500000; } - if (ret < 0) mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_SelectFailed); + if (ret < 0) mp_tmsg(MSGT_NETWORK,MSGL_ERR,"Select failed.\n"); // Turn back the socket as blocking #if !HAVE_WINSOCK2_H @@ -219,11 +219,11 @@ connect2Server_with_af(char *host, int port, int af,int verb) { err_len = sizeof(int); ret = getsockopt(socket_server_fd,SOL_SOCKET,SO_ERROR,&err,&err_len); if(ret < 0) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_GetSockOptFailed,strerror(errno)); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"getsockopt failed: %s\n",strerror(errno)); return TCP_ERROR_FATAL; } if(err > 0) { - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_NW_ConnectError,strerror(err)); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"connect error: %s\n",strerror(err)); return TCP_ERROR_PORT; } diff --git a/stream/tv.c b/stream/tv.c index ec67a171f1..6a54306bbe 100644 --- a/stream/tv.c +++ b/stream/tv.c @@ -83,7 +83,7 @@ static void tv_scan(tvi_handle_t *tvh) //Channel scanner without tuner is useless and causes crash due to uninitialized chanlist_s if (tvh->functions->control(tvh->priv, TVI_CONTROL_IS_TUNER, 0) != TVI_CONTROL_TRUE) { - mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TV_ScannerNotAvailableWithoutTuner); + mp_tmsg(MSGT_TV, MSGL_WARN, "Channel scanner is not available without tuner\n"); tvh->tv_param->scan=0; return; } @@ -220,7 +220,7 @@ static int norm_from_string(tvi_handle_t *tvh, char* norm) if(ret!=TVI_CONTROL_UNKNOWN) { - mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TV_BogusNormParameter, norm,"default"); + mp_tmsg(MSGT_TV, MSGL_WARN, "tv.c: norm_from_string(%s): Bogus norm parameter, setting %s.\n", norm,"default"); return 0; } @@ -239,7 +239,7 @@ static int norm_from_string(tvi_handle_t *tvh, char* norm) else if (!strcasecmp(norm, "ntscjp")) return TV_NORM_NTSCJP; else { - mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TV_BogusNormParameter, norm, "PAL"); + mp_tmsg(MSGT_TV, MSGL_WARN, "tv.c: norm_from_string(%s): Bogus norm parameter, setting %s.\n", norm, "PAL"); return TV_NORM_PAL; } } @@ -248,7 +248,7 @@ static void parse_channels(tvi_handle_t *tvh) { char** channels = tvh->tv_param->channels; - mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_ChannelNamesDetected); + mp_tmsg(MSGT_TV, MSGL_INFO, "TV channel names detected.\n"); tv_channel_list = malloc(sizeof(tv_channels_t)); tv_channel_list->index=1; tv_channel_list->next=NULL; @@ -288,7 +288,7 @@ static void parse_channels(tvi_handle_t *tvh) } } if (tv_channel_current->freq == 0) - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_NoFreqForChannel, + mp_tmsg(MSGT_TV, MSGL_ERR, "Couldn't find frequency for channel %s (%s)\n", tv_channel_current->number, tv_channel_current->name); else { sep = strchr(tv_channel_current->name, '-'); @@ -328,9 +328,9 @@ int tv_set_norm(tvi_handle_t *tvh, char* norm) { tvh->norm = norm_from_string(tvh, norm); - mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TV_SelectedNorm, norm); + mp_tmsg(MSGT_TV, MSGL_V, "Selected norm : %s\n", norm); if (tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tvh->norm) != TVI_CONTROL_TRUE) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_CannotSetNorm); + mp_tmsg(MSGT_TV, MSGL_ERR, "Error: Cannot set norm!\n"); return 0; } tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param); @@ -341,9 +341,9 @@ static int tv_set_norm_i(tvi_handle_t *tvh, int norm) { tvh->norm = norm; - mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TV_SelectedNormId, norm); + mp_tmsg(MSGT_TV, MSGL_V, "Selected norm id: %d\n", norm); if (tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tvh->norm) != TVI_CONTROL_TRUE) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_CannotSetNorm); + mp_tmsg(MSGT_TV, MSGL_ERR, "Error: Cannot set norm!\n"); return 0; } @@ -368,7 +368,7 @@ static int open_tv(tvi_handle_t *tvh) if (funcs->control(tvh->priv, TVI_CONTROL_IS_VIDEO, 0) != TVI_CONTROL_TRUE) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_NoVideoInputPresent); + mp_tmsg(MSGT_TV, MSGL_ERR, "Error: No video input present!\n"); return 0; } @@ -396,7 +396,14 @@ static int open_tv(tvi_handle_t *tvh) case IMGFMT_BGR15: break; default: - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_UnknownImageFormat,tvh->tv_param->outfmt); + mp_tmsg(MSGT_TV, MSGL_ERR, + "==================================================================\n"\ + " WARNING: UNTESTED OR UNKNOWN OUTPUT IMAGE FORMAT REQUESTED (0x%x)\n"\ + " This may cause buggy playback or program crash! Bug reports will\n"\ + " be ignored! You should try again with YV12 (which is the default\n"\ + " colorspace) and read the documentation!\n"\ + "==================================================================\n" + ,tvh->tv_param->outfmt); } funcs->control(tvh->priv, TVI_CONTROL_VID_SET_FORMAT, &tvh->tv_param->outfmt); } @@ -434,7 +441,7 @@ static int open_tv(tvi_handle_t *tvh) tvh->tv_param->height = 480/tvh->tv_param->decimation; } mp_tmsg(MSGT_TV, MSGL_INFO, - MSGTR_TV_MJP_WidthHeight, tvh->tv_param->width, tvh->tv_param->height); + " MJP: width %d height %d\n", tvh->tv_param->width, tvh->tv_param->height); } #endif @@ -452,7 +459,7 @@ static int open_tv(tvi_handle_t *tvh) funcs->control(tvh->priv, TVI_CONTROL_VID_SET_WIDTH, &tvh->tv_param->width); else { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_UnableToSetWidth, tvh->tv_param->width); + mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set requested width: %d\n", tvh->tv_param->width); funcs->control(tvh->priv, TVI_CONTROL_VID_GET_WIDTH, &tvh->tv_param->width); } } @@ -464,14 +471,14 @@ static int open_tv(tvi_handle_t *tvh) funcs->control(tvh->priv, TVI_CONTROL_VID_SET_HEIGHT, &tvh->tv_param->height); else { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_UnableToSetHeight, tvh->tv_param->height); + mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to set requested height: %d\n", tvh->tv_param->height); funcs->control(tvh->priv, TVI_CONTROL_VID_GET_HEIGHT, &tvh->tv_param->height); } } if (funcs->control(tvh->priv, TVI_CONTROL_IS_TUNER, 0) != TVI_CONTROL_TRUE) { - mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TV_NoTuner); + mp_tmsg(MSGT_TV, MSGL_WARN, "Selected input hasn't got a tuner!\n"); goto done; } @@ -487,15 +494,15 @@ static int open_tv(tvi_handle_t *tvh) } if (tvh->chanlist == -1) - mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TV_UnableFindChanlist, + mp_tmsg(MSGT_TV, MSGL_WARN, "Unable to find selected channel list! (%s)\n", tvh->tv_param->chanlist); else - mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TV_SelectedChanlist, + mp_tmsg(MSGT_TV, MSGL_V, "Selected channel list: %s (including %d channels)\n", chanlists[tvh->chanlist].name, chanlists[tvh->chanlist].count); if (tvh->tv_param->freq && tvh->tv_param->channel) { - mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TV_ChannelFreqParamConflict); + mp_tmsg(MSGT_TV, MSGL_WARN, "You can't set frequency and channel simultaneously!\n"); goto done; } @@ -537,7 +544,7 @@ static int open_tv(tvi_handle_t *tvh) tv_channel_current = tv_channel_current->next; } - mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3, tv_channel_current->number, + mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s - %s (freq: %.3f)\n", tv_channel_current->number, tv_channel_current->name, (float)tv_channel_current->freq/1000); tv_set_norm_i(tvh, tv_channel_current->norm); tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16)); @@ -552,14 +559,14 @@ static int open_tv(tvi_handle_t *tvh) funcs->control(tvh->priv, TVI_CONTROL_TUN_SET_FREQ, &freq); funcs->control(tvh->priv, TVI_CONTROL_TUN_GET_FREQ, &freq); - mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TV_SelectedFrequency, + mp_tmsg(MSGT_TV, MSGL_V, "Selected frequency: %lu (%.3f)\n", freq, (float)freq/16); } if (tvh->tv_param->channel) { struct CHANLIST cl; - mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TV_RequestedChannel, tvh->tv_param->channel); + mp_tmsg(MSGT_TV, MSGL_V, "Requested channel: %s\n", tvh->tv_param->channel); for (i = 0; i < chanlists[tvh->chanlist].count; i++) { cl = tvh->chanlist_s[i]; @@ -569,7 +576,7 @@ static int open_tv(tvi_handle_t *tvh) { strcpy(tv_channel_last_real, cl.name); tvh->channel = i; - mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel2, + mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s (freq: %.3f)\n", cl.name, (float)cl.freq/1000); tv_set_freq(tvh, (unsigned long)(((float)cl.freq/1000)*16)); break; @@ -607,7 +614,7 @@ static tvi_handle_t *tv_begin(tv_param_t* tv_param) int i; tvi_handle_t* h; if(tv_param->driver && !strcmp(tv_param->driver,"help")){ - mp_tmsg(MSGT_TV,MSGL_INFO,MSGTR_TV_AvailableDrivers); + mp_tmsg(MSGT_TV,MSGL_INFO,"Available drivers:\n"); for(i=0;tvi_driver_list[i];i++){ mp_msg(MSGT_TV,MSGL_INFO," %s\t%s",tvi_driver_list[i]->short_name,tvi_driver_list[i]->name); if(tvi_driver_list[i]->comment) @@ -628,7 +635,7 @@ static tvi_handle_t *tv_begin(tv_param_t* tv_param) continue; h->tv_param=tv_param; - mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_DriverInfo, tvi_driver_list[i]->short_name, + mp_tmsg(MSGT_TV, MSGL_INFO, "Selected driver: %s\n name: %s\n author: %s\n comment: %s\n", tvi_driver_list[i]->short_name, tvi_driver_list[i]->name, tvi_driver_list[i]->author, tvi_driver_list[i]->comment?tvi_driver_list[i]->comment:""); @@ -638,9 +645,9 @@ static tvi_handle_t *tv_begin(tv_param_t* tv_param) } if(tv_param->driver) - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_NoSuchDriver, tv_param->driver); + mp_tmsg(MSGT_TV, MSGL_ERR, "No such driver: %s\n", tv_param->driver); else - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_DriverAutoDetectionFailed); + mp_tmsg(MSGT_TV, MSGL_ERR, "TV driver autodetection failed.\n"); return NULL; } @@ -755,7 +762,7 @@ static demuxer_t* demux_open_tv(demuxer_t *demuxer) case AF_FORMAT_MPEG2: case AF_FORMAT_AC3: default: - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_UnsupportedAudioType, + mp_tmsg(MSGT_TV, MSGL_ERR, "Audio type '%s (%x)' unsupported!\n", af_fmt2str(audio_format, buf, 128), audio_format); goto no_audio; } @@ -785,7 +792,7 @@ static demuxer_t* demux_open_tv(demuxer_t *demuxer) sh_audio->wf->nBlockAlign = sh_audio->samplesize * sh_audio->channels; sh_audio->wf->nAvgBytesPerSec = sh_audio->i_bps; - mp_tmsg(MSGT_DECVIDEO, MSGL_V, MSGTR_TV_AudioFormat, + mp_tmsg(MSGT_DECVIDEO, MSGL_V, " TV audio: %d channels, %d bits, %d Hz\n", sh_audio->wf->nChannels, sh_audio->wf->wBitsPerSample, sh_audio->wf->nSamplesPerSec); @@ -841,7 +848,7 @@ int tv_set_color_options(tvi_handle_t *tvh, int opt, int value) case TV_COLOR_CONTRAST: return funcs->control(tvh->priv, TVI_CONTROL_VID_SET_CONTRAST, &value); default: - mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TV_UnknownColorOption, opt); + mp_tmsg(MSGT_TV, MSGL_WARN, "Unknown color option (%d) specified!\n", opt); } return TVI_CONTROL_UNKNOWN; @@ -862,7 +869,7 @@ int tv_get_color_options(tvi_handle_t *tvh, int opt, int* value) case TV_COLOR_CONTRAST: return funcs->control(tvh->priv, TVI_CONTROL_VID_GET_CONTRAST, value); default: - mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TV_UnknownColorOption, opt); + mp_tmsg(MSGT_TV, MSGL_WARN, "Unknown color option (%d) specified!\n", opt); } return TVI_CONTROL_UNKNOWN; @@ -873,7 +880,7 @@ int tv_get_freq(tvi_handle_t *tvh, unsigned long *freq) if (tvh->functions->control(tvh->priv, TVI_CONTROL_IS_TUNER, 0) == TVI_CONTROL_TRUE) { tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_GET_FREQ, freq); - mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TV_CurrentFrequency, + mp_tmsg(MSGT_TV, MSGL_V, "Current frequency: %lu (%.3f)\n", *freq, (float)*freq/16); } return 1; @@ -889,7 +896,7 @@ int tv_set_freq(tvi_handle_t *tvh, unsigned long freq) tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_SET_FREQ, &freq); tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_GET_FREQ, &freq); - mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TV_CurrentFrequency, + mp_tmsg(MSGT_TV, MSGL_V, "Current frequency: %lu (%.3f)\n", freq, (float)freq/16); } tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param); @@ -933,7 +940,7 @@ int tv_step_channel_real(tvi_handle_t *tvh, int direction) { strcpy(tv_channel_last_real, tvh->chanlist_s[tvh->channel].name); cl = tvh->chanlist_s[--tvh->channel]; - mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel2, + mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s (freq: %.3f)\n", cl.name, (float)cl.freq/1000); tv_set_freq(tvh, (unsigned long)(((float)cl.freq/1000)*16)); } @@ -945,7 +952,7 @@ int tv_step_channel_real(tvi_handle_t *tvh, int direction) { strcpy(tv_channel_last_real, tvh->chanlist_s[tvh->channel].name); cl = tvh->chanlist_s[++tvh->channel]; - mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel2, + mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s (freq: %.3f)\n", cl.name, (float)cl.freq/1000); tv_set_freq(tvh, (unsigned long)(((float)cl.freq/1000)*16)); } @@ -965,7 +972,7 @@ int tv_step_channel(tvi_handle_t *tvh, int direction) { tv_set_norm_i(tvh, tv_channel_current->norm); tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16)); - mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3, + mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s - %s (freq: %.3f)\n", tv_channel_current->number, tv_channel_current->name, (float)tv_channel_current->freq/1000); } if (direction == TV_CHANNEL_LOWER) { @@ -977,7 +984,7 @@ int tv_step_channel(tvi_handle_t *tvh, int direction) { tv_channel_current = tv_channel_current->next; tv_set_norm_i(tvh, tv_channel_current->norm); tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16)); - mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3, + mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s - %s (freq: %.3f)\n", tv_channel_current->number, tv_channel_current->name, (float)tv_channel_current->freq/1000); } } else tv_step_channel_real(tvh, direction); @@ -998,7 +1005,7 @@ int tv_set_channel_real(tvi_handle_t *tvh, char *channel) { if (!strcasecmp(cl.name, channel)) { tvh->channel = i; - mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel2, + mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s (freq: %.3f)\n", cl.name, (float)cl.freq/1000); tv_set_freq(tvh, (unsigned long)(((float)cl.freq/1000)*16)); break; @@ -1018,7 +1025,7 @@ int tv_set_channel(tvi_handle_t *tvh, char *channel) { for (i = 1; i < channel_int; i++) if (tv_channel_current->next) tv_channel_current = tv_channel_current->next; - mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3, tv_channel_current->number, + mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s - %s (freq: %.3f)\n", tv_channel_current->number, tv_channel_current->name, (float)tv_channel_current->freq/1000); tv_set_norm_i(tvh, tv_channel_current->norm); tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16)); @@ -1036,7 +1043,7 @@ int tv_last_channel(tvi_handle_t *tvh) { tv_channel_last = tv_channel_current; tv_channel_current = tmp; - mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3, tv_channel_current->number, + mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s - %s (freq: %.3f)\n", tv_channel_current->number, tv_channel_current->name, (float)tv_channel_current->freq/1000); tv_set_norm_i(tvh, tv_channel_current->norm); tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16)); @@ -1051,7 +1058,7 @@ int tv_last_channel(tvi_handle_t *tvh) { { strcpy(tv_channel_last_real, tvh->chanlist_s[tvh->channel].name); tvh->channel = i; - mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel2, + mp_tmsg(MSGT_TV, MSGL_INFO, "Selected channel: %s (freq: %.3f)\n", cl.name, (float)cl.freq/1000); tv_set_freq(tvh, (unsigned long)(((float)cl.freq/1000)*16)); break; @@ -1069,7 +1076,7 @@ int tv_step_norm(tvi_handle_t *tvh) tvh->norm = 0; if (tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tvh->norm) != TVI_CONTROL_TRUE) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_CannotSetNorm); + mp_tmsg(MSGT_TV, MSGL_ERR, "Error: Cannot set norm!\n"); return 0; } } diff --git a/stream/tvi_bsdbt848.c b/stream/tvi_bsdbt848.c index 04c9bac11a..07dd5861ee 100644 --- a/stream/tvi_bsdbt848.c +++ b/stream/tvi_bsdbt848.c @@ -233,7 +233,7 @@ static int control(priv_t *priv, int cmd, void *arg) { if(ioctl(priv->tunerfd, TVTUNER_GETFREQ, &priv->tunerfreq) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "TVTUNER_GETFREQ", strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "TVTUNER_GETFREQ", strerror(errno)); return TVI_CONTROL_FALSE; } @@ -247,7 +247,7 @@ static int control(priv_t *priv, int cmd, void *arg) if(ioctl(priv->tunerfd, TVTUNER_SETFREQ, &priv->tunerfreq) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "TVTUNER_SETFREQ", strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "TVTUNER_SETFREQ", strerror(errno)); return 0; } @@ -258,7 +258,7 @@ static int control(priv_t *priv, int cmd, void *arg) int status; if(ioctl(priv->tunerfd, TVTUNER_GETSTATUS, &status) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "GETSTATUS", strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "GETSTATUS", strerror(errno)); return 0; } *(int*)arg=(status & 0x02)? 100 : 0; @@ -274,7 +274,7 @@ static int control(priv_t *priv, int cmd, void *arg) { if(ioctl(priv->btfd, METEORGINPUT, &priv->input) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORGINPUT", strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORGINPUT", strerror(errno)); return TVI_CONTROL_FALSE; } @@ -288,7 +288,7 @@ static int control(priv_t *priv, int cmd, void *arg) if(ioctl(priv->btfd, METEORSINPUT, &priv->input) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSINPUT", strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSINPUT", strerror(errno)); return 0; } @@ -317,7 +317,7 @@ static int control(priv_t *priv, int cmd, void *arg) if(ioctl(priv->dspfd, SNDCTL_DSP_SPEED, &dspspeed) == -1) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848InvalidAudioRate, strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Invalid audio rate. Error: %s\n", strerror(errno)); return TVI_CONTROL_FALSE; } @@ -405,20 +405,20 @@ static int control(priv_t *priv, int cmd, void *arg) if(ioctl(priv->btfd, METEORSFMT, &priv->iformat) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSFMT", strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSFMT", strerror(errno)); return TVI_CONTROL_FALSE; } if(ioctl(priv->btfd, METEORSETGEO, &priv->geom) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSETGEO", strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSETGEO", strerror(errno)); return 0; } tmp_fps = priv->fps; if(ioctl(priv->btfd, METEORSFPS, &tmp_fps) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSFPS", strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSFPS", strerror(errno)); return 0; } @@ -426,7 +426,7 @@ static int control(priv_t *priv, int cmd, void *arg) if(priv->tunerready == TRUE && ioctl(priv->tunerfd, BT848_SAUDIO, &priv->tv_param->audio_id) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "BT848_SAUDIO", strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "BT848_SAUDIO", strerror(errno)); } #endif @@ -455,7 +455,7 @@ static int control(priv_t *priv, int cmd, void *arg) if(ioctl(priv->btfd, METEORSETGEO, &priv->geom) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorSettingWidth, strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Error setting picture width. Error: %s\n", strerror(errno)); return 0; } @@ -480,7 +480,7 @@ static int control(priv_t *priv, int cmd, void *arg) if(ioctl(priv->btfd, METEORSETGEO, &priv->geom) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorSettingWidth, strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Error setting picture width. Error: %s\n", strerror(errno)); return 0; } @@ -502,7 +502,7 @@ static int control(priv_t *priv, int cmd, void *arg) if(ioctl(priv->btfd, METEORSFPS, &priv->fps) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSFPS", strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSFPS", strerror(errno)); return 0; } @@ -553,33 +553,33 @@ priv->btfd = open(priv->btdev, O_RDONLY); if(priv->btfd < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorOpeningBktrDev, strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Unable to open bktr device. Error: %s\n", strerror(errno)); priv->videoready = FALSE; } if(priv->videoready == TRUE && ioctl(priv->btfd, METEORSFMT, &priv->iformat) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "SETEORSFMT", strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "SETEORSFMT", strerror(errno)); } if(priv->videoready == TRUE && ioctl(priv->btfd, METEORSINPUT, &priv->source) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSINPUT", strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSINPUT", strerror(errno)); } tmp_fps = priv->fps; if(priv->videoready == TRUE && ioctl(priv->btfd, METEORSFPS, &tmp_fps) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSFPS", strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSFPS", strerror(errno)); } if(priv->videoready == TRUE && ioctl(priv->btfd, METEORSETGEO, &priv->geom) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSGEQ", strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSGEQ", strerror(errno)); } if(priv->videoready == TRUE) @@ -591,7 +591,7 @@ if(priv->videoready == TRUE) if(priv->livebuf == (u_char *) MAP_FAILED) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848MmapFailed, strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: mmap failed. Error: %s\n", strerror(errno)); priv->videoready = FALSE; } @@ -601,7 +601,7 @@ if(priv->videoready == TRUE) if(priv->framebuf[count].buf == NULL) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848FrameBufAllocFailed, strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Frame buffer allocation failed. Error: %s\n", strerror(errno)); priv->videoready = FALSE; break; } @@ -619,7 +619,7 @@ priv->tunerfd = open(priv->tunerdev, O_RDONLY); if(priv->tunerfd < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorOpeningTunerDev, strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Unable to open tuner device. Error: %s\n", strerror(errno)); priv->tunerready = FALSE; } @@ -637,7 +637,7 @@ priv->dspframesize = priv->dspspeed*priv->dspsamplesize/8/priv->fps * if((priv->dspfd = open (priv->dspdev, O_RDONLY, 0)) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorOpeningDspDev, strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Unable to open dsp device. Error: %s\n", strerror(errno)); priv->dspready = FALSE; } @@ -645,7 +645,7 @@ marg = (256 << 16) | 12; if (ioctl(priv->dspfd, SNDCTL_DSP_SETFRAGMENT, &marg ) < 0 ) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "SNDCTL_DSP_SETFRAGMENT", strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "SNDCTL_DSP_SETFRAGMENT", strerror(errno)); priv->dspready = FALSE; } @@ -655,7 +655,7 @@ if((priv->dspready == TRUE) && (ioctl(priv->dspfd, SNDCTL_DSP_SPEED, &priv->dspspeed) == -1) || (ioctl(priv->dspfd, SNDCTL_DSP_SETFMT, &priv->dspfmt) == -1))) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorConfiguringDsp, strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Configuration of dsp failed. Error: %s\n", strerror(errno)); close(priv->dspfd); priv->dspready = FALSE; } @@ -680,7 +680,7 @@ marg = SIGUSR1; if(ioctl(priv->btfd, METEORSSIGNAL, &marg) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSSIGNAL", strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSSIGNAL", strerror(errno)); return 0; } @@ -694,7 +694,7 @@ marg = METEOR_CAP_CONTINOUS; if(ioctl(priv->btfd, METEORCAPTUR, &marg) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORCAPTUR", strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORCAPTUR", strerror(errno)); return 0; } @@ -711,7 +711,7 @@ marg = METEOR_SIG_MODE_MASK; if(ioctl( priv->btfd, METEORSSIGNAL, &marg) < 0 ) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSSIGNAL", strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSSIGNAL", strerror(errno)); return 0; } @@ -719,7 +719,7 @@ marg = METEOR_CAP_STOP_CONT; if(ioctl(priv->btfd, METEORCAPTUR, &marg) < 0 ) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848UnableToStopCapture, strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Unable to stop capture. Error: %s\n", strerror(errno)); return 0; } @@ -814,7 +814,7 @@ while(bytesread < len) if(ret == -1) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorReadingAudio, strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Error reading audio data. Error: %s\n", strerror(errno)); return 0; } @@ -854,7 +854,7 @@ if(priv->dspready == FALSE) return 0; #ifdef CONFIG_SUN_AUDIO if(ioctl(priv->dspfd, AUDIO_GETINFO, &auinf) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "AUDIO_GETINFO", strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "AUDIO_GETINFO", strerror(errno)); return TVI_CONTROL_FALSE; } else @@ -862,7 +862,7 @@ else #else if(ioctl(priv->dspfd, FIONREAD, &bytesavail) < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "FIONREAD", strerror(errno)); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "FIONREAD", strerror(errno)); return TVI_CONTROL_FALSE; } #endif diff --git a/stream/tvi_dshow.c b/stream/tvi_dshow.c index 1e996890d0..b474809aa9 100644 --- a/stream/tvi_dshow.c +++ b/stream/tvi_dshow.c @@ -1042,10 +1042,10 @@ static HRESULT set_nearest_freq(priv_t * priv, long lFreq) if (load_freq_table(chanlist2country(priv->tv_param->chanlist), tunerInput, &(priv->freq_table), &(priv->freq_table_len), &(priv->first_channel)) != S_OK) {//FIXME priv->freq_table_len=0; priv->freq_table=NULL; - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_UnableExtractFreqTable); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Unable to load frequency table from kstvtune.ax\n"); return E_FAIL; }; - mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_FreqTableLoaded, tunerInput == TunerInputAntenna ? "broadcast" : "cable", + mp_tmsg(MSGT_TV, MSGL_V, "tvi_dshow: loaded system (%s) frequency table for country id=%d (channels:%d).\n", tunerInput == TunerInputAntenna ? "broadcast" : "cable", chanlist2country(priv->tv_param->chanlist), priv->freq_table_len); } @@ -1062,14 +1062,14 @@ static HRESULT set_nearest_freq(priv_t * priv, long lFreq) mp_msg(MSGT_TV, MSGL_DBG4, "tvi_dshow: set_nearest_freq #%d (%ld) => %d (%ld)\n",i+priv->first_channel,priv->freq_table[i], nChannel,lFreqDiff); } if (nChannel == -1) { - mp_tmsg(MSGT_TV,MSGL_ERR, MSGTR_TVI_DS_UnableFindNearestChannel); + mp_tmsg(MSGT_TV,MSGL_ERR, "tvi_dshow: Unable to find nearest channel in system frequency table\n"); return E_FAIL; } mp_msg(MSGT_TV, MSGL_V, "tvi_dshow: set_nearest_freq #%d (%ld)\n",nChannel,priv->freq_table[nChannel - priv->first_channel]); hr = OLE_CALL_ARGS(priv->pTVTuner, put_Channel, nChannel, AMTUNER_SUBCHAN_DEFAULT, AMTUNER_SUBCHAN_DEFAULT); if (FAILED(hr)) { - mp_tmsg(MSGT_TV,MSGL_ERR,MSGTR_TVI_DS_UnableToSetChannel, (unsigned int)hr); + mp_tmsg(MSGT_TV,MSGL_ERR,"tvi_dshow: Unable to switch to nearest channel from system frequency table. Error:0x%x\n", (unsigned int)hr); return E_FAIL; } return S_OK; @@ -1096,7 +1096,7 @@ static int set_frequency(priv_t * priv, long lFreq) if (priv->direct_setfreq_call) { //using direct call to set frequency hr = set_frequency_direct(priv->pTVTuner, lFreq); if (FAILED(hr)) { - mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_DirectSetFreqFailed); + mp_tmsg(MSGT_TV, MSGL_V, "tvi_dshow: Unable to set frequency directly. OS built-in channels table will be used.\n"); priv->direct_setfreq_call = 0; } } @@ -1171,7 +1171,7 @@ static int get_frequency(priv_t * priv, long *plFreq) if (priv->direct_getfreq_call) { //using direct call to get frequency hr = get_frequency_direct(priv->pTVTuner, plFreq); if (FAILED(hr)) { - mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TVI_DS_DirectGetFreqFailed); + mp_tmsg(MSGT_TV, MSGL_INFO, "tvi_dshow: Unable to get frequency directly. OS built-in channels table will be used.\n"); priv->direct_getfreq_call = 0; } } @@ -1205,7 +1205,7 @@ static void get_capabilities(priv_t * priv) mp_msg(MSGT_TV, MSGL_DBG4, "tvi_dshow: get_capabilities called\n"); if (priv->pTVTuner) { - mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_SupportedNorms); + mp_tmsg(MSGT_TV, MSGL_V, "tvi_dshow: supported norms:"); hr = OLE_CALL_ARGS(priv->pTVTuner, get_AvailableTVFormats, &lAvailableFormats); if (FAILED(hr)) @@ -1229,7 +1229,7 @@ static void get_capabilities(priv_t * priv) tv_available_inputs = (long *) malloc(sizeof(long) * lInputPins); tv_available_inputs_count = 0; - mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_AvailableVideoInputs); + mp_tmsg(MSGT_TV, MSGL_V, "tvi_dshow: available video inputs:"); for (i = 0; i < lInputPins; i++) { OLE_CALL_ARGS(priv->pCrossbar, get_CrossbarPinInfo, 1, i, &lRelated, &lPhysicalType); @@ -1250,7 +1250,7 @@ static void get_capabilities(priv_t * priv) hr = OLE_CALL_ARGS(priv->chains[1]->pCaptureFilter, EnumPins, &pEnum); if (FAILED(hr)) return; - mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_AvailableAudioInputs); + mp_tmsg(MSGT_TV, MSGL_V, "tvi_dshow: available audio inputs:"); i = 0; while (OLE_CALL_ARGS(pEnum, Next, 1, &pPin, NULL) == S_OK) { memset(&pi, 0, sizeof(pi)); @@ -1272,7 +1272,7 @@ static void get_capabilities(priv_t * priv) else OLE_CALL_ARGS(pIAMixer, put_MixLevel, 1.0); #endif - mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_InputSelected); + mp_tmsg(MSGT_TV, MSGL_V, "(selected)"); } else { OLE_CALL_ARGS(pIAMixer, put_Enable, FALSE); #if 0 @@ -1417,7 +1417,7 @@ static HRESULT build_sub_graph(priv_t * priv, chain_t * chain, const GUID* ppin_ hr = OLE_CALL_ARGS(chain->pCapturePin, ConnectionMediaType, chain->pmt); if(FAILED(hr)) { - mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TVI_DS_GetActualMediatypeFailed, (unsigned int)hr); + mp_tmsg(MSGT_TV, MSGL_WARN, "tvi_dshow: Unable to get actual mediatype (Error:0x%x). Assuming equal to requested.\n", (unsigned int)hr); } if(priv->tv_param->hidden_video_renderer){ @@ -1531,7 +1531,7 @@ static int set_crossbar_input(priv_t * priv, int input) //connecting given input with video decoder hr = OLE_CALL_ARGS(priv->pCrossbar, Route, nVideoDecoder, lInput); if (hr != S_OK) { - mp_tmsg(MSGT_TV,MSGL_ERR,MSGTR_TVI_DS_UnableConnectInputVideoDecoder, (unsigned int)hr); + mp_tmsg(MSGT_TV,MSGL_ERR,"Unable to connect given input to video decoder. Error:0x%x\n", (unsigned int)hr); return TVI_CONTROL_FALSE; } } @@ -1539,7 +1539,7 @@ static int set_crossbar_input(priv_t * priv, int input) hr = OLE_CALL_ARGS(priv->pCrossbar, Route, nAudioDecoder, lInputRelated); if (hr != S_OK) { - mp_tmsg(MSGT_TV,MSGL_ERR,MSGTR_TVI_DS_UnableConnectInputAudioDecoder, (unsigned int)hr); + mp_tmsg(MSGT_TV,MSGL_ERR,"Unable to connect given input to audio decoder. Error:0x%x\n", (unsigned int)hr); return TVI_CONTROL_FALSE; } } @@ -1943,11 +1943,11 @@ static IBaseFilter *find_capture_device(int index, REFCLSID category) OLE_CALL(pClassEnum,Reset); for (i = 0; OLE_CALL_ARGS(pClassEnum, Next, 1, &pM, &cFetched) == S_OK; i++) { if(get_device_name(pM, tmp, DEVICE_NAME_MAX_LEN)!=TVI_CONTROL_TRUE) - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_UnableGetDeviceName, i); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Unable to get name for device #%d\n", i); else - mp_tmsg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_DeviceName, i, tmp); + mp_tmsg(MSGT_TV, MSGL_V, "tvi_dshow: Device #%d: %s\n", i, tmp); if (index != -1 && i == index) { - mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TVI_DS_UsingDevice, index, tmp); + mp_tmsg(MSGT_TV, MSGL_INFO, "tvi_dshow: Using device #%d: %s\n", index, tmp); hr = OLE_CALL_ARGS(pM, BindToObject, 0, 0, &IID_IBaseFilter,(void *) &pFilter); if (FAILED(hr)) pFilter = NULL; @@ -1955,7 +1955,7 @@ static IBaseFilter *find_capture_device(int index, REFCLSID category) OLE_RELEASE_SAFE(pM); } if (index != -1 && !pFilter) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_DeviceNotFound, + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Device #%d not found\n", index); } OLE_RELEASE_SAFE(pClassEnum); @@ -2011,7 +2011,7 @@ static HRESULT get_available_formats_stream(chain_t *chain) return E_FAIL; } } else { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_UnsupportedMediaType,"get_available_formats_stream"); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Unsupported media type passed to %s\n","get_available_formats_stream"); return E_FAIL; } done = 0; @@ -2106,7 +2106,7 @@ static HRESULT get_available_formats_pin(ICaptureGraphBuilder2 * pBuilder, } else if (chain->type == audio) { size = sizeof(AUDIO_STREAM_CONFIG_CAPS); } else { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_UnsupportedMediaType,"get_available_formats_pin"); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Unsupported media type passed to %s\n","get_available_formats_pin"); return E_FAIL; } @@ -2470,7 +2470,7 @@ static HRESULT build_video_chain(priv_t *priv) if (priv->chains[0]->pStreamConfig) { hr = OLE_CALL_ARGS(priv->chains[0]->pStreamConfig, SetFormat, priv->chains[0]->pmt); if (FAILED(hr)) { - mp_tmsg(MSGT_TV,MSGL_ERR,MSGTR_TVI_DS_UnableSelectVideoFormat, (unsigned int)hr); + mp_tmsg(MSGT_TV,MSGL_ERR,"tvi_dshow: Unable to select video format. Error:0x%x\n", (unsigned int)hr); } } @@ -2487,7 +2487,7 @@ static HRESULT build_video_chain(priv_t *priv) priv->chains[0]->rbuf->buffersize *= 1024 * 1024; hr=build_sub_graph(priv, priv->chains[0], &PIN_CATEGORY_CAPTURE); if(FAILED(hr)){ - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_UnableBuildVideoSubGraph,(unsigned int)hr); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Unable to build video chain of capture graph. Error:0x%x\n",(unsigned int)hr); return hr; } return S_OK; @@ -2513,7 +2513,7 @@ static HRESULT build_audio_chain(priv_t *priv) hr = OLE_CALL_ARGS(priv->chains[1]->pStreamConfig, SetFormat, priv->chains[1]->pmt); if (FAILED(hr)) { - mp_tmsg(MSGT_TV,MSGL_ERR,MSGTR_TVI_DS_UnableSelectAudioFormat, (unsigned int)hr); + mp_tmsg(MSGT_TV,MSGL_ERR,"tvi_dshow: Unable to select audio format. Error:0x%x\n", (unsigned int)hr); } } @@ -2530,7 +2530,7 @@ static HRESULT build_audio_chain(priv_t *priv) hr=build_sub_graph(priv, priv->chains[1],&PIN_CATEGORY_CAPTURE); if(FAILED(hr)){ - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_UnableBuildAudioSubGraph,(unsigned int)hr); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Unable to build audio chain of capture graph. Error:0x%x\n",(unsigned int)hr); return 0; } } @@ -2561,7 +2561,7 @@ static HRESULT build_vbi_chain(priv_t *priv) hr=build_sub_graph(priv, priv->chains[2],&PIN_CATEGORY_VBI); if(FAILED(hr)){ - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_UnableBuildVBISubGraph,(unsigned int)hr); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Unable to build VBI chain of capture graph. Error:0x%x\n",(unsigned int)hr); return 0; } } @@ -2603,12 +2603,12 @@ static int start(priv_t * priv) mp_msg(MSGT_TV, MSGL_DBG2, "Debug pause end\n"); } if (!priv->pMediaControl) { - mp_tmsg(MSGT_TV,MSGL_ERR,MSGTR_TVI_DS_UnableGetMediaControlInterface,(unsigned int)E_POINTER); + mp_tmsg(MSGT_TV,MSGL_ERR,"tvi_dshow: Unable to get IMediaControl interface. Error:0x%x\n",(unsigned int)E_POINTER); return 0; } hr = OLE_CALL(priv->pMediaControl, Run); if (FAILED(hr)) { - mp_tmsg(MSGT_TV,MSGL_ERR,MSGTR_TVI_DS_UnableStartGraph, (unsigned int)hr); + mp_tmsg(MSGT_TV,MSGL_ERR,"tvi_dshow: Unable to start graph! Error:0x%x\n", (unsigned int)hr); return 0; } mp_msg(MSGT_TV, MSGL_DBG2, "tvi_dshow: Graph is started.\n"); @@ -2681,7 +2681,7 @@ static int init(priv_t * priv) mp_msg(MSGT_TV, MSGL_DBG2, "tvi_dshow: Searching for available video capture devices\n"); priv->chains[0]->pCaptureFilter = find_capture_device(priv->dev_index, &CLSID_VideoInputDeviceCategory); if(!priv->chains[0]->pCaptureFilter){ - mp_tmsg(MSGT_TV,MSGL_ERR, MSGTR_TVI_DS_NoVideoCaptureDevice); + mp_tmsg(MSGT_TV,MSGL_ERR, "tvi_dshow: Unable to find video capture device\n"); break; } hr = OLE_CALL_ARGS(priv->pGraph, AddFilter, priv->chains[0]->pCaptureFilter, NULL); @@ -2693,7 +2693,7 @@ static int init(priv_t * priv) if (priv->adev_index != -1) { priv->chains[1]->pCaptureFilter = find_capture_device(priv->adev_index, &CLSID_AudioInputDeviceCategory); //output available audio edevices if(!priv->chains[1]->pCaptureFilter){ - mp_tmsg(MSGT_TV,MSGL_ERR, MSGTR_TVI_DS_NoAudioCaptureDevice); + mp_tmsg(MSGT_TV,MSGL_ERR, "tvi_dshow: Unable to find audio capture device\n"); break; } @@ -2713,7 +2713,7 @@ static int init(priv_t * priv) mp_msg(MSGT_TV, MSGL_DBG2, "tvi_dshow: Get IID_IAMVideoProcAmp failed (0x%x).\n", (unsigned int)hr); if (hr != S_OK) { - mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TVI_DS_VideoAdjustigNotSupported); + mp_tmsg(MSGT_TV, MSGL_INFO, "tvi_dshow: Adjusting of brightness/hue/saturation/contrast is not supported by device\n"); priv->pVideoProcAmp = NULL; } @@ -2723,7 +2723,7 @@ static int init(priv_t * priv) priv->chains[0]->pCaptureFilter, &IID_IAMCrossbar, (void **) &(priv->pCrossbar)); if (FAILED(hr)) { - mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TVI_DS_SelectingInputNotSupported); + mp_tmsg(MSGT_TV, MSGL_INFO, "tvi_dshow: Selection of capture source is not supported by device\n"); priv->pCrossbar = NULL; } @@ -2749,7 +2749,7 @@ static int init(priv_t * priv) } OLE_RELEASE_SAFE(pTVAudio); if (FAILED(hr)) - mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TVI_DS_UnableSetAudioMode, priv->tv_param->amode,(unsigned int)hr); + mp_tmsg(MSGT_TV, MSGL_WARN, "tvi_dshow: Unable to set audio mode %d. Error:0x%x\n", priv->tv_param->amode,(unsigned int)hr); } } @@ -2787,19 +2787,19 @@ static int init(priv_t * priv) } if (!priv->chains[0]->pStreamConfig) - mp_tmsg(MSGT_TV, MSGL_INFO, MSGTR_TVI_DS_ChangingWidthHeightNotSupported); + mp_tmsg(MSGT_TV, MSGL_INFO, "tvi_dshow: Changing video width/height is not supported by device.\n"); if (!priv->chains[0]->arpmt[priv->chains[0]->nFormatUsed] || !extract_video_format(priv->chains[0]->arpmt[priv->chains[0]->nFormatUsed], &(priv->fcc), &(priv->width), &(priv->height))) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_ErrorParsingVideoFormatStruct); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Unable to parse video format structure.\n"); break; } if (priv->chains[1]->arpmt[priv->chains[1]->nFormatUsed]) { if (!extract_audio_format(priv->chains[1]->pmt, &(priv->samplerate), NULL, NULL)) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_ErrorParsingAudioFormatStruct); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Unable to parse audio format structure.\n"); DisplayMediaType("audio format failed",priv->chains[1]->arpmt[priv->chains[1]->nFormatUsed]); break; } @@ -2807,7 +2807,7 @@ static int init(priv_t * priv) hr = OLE_QUERYINTERFACE(priv->pGraph, IID_IMediaControl,priv->pMediaControl); if(FAILED(hr)){ - mp_tmsg(MSGT_TV,MSGL_ERR, MSGTR_TVI_DS_UnableGetMediaControlInterface,(unsigned int)hr); + mp_tmsg(MSGT_TV,MSGL_ERR, "tvi_dshow: Unable to get IMediaControl interface. Error:0x%x\n",(unsigned int)hr); break; } hr = OLE_CALL_ARGS(priv->pBuilder, FindInterface, @@ -2867,7 +2867,7 @@ static int init(priv_t * priv) OLE_RELEASE_SAFE(pVPOutPin); if (FAILED(hr)) { - mp_tmsg(MSGT_TV,MSGL_ERR, MSGTR_TVI_DS_UnableTerminateVPPin, (unsigned int)hr); + mp_tmsg(MSGT_TV,MSGL_ERR, "tvi_dshow: Unable to terminate VideoPort pin with any filter in graph. Error:0x%x\n", (unsigned int)hr); break; } } @@ -2909,7 +2909,7 @@ static int init(priv_t * priv) } while(0); if (!result){ - mp_tmsg(MSGT_TV,MSGL_ERR, MSGTR_TVI_DS_GraphInitFailure); + mp_tmsg(MSGT_TV,MSGL_ERR, "tvi_dshow: Directshow graph initialization failure.\n"); uninit(priv); } return result; @@ -3041,12 +3041,12 @@ static tvi_handle_t *tvi_init_dshow(tv_param_t* tv_param) if (sscanf(tv_param->device, "%d", &a) == 1) { priv->dev_index = a; } else { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_WrongDeviceParam, tv_param->device); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Wrong device parameter: %s\n", tv_param->device); free_handle(h); return NULL; } if (priv->dev_index < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_WrongDeviceIndex, a); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Wrong device index: %d\n", a); free_handle(h); return NULL; } @@ -3055,12 +3055,12 @@ static tvi_handle_t *tvi_init_dshow(tv_param_t* tv_param) if (sscanf(tv_param->adevice, "%d", &a) == 1) { priv->adev_index = a; } else { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_WrongADeviceParam, tv_param->adevice); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Wrong adevice parameter: %s\n", tv_param->adevice); free_handle(h); return NULL; } if (priv->dev_index < 0) { - mp_tmsg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_WrongADeviceIndex, a); + mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_dshow: Wrong adevice index: %d\n", a); free_handle(h); return NULL; } @@ -3320,7 +3320,7 @@ static int control(priv_t * priv, int cmd, void *arg) break; if (!priv->chains[1]->arpmt[i]) { //request not found. failing back to first available - mp_tmsg(MSGT_TV, MSGL_WARN, MSGTR_TVI_DS_SamplerateNotsupported, samplerate); + mp_tmsg(MSGT_TV, MSGL_WARN, "tvi_dshow: Samplerate %d is not supported by device. Failing back to first available.\n", samplerate); i = 0; } if (priv->chains[1]->pmt) diff --git a/stream/tvi_vbi.c b/stream/tvi_vbi.c index 8000c3e3e4..85f3d6f3c6 100644 --- a/stream/tvi_vbi.c +++ b/stream/tvi_vbi.c @@ -810,7 +810,7 @@ static void prepare_visible_page(priv_vbi_t* priv){ curr_pg=get_from_cache(priv,priv->curr_pagenum, get_subpagenum_from_cache(priv,priv->curr_pagenum)); if (!pg && !curr_pg){ - p=_(MSGTR_TV_NoTeletext); + p=_("No teletext"); for(i=0;i<VBI_COLUMNS && *p;i++){ GET_UTF8(priv->display_page[i].unicode,*p++,break;); } @@ -1664,7 +1664,7 @@ int teletext_control(void* p, int cmd, void *arg) priv->subpagenum=0x3f7f; pll_reset(priv,fine_tune); if(tv_param->tlang==-1){ - mp_tmsg(MSGT_TV,MSGL_INFO,MSGTR_TV_TTSupportedLanguages); + mp_tmsg(MSGT_TV,MSGL_INFO,"Supported Teletext languages:\n"); for(i=0; tt_languages[i].lang_code; i++){ mp_msg(MSGT_TV,MSGL_INFO," %3d %s\n", tt_languages[i].lang_code, tt_languages[i].lang_name); @@ -1677,7 +1677,7 @@ int teletext_control(void* p, int cmd, void *arg) break; } if (priv->primary_language!=tt_languages[i].lang_code){ - mp_tmsg(MSGT_TV,MSGL_INFO,MSGTR_TV_TTSelectedLanguage, + mp_tmsg(MSGT_TV,MSGL_INFO,"Selected default teletext language: %s\n", tt_languages[i].lang_name); priv->primary_language=tt_languages[i].lang_code; } diff --git a/stream/url.c b/stream/url.c index dbbec1a0e9..b262f9b2cc 100644 --- a/stream/url.c +++ b/stream/url.c @@ -54,19 +54,19 @@ url_new(const char* url) { if( url==NULL ) return NULL; if (strlen(url) > (SIZE_MAX / 3 - 1)) { - mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed); + mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n"); goto err_out; } escfilename=malloc(strlen(url)*3+1); if (!escfilename ) { - mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed); + mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n"); goto err_out; } // Create the URL container Curl = malloc(sizeof(URL_t)); if( Curl==NULL ) { - mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed); + mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n"); goto err_out; } @@ -78,7 +78,7 @@ url_new(const char* url) { // Copy the url in the URL container Curl->url = strdup(escfilename); if( Curl->url==NULL ) { - mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed); + mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n"); goto err_out; } mp_msg(MSGT_OPEN,MSGL_V,"Filename for url is now %s\n",escfilename); @@ -98,7 +98,7 @@ url_new(const char* url) { pos1 = ptr1-escfilename; Curl->protocol = malloc(pos1+1); if( Curl->protocol==NULL ) { - mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed); + mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n"); goto err_out; } strncpy(Curl->protocol, escfilename, pos1); @@ -120,7 +120,7 @@ url_new(const char* url) { int len = ptr2-ptr1; Curl->username = malloc(len+1); if( Curl->username==NULL ) { - mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed); + mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n"); goto err_out; } strncpy(Curl->username, ptr1, len); @@ -133,7 +133,7 @@ url_new(const char* url) { Curl->username[ptr3-ptr1]='\0'; Curl->password = malloc(len2+1); if( Curl->password==NULL ) { - mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed); + mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n"); goto err_out; } strncpy( Curl->password, ptr3+1, len2); @@ -185,7 +185,7 @@ url_new(const char* url) { // copy the hostname in the URL container Curl->hostname = malloc(pos2-pos1+1); if( Curl->hostname==NULL ) { - mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed); + mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n"); goto err_out; } strncpy(Curl->hostname, ptr1, pos2-pos1); @@ -200,7 +200,7 @@ url_new(const char* url) { // copy the path/filename in the URL container Curl->file = strdup(ptr2); if( Curl->file==NULL ) { - mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed); + mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n"); goto err_out; } } @@ -209,7 +209,7 @@ url_new(const char* url) { if( Curl->file==NULL ) { Curl->file = malloc(2); if( Curl->file==NULL ) { - mp_tmsg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed); + mp_tmsg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed.\n"); goto err_out; } strcpy(Curl->file, "/"); @@ -287,7 +287,7 @@ url_escape_string_part(char *outbuf, const char *inbuf) { *outbuf++=c; // already // dont escape again - mp_tmsg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_URL_StringAlreadyEscaped,c,c1,c2); + mp_tmsg(MSGT_NETWORK,MSGL_ERR,"String appears to be already escaped in url_escape %c%c1%c2\n",c,c1,c2); // error as this should not happen against RFC 2396 // to escape a string twice } else { |