[Mplayer-cvslog] CVS: main codec-cfg.c,1.110,1.111
Diego Biurrun CVS
syncmail at mplayerhq.hu
Tue Oct 12 13:29:24 CEST 2004
CVS change done by Diego Biurrun CVS
Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv32374
Modified Files:
codec-cfg.c
Log Message:
Translatable messages moved to help_mp-en.h.
patch by The Wanderer <inverseparadox at comcast dot net>
Index: codec-cfg.c
===================================================================
RCS file: /cvsroot/mplayer/main/codec-cfg.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -r1.110 -r1.111
--- codec-cfg.c 28 Apr 2004 10:18:32 -0000 1.110
+++ codec-cfg.c 12 Oct 2004 11:29:20 -0000 1.111
@@ -26,6 +26,8 @@
#include "config.h"
#include "mp_msg.h"
+#include "help_mp.h"
+
// for mmioFOURCC:
#include "libmpdemux/aviheader.h"
@@ -80,13 +82,13 @@
goto err_out_parse_error;
return 1;
err_out_duplicated:
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"duplicated FourCC");
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_DuplicateFourcc);
return 0;
err_out_too_many:
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"too many FourCCs/formats...");
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_TooManyFourccs);
return 0;
err_out_parse_error:
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"parse error");
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_ParseError);
return 0;
}
@@ -99,20 +101,20 @@
for (i = 0; i < CODECS_MAX_FOURCC && fourcc[i] != 0xffffffff; i++)
/* NOTHING */;
if (i == CODECS_MAX_FOURCC) {
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"too many FourCCs/formats...");
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_TooManyFourccs);
return 0;
}
fourcc[i]=strtoul(s,&endptr,0);
if (*endptr != '\0') {
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"parse error (format ID not a number?)");
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_ParseErrorFIDNotNumber);
return 0;
}
if(alias){
fourccmap[i]=strtoul(alias,&endptr,0);
if (*endptr != '\0') {
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"parse error (format ID alias not a number?)");
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_ParseErrorFIDAliasNotNumber);
return 0;
}
} else
@@ -120,7 +122,7 @@
for (j = 0; j < i; j++)
if (fourcc[j] == fourcc[i]) {
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"duplicated format ID");
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_DuplicateFID);
return 0;
}
@@ -232,10 +234,10 @@
return 1;
err_out_too_many:
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"too many out...");
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_TooManyOut);
return 0;
err_out_parse_error:
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"parse error");
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_ParseError);
return 0;
}
@@ -318,7 +320,7 @@
/* NOTHING */;
if (i < strlen(tmp_name)) {
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"\ncodec(%s) name is not valid!\n", c->name);
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_InvalidCodecName, c->name);
return 0;
}
@@ -327,13 +329,13 @@
#if 0
if (c->fourcc[0] == 0xffffffff) {
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"\ncodec(%s) does not have FourCC/format!\n", c->name);
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecLacksFourcc, c->name);
return 0;
}
/* XXX fix this: shitty with 'null' codec */
if (!c->driver) {
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"\ncodec(%s) does not have a driver!\n", c->name);
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecLacksDriver, c->name);
return 0;
}
#endif
@@ -343,7 +345,7 @@
#warning HOL VANNAK DEFINIALVA????????????
if (!c->dll && (c->driver == 4 ||
(c->driver == 2 && type == TYPE_VIDEO))) {
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"\ncodec(%s) needs a 'dll'!\n", c->name);
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecNeedsDLL, c->name);
return 0;
}
#warning guid.f1 lehet 0? honnan lehet tudni, hogy nem adtak meg?
@@ -351,7 +353,7 @@
if (type == TYPE_VIDEO)
if (c->outfmt[0] == 0xffffffff) {
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"\ncodec(%s) needs an 'outfmt'!\n", c->name);
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecNeedsOutfmt, c->name);
return 0;
}
#endif
@@ -369,7 +371,7 @@
(*d)[pos++] = '\n';
}
if (!(*d = (char *) realloc(*d, pos + strlen(s) + 1))) {
- mp_msg(MSGT_CODECCFG,MSGL_FATAL,"Can't allocate memory for comment. ");
+ mp_msg(MSGT_CODECCFG,MSGL_FATAL,MSGTR_CantAllocateComment);
return 0;
}
strcpy(*d + pos, s);
@@ -418,7 +420,7 @@
char c;
if (max >= MAX_NR_TOKEN) {
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"get_token(): max >= MAX_NR_TOKEN!");
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN);
goto out_eof;
}
@@ -506,15 +508,15 @@
#endif
}
- mp_msg(MSGT_CODECCFG,MSGL_INFO,"Reading %s: ", cfgfile);
+ mp_msg(MSGT_CODECCFG,MSGL_INFO,MSGTR_ReadingFile, cfgfile);
if ((fp = fopen(cfgfile, "r")) == NULL) {
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"Can't open '%s': %s\n", cfgfile, strerror(errno));
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CantOpenFileError, cfgfile, strerror(errno));
return 0;
}
if ((line = (char *) malloc(MAX_LINE_LEN + 1)) == NULL) {
- mp_msg(MSGT_CODECCFG,MSGL_FATAL,"Can't get memory for 'line': %s\n", strerror(errno));
+ mp_msg(MSGT_CODECCFG,MSGL_FATAL,MSGTR_CantGetMemoryForLine, strerror(errno));
return 0;
}
read_nextline = 1;
@@ -572,7 +574,7 @@
}
if (!(*codecsp = (codecs_t *) realloc(*codecsp,
sizeof(codecs_t) * (*nr_codecsp + 2)))) {
- mp_msg(MSGT_CODECCFG,MSGL_FATAL,"Can't realloc '*codecsp': %s\n", strerror(errno));
+ mp_msg(MSGT_CODECCFG,MSGL_FATAL,MSGTR_CantReallocCodecsp, strerror(errno));
goto err_out;
}
codec=*codecsp + *nr_codecsp;
@@ -587,19 +589,19 @@
for (i = 0; i < *nr_codecsp - 1; i++) {
if(( (*codecsp)[i].name!=NULL) &&
(!strcmp(token[0], (*codecsp)[i].name)) ) {
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"Codec name '%s' isn't unique.", token[0]);
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecNameNotUnique, token[0]);
goto err_out_print_linenum;
}
}
if (!(codec->name = strdup(token[0]))) {
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"Can't strdup -> 'name': %s\n", strerror(errno));
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CantStrdupName, 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_msg(MSGT_CODECCFG,MSGL_ERR,"Can't strdup -> 'info': %s\n", strerror(errno));
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CantStrdupInfo, strerror(errno));
goto err_out;
}
} else if (!strcmp(token[0], "comment")) {
@@ -623,14 +625,14 @@
if (get_token(1, 1) < 0)
goto err_out_parse_error;
if (!(codec->drv = strdup(token[0]))) {
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"Can't strdup -> 'driver': %s\n", strerror(errno));
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CantStrdupDriver, 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_msg(MSGT_CODECCFG,MSGL_ERR,"Can't strdup -> 'dll': %s\n", strerror(errno));
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CantStrdupDLL, strerror(errno));
goto err_out;
}
} else if (!strcmp(token[0], "guid")) {
@@ -699,7 +701,7 @@
}
if (!validate_codec(codec, codec_type))
goto err_out_not_valid;
- mp_msg(MSGT_CODECCFG,MSGL_INFO,"%d audio & %d video codecs\n", nr_acodecs, nr_vcodecs);
+ mp_msg(MSGT_CODECCFG,MSGL_INFO,MSGTR_AudioVideoCodecTotals, nr_acodecs, nr_vcodecs);
if(video_codecs) video_codecs[nr_vcodecs].name = NULL;
if(audio_codecs) audio_codecs[nr_acodecs].name = NULL;
out:
@@ -709,7 +711,7 @@
return 1;
err_out_parse_error:
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"parse error");
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_ParseError);
err_out_print_linenum:
PRINT_LINENUM;
err_out:
@@ -726,10 +728,10 @@
fclose(fp);
return 0;
err_out_not_valid:
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"Codec is not defined correctly.");
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecDefinitionIncorrect);
goto err_out_print_linenum;
err_out_release_num:
- mp_msg(MSGT_CODECCFG,MSGL_ERR,"This codecs.conf is too old and incompatible with this MPlayer release!");
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_OutdatedCodecsConf);
goto err_out_print_linenum;
}
More information about the MPlayer-cvslog
mailing list