1
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 07:33:46 +01:00

Translation system changes part 2: replace macros by strings

Replace all MSGTR_ macros in the source by the corresponding English
string.
This commit is contained in:
Amar Takhar 2009-07-07 01:15:02 +03:00 committed by Uoti Urpala
parent b5972d6f14
commit e306174952
151 changed files with 1770 additions and 1515 deletions

View File

@ -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;
}

144
command.c
View File

@ -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) {

18
edl.c
View File

@ -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;
}

View File

@ -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;

View File

@ -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));
}
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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{

View File

@ -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;
}

View File

@ -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, &params)) < 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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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");
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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++){

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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);

View File

@ -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;
}

View File

@ -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);

View File

@ -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;
}

View File

@ -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 {

View File

@ -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");

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);
}

View File

@ -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))

View File

@ -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;

View File

@ -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

View File

@ -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;
}

View File

@ -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));

View File

@ -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
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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'));

View File

@ -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
}
}

View File

@ -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)

View File

@ -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){

View File

@ -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);

View File

@ -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);

View File

@ -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;}
}

View File

@ -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;
}
}

View File

@ -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;
}

View File

@ -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;}
}

View File

@ -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;
}
}

View File

@ -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;
}

View File

@ -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 */

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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);

View File

@ -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);
}
}
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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");
}
}

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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++;
}

View File

@ -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++;

View File

@ -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 {

View File

@ -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++)
{

View File

@ -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++;

View File

@ -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;

View File

@ -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){

View File

@ -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
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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[] ={ "", "|>", "||", "[]", "<<" , ">>", "", "", "", "", "", "", "" };

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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) {

View File

@ -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;

View File

@ -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;
}

Some files were not shown because too many files have changed in this diff Show More