summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-09-26 21:35:14 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-09-26 21:35:14 +0000
commit2f6b07dba8627ec4c76e1855e78d40ada06f469a (patch)
tree2a2459c077f12205662b196052840c328088c932
parentbb02b536652fe698067c191ffe33a0421fe16ff3 (diff)
downloadmpv-2f6b07dba8627ec4c76e1855e78d40ada06f469a.tar.bz2
mpv-2f6b07dba8627ec4c76e1855e78d40ada06f469a.tar.xz
all error/warn/info messages moved to help_mp-en.h for translation
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1974 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--dec_audio.c29
-rw-r--r--dec_video.c56
-rw-r--r--demux_asf.c1
-rw-r--r--demux_avi.c19
-rw-r--r--demux_mov.c9
-rw-r--r--demux_mpg.c7
-rw-r--r--demuxer.c12
-rw-r--r--dll_init.c5
-rw-r--r--fibmap_mplayer.c8
-rw-r--r--help_mp-en.h95
-rw-r--r--lirc_mp.c18
-rw-r--r--mp_msg.h5
-rw-r--r--mplayer.c12
-rw-r--r--open.c22
-rw-r--r--parse_es.c6
-rw-r--r--stream.c9
-rw-r--r--vcd_read.h2
17 files changed, 194 insertions, 121 deletions
diff --git a/dec_audio.c b/dec_audio.c
index 85711ea338..d0352e52ea 100644
--- a/dec_audio.c
+++ b/dec_audio.c
@@ -5,6 +5,7 @@
#include "config.h"
#include "mp_msg.h"
+#include "help_mp.h"
#include "libao2/afmt.h"
@@ -98,7 +99,7 @@ sh_audio->audio_out_minsize=8192;// default size, maybe not enough for Win32/ACM
switch(driver){
case AFM_ACM:
#ifndef USE_WIN32DLL
- mp_msg(MSGT_DECAUDIO,MSGL_ERR,"Win32/ACM audio codec disabled, or unavailable on non-x86 CPU -> force nosound :(\n");
+ mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_NoACMSupport);
driver=0;
#else
// Win32 ACM audio codec:
@@ -111,20 +112,20 @@ case AFM_ACM:
// if(sh_audio->a_buffer_size<sh_audio->audio_out_minsize+MAX_OUTBURST)
// sh_audio->a_buffer_size=sh_audio->audio_out_minsize+MAX_OUTBURST;
} else {
- mp_msg(MSGT_DECAUDIO,MSGL_ERR,"Could not load/initialize Win32/ACM AUDIO codec (missing DLL file?)\n");
+ mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_ACMiniterror);
driver=0;
}
#endif
break;
case AFM_DSHOW:
#ifndef USE_DIRECTSHOW
- mp_msg(MSGT_DECAUDIO,MSGL_ERR,"Compiled without DirectShow support -> force nosound :(\n");
+ mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_NoDShowAudio);
driver=0;
#else
// Win32 DShow audio codec:
// printf("DShow_audio: channs=%d rate=%d\n",sh_audio->channels,sh_audio->samplerate);
if(DS_AudioDecoder_Open(sh_audio->codec->dll,&sh_audio->codec->guid,sh_audio->wf)){
- mp_msg(MSGT_DECAUDIO,MSGL_ERR,"ERROR: Could not load/initialize Win32/DirectShow AUDIO codec: %s\n",sh_audio->codec->dll);
+ mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_MissingDLLcodec,sh_audio->codec->dll);
driver=0;
} else {
sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec;
@@ -141,7 +142,7 @@ case AFM_DSHOW:
break;
case AFM_VORBIS:
#ifndef HAVE_OGGVORBIS
- mp_msg(MSGT_DECAUDIO,MSGL_ERR,"OggVorbis audio codec disabled -> force nosound :(\n");
+ mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_NoOggVorbis);
driver=0;
#else
/* OggVorbis audio via libvorbis, compatible with files created by nandub and zorannt codec */
@@ -173,7 +174,7 @@ case AFM_MPEG:
break;
case AFM_FFMPEG:
#ifndef USE_LIBAVCODEC
- mp_msg(MSGT_DECAUDIO,MSGL_ERR,"MPlayer was compiled WITHOUT libavcodec support!\n");
+ mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_NoLAVCsupport);
return 0;
#else
// FFmpeg Audio:
@@ -192,7 +193,7 @@ mp_msg(MSGT_DECAUDIO,MSGL_V,"dec_audio: Allocating %d + %d = %d bytes for output
sh_audio->a_buffer=malloc(sh_audio->a_buffer_size);
if(!sh_audio->a_buffer){
- mp_msg(MSGT_DECAUDIO,MSGL_ERR,"Cannot allocate audio out buffer\n");
+ mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_CantAllocAudioBuf);
return 0;
}
memset(sh_audio->a_buffer,0,sh_audio->a_buffer_size);
@@ -203,7 +204,7 @@ switch(driver){
case AFM_ACM: {
int ret=acm_decode_audio(sh_audio,sh_audio->a_buffer,4096,sh_audio->a_buffer_size);
if(ret<0){
- mp_msg(MSGT_DECAUDIO,MSGL_WARN,"ACM decoding error: %d\n",ret);
+ mp_msg(MSGT_DECAUDIO,MSGL_INFO,"ACM decoding error: %d\n",ret);
driver=0;
}
sh_audio->a_buffer_len=ret;
@@ -268,12 +269,12 @@ case AFM_HWAC3: {
len = ds_get_packet(sh_audio->ds, &buffer); // maybe 1 packet is not enough,
// at least for mpeg, PS packets contain about max. 2000 bytes of data.
if(ac3_iec958_parse_syncinfo(buffer, len, &ai, &skipped) < 0) {
- mp_msg(MSGT_DECAUDIO,MSGL_ERR, "AC3 stream not valid.\n");
+ mp_msg(MSGT_DECAUDIO,MSGL_ERR, MSGTR_AC3notvalid);
driver = 0;
break;
}
if(ai.samplerate != 48000) {
- mp_msg(MSGT_DECAUDIO,MSGL_ERR,"Only 48000 Hz streams supported.\n");
+ mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_AC3only48k);
driver = 0;
break;
}
@@ -303,13 +304,13 @@ case AFM_FFMPEG: {
}
lavc_codec = (AVCodec *)avcodec_find_decoder_by_name(sh_audio->codec->dll);
if(!lavc_codec){
- mp_msg(MSGT_DECAUDIO,MSGL_ERR,"Can't find codec '%s' in libavcodec...\n",sh_audio->codec->dll);
+ mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_MissingLAVCcodec,sh_audio->codec->dll);
return 0;
}
memset(&lavc_context, 0, sizeof(lavc_context));
/* open it */
if (avcodec_open(&lavc_context, lavc_codec) < 0) {
- mp_msg(MSGT_DECAUDIO,MSGL_ERR, "could not open codec\n");
+ mp_msg(MSGT_DECAUDIO,MSGL_ERR, MSGTR_CantOpenCodec);
return 0;
}
mp_msg(MSGT_DECAUDIO,MSGL_V,"INFO: libavcodec init OK!\n");
@@ -480,7 +481,7 @@ case AFM_VORBIS: {
}
if(!sh_audio->channels || !sh_audio->samplerate){
- mp_msg(MSGT_DECAUDIO,MSGL_WARN,"Unknown/missing audio format, using nosound\n");
+ mp_msg(MSGT_DECAUDIO,MSGL_WARN,MSGTR_UnknownAudio);
driver=0;
}
@@ -512,7 +513,7 @@ int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen){
int x=ds_get_packet(sh_audio->ds,&start);
if(x<=0) break; // error
y=avcodec_decode_audio(&lavc_context,buf,&len2,start,x);
- if(y<0){ printf("lavc_audio: error\n");break; }
+ if(y<0){ mp_msg(MSGT_DECAUDIO,MSGL_V,"lavc_audio: error\n");break; }
if(y<x) sh_audio->ds->buffer_pos+=y-x; // put back data (HACK!)
if(len2>0){
//len=len2;break;
diff --git a/dec_video.c b/dec_video.c
index 76937e5b91..16f317be7a 100644
--- a/dec_video.c
+++ b/dec_video.c
@@ -5,6 +5,7 @@
#include "config.h"
#include "mp_msg.h"
+#include "help_mp.h"
extern int verbose; // defined in mplayer.c
extern int divx_quality;
@@ -146,12 +147,12 @@ int set_video_colors(sh_video_t *sh_video,char *item,int value){
int uninit_video(sh_video_t *sh_video){
if(!sh_video->inited) return;
- printf("uninit video: %d \n",sh_video->codec->driver);
+ mp_msg(MSGT_DECVIDEO,MSGL_V,"uninit video: %d \n",sh_video->codec->driver);
switch(sh_video->codec->driver){
#ifdef USE_LIBAVCODEC
case VFM_FFMPEG:
if (avcodec_close(&lavc_context) < 0)
- mp_msg(MSGT_DECVIDEO,MSGL_ERR, "could not close codec\n");
+ mp_msg(MSGT_DECVIDEO,MSGL_ERR, MSGTR_CantCloseCodec);
break;
#endif
#ifdef USE_DIRECTSHOW
@@ -179,7 +180,6 @@ switch(sh_video->codec->driver){
#ifdef USE_WIN32DLL
case VFM_VFW: {
if(!init_video_codec(sh_video,0)) {
-// GUI_MSG( mplUnknowError )
return 0;
}
mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: Win32 video codec init OK!\n");
@@ -187,7 +187,6 @@ switch(sh_video->codec->driver){
}
case VFM_VFWEX: {
if(!init_video_codec(sh_video,1)) {
-// GUI_MSG( mplUnknowError )
return 0;
}
mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: Win32Ex video codec init OK!\n");
@@ -195,26 +194,17 @@ switch(sh_video->codec->driver){
}
case VFM_DSHOW: { // Win32/DirectShow
#ifndef USE_DIRECTSHOW
- mp_msg(MSGT_DECVIDEO,MSGL_ERR,"MPlayer was compiled WITHOUT directshow support!\n");
+ mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_NoDShowSupport);
return 0;
-// GUI_MSG( mplCompileWithoutDSSupport )
#else
int bpp;
if(DS_VideoDecoder_Open(sh_video->codec->dll,&sh_video->codec->guid, sh_video->bih, 0, &sh_video->our_out_buffer)){
// if(DS_VideoDecoder_Open(sh_video->codec->dll,&sh_video->codec->guid, sh_video->bih, 0, NULL)){
- mp_msg(MSGT_DECVIDEO,MSGL_ERR,"ERROR: Couldn't open required DirectShow codec: %s\n",sh_video->codec->dll);
+ mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_MissingDLLcodec,sh_video->codec->dll);
mp_msg(MSGT_DECVIDEO,MSGL_HINT,"Maybe you forget to upgrade your win32 codecs?? It's time to download the new\n");
mp_msg(MSGT_DECVIDEO,MSGL_HINT,"package from: ftp://mplayerhq.hu/MPlayer/releases/w32codec.zip !\n");
// mp_msg(MSGT_DECVIDEO,MSGL_HINT,"Or you should disable DShow support: make distclean;make -f Makefile.No-DS\n");
return 0;
-// #ifdef HAVE_GUI
-// if ( !nogui )
-// {
-// strcpy( mplShMem->items.videodata.codecdll,sh_video->codec->dll );
-// mplSendMessage( mplDSCodecNotFound );
-// usec_sleep( 10000 );
-// }
-// #endif
}
switch(out_fmt){
@@ -248,7 +238,7 @@ switch(sh_video->codec->driver){
case VFM_VFW:
case VFM_DSHOW:
case VFM_VFWEX:
- mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Support for win32 codecs disabled, or unavailable on non-x86 platforms!\n");
+ mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_NoWin32Support);
return 0;
#endif /* !USE_WIN32DLL */
case VFM_ODIVX: { // OpenDivX
@@ -272,7 +262,7 @@ switch(sh_video->codec->driver){
}
case VFM_DIVX4: { // DivX4Linux
#ifndef NEW_DECORE
- mp_msg(MSGT_DECVIDEO,MSGL_ERR,"MPlayer was compiled WITHOUT DivX4Linux (libdivxdecore.so) support!\n");
+ mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_NoDivx4Support);
return 0;
#else
mp_msg(MSGT_DECVIDEO,MSGL_V,"DivX4Linux video codec\n");
@@ -307,7 +297,7 @@ switch(sh_video->codec->driver){
}
case VFM_FFMPEG: { // FFmpeg's libavcodec
#ifndef USE_LIBAVCODEC
- mp_msg(MSGT_DECVIDEO,MSGL_ERR,"MPlayer was compiled WITHOUT libavcodec support!\n");
+ mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_NoLAVCsupport);
return 0;
#else
mp_msg(MSGT_DECVIDEO,MSGL_V,"FFmpeg's libavcodec video codec\n");
@@ -318,7 +308,7 @@ switch(sh_video->codec->driver){
}
lavc_codec = (AVCodec *)avcodec_find_decoder_by_name(sh_video->codec->dll);
if(!lavc_codec){
- mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Can't find codec '%s' in libavcodec...\n",sh_video->codec->dll);
+ mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_MissingLAVCcodec,sh_video->codec->dll);
return 0;
}
memset(&lavc_context, 0, sizeof(lavc_context));
@@ -328,7 +318,7 @@ switch(sh_video->codec->driver){
mp_dbg(MSGT_DECVIDEO,MSGL_DBG2,"libavcodec.size: %d x %d\n",lavc_context.width,lavc_context.height);
/* open it */
if (avcodec_open(&lavc_context, lavc_codec) < 0) {
- mp_msg(MSGT_DECVIDEO,MSGL_ERR, "could not open codec\n");
+ mp_msg(MSGT_DECVIDEO,MSGL_ERR, MSGTR_CantOpenCodec);
return 0;
}
@@ -342,11 +332,7 @@ switch(sh_video->codec->driver){
#ifdef MPEG12_POSTPROC
picture->pp_options=divx_quality;
#else
- if(divx_quality){
- mp_msg(MSGT_DECVIDEO,MSGL_HINT,"WARNING! You requested image postprocessing for an MPEG 1/2 video,\n");
- mp_msg(MSGT_DECVIDEO,MSGL_HINT," but compiled MPlayer without MPEG 1/2 postprocessing support!\n");
- mp_msg(MSGT_DECVIDEO,MSGL_HINT," #define MPEG12_POSTPROC in config.h, and recompile libmpeg2!\n");
- }
+ if(divx_quality) mp_msg(MSGT_DECVIDEO,MSGL_HINT,MSGTR_MpegPPhint);
#endif
mpeg2_allocate_image_buffers (picture);
break;
@@ -363,7 +349,7 @@ switch(sh_video->codec->driver){
int cols=1<<(sh_video->bih->biBitCount);
int i;
if(cols>256) cols=256;
- printf("RLE: converting palette for %d colors.\n",cols);
+ mp_msg(MSGT_DECVIDEO,MSGL_V,"RLE: converting palette for %d colors.\n",cols);
for(i=0;i<cols;i++){
unsigned int c=pal[i];
unsigned int b=c&255;
@@ -651,9 +637,8 @@ switch(d_video->demuxer->file_format){
if(i==0x1B3) break; // found it!
if(!i || !skip_video_packet(d_video)){
if(verbose) mp_msg(MSGT_DECVIDEO,MSGL_V,"NONE :(\n");
- mp_msg(MSGT_DECVIDEO,MSGL_ERR,"MPEG: FATAL: EOF while searching for sequence header\n");
+ mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_MpegNoSequHdr);
return 0;
-// GUI_MSG( mplMPEGErrorSeqHeaderSearch )
}
}
mp_msg(MSGT_DECVIDEO,MSGL_V,"OK!\n");
@@ -662,33 +647,28 @@ switch(d_video->demuxer->file_format){
// ========= Read & process sequence header & extension ============
if(!videobuffer) videobuffer=memalign(8,VIDEOBUFFER_SIZE);
if(!videobuffer){
- mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Cannot allocate shared memory\n");
+ mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_ShMemAllocFail);
return 0;
-// GUI_MSG( mplErrorShMemAlloc )
}
if(!read_video_packet(d_video)){
- mp_msg(MSGT_DECVIDEO,MSGL_ERR,"FATAL: Cannot read sequence header!\n");
+ mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_CannotReadMpegSequHdr);
return 0;
-// GUI_MSG( mplMPEGErrorCannotReadSeqHeader )
}
if(header_process_sequence_header (picture, &videobuffer[4])) {
- mp_msg(MSGT_DECVIDEO,MSGL_ERR,"bad sequence header!\n");
+ mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_BadMpegSequHdr);
return 0;
-// GUI_MSG( mplMPEGErrorBadSeqHeader )
}
if(sync_video_packet(d_video)==0x1B5){ // next packet is seq. ext.
// videobuf_len=0;
int pos=videobuf_len;
if(!read_video_packet(d_video)){
- mp_msg(MSGT_DECVIDEO,MSGL_ERR,"FATAL: Cannot read sequence header extension!\n");
+ mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_CannotReadMpegSequHdrEx);
return 0;
-// GUI_MSG( mplMPEGErrorCannotReadSeqHeaderExt )
}
if(header_process_extension (picture, &videobuffer[pos+4])) {
- mp_msg(MSGT_DECVIDEO,MSGL_ERR,"bad sequence header extension!\n");
+ mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_BadMpegSequHdrEx);
return 0;
-// GUI_MSG( mplMPEGErrorBadSeqHeaderExt )
}
}
// display info:
diff --git a/demux_asf.c b/demux_asf.c
index 8ff31f0866..94787171cb 100644
--- a/demux_asf.c
+++ b/demux_asf.c
@@ -6,6 +6,7 @@
#include "config.h"
#include "mp_msg.h"
+#include "help_mp.h"
#include "stream.h"
#include "asf.h"
diff --git a/demux_avi.c b/demux_avi.c
index afb3659623..23d29b483e 100644
--- a/demux_avi.c
+++ b/demux_avi.c
@@ -6,6 +6,7 @@
#include "config.h"
#include "mp_msg.h"
+#include "help_mp.h"
#include "stream.h"
#include "demuxer.h"
@@ -221,7 +222,7 @@ do{
if(!ret && priv->skip_video_frames<=0)
if(--max_packs==0){
demux->stream->eof=1;
- mp_msg(MSGT_DEMUX,MSGL_ERR,"demux: file doesn't contain the selected audio or video stream\n");
+ mp_msg(MSGT_DEMUX,MSGL_ERR,MSGTR_DoesntContainSelectedStream);
return 0;
}
} while(ret!=1);
@@ -298,7 +299,7 @@ do{
if(!ret && priv->skip_video_frames<=0)
if(--max_packs==0){
demux->stream->eof=1;
- mp_msg(MSGT_DEMUX,MSGL_ERR,"demux: file doesn't contain the selected audio or video stream\n");
+ mp_msg(MSGT_DEMUX,MSGL_ERR,MSGTR_DoesntContainSelectedStream);
return 0;
}
} while(ret!=1);
@@ -409,16 +410,16 @@ demuxer_t* demux_open_avi(demuxer_t* demuxer){
}
}
if(v_pos==-1){
- mp_msg(MSGT_DEMUX,MSGL_ERR,"AVI_NI: missing video stream!? contact the author, it may be a bug :(\n");
+ mp_msg(MSGT_DEMUX,MSGL_ERR,"AVI_NI: " MSGTR_MissingVideoStream);
return NULL;
// GUI_MSG( mplErrorAVINI )
}
if(a_pos==-1){
- mp_msg(MSGT_DEMUX,MSGL_INFO,"AVI_NI: No audio stream found -> nosound\n");
+ mp_msg(MSGT_DEMUX,MSGL_INFO,"AVI_NI: " MSGTR_MissingAudioStream);
sh_audio=NULL;
} else {
if(force_ni || abs(a_pos-v_pos)>0x100000){ // distance > 1MB
- mp_msg(MSGT_DEMUX,MSGL_INFO,"%s NON-INTERLEAVED AVI file-format!\n",force_ni?"Forced":"Detected");
+ mp_msg(MSGT_DEMUX,MSGL_INFO,MSGTR_NI_Message,force_ni?MSGTR_NI_Forced:MSGTR_NI_Detected);
demuxer->type=DEMUXER_TYPE_AVI_NI; // HACK!!!!
pts_from_bps=1; // force BPS sync!
}
@@ -426,7 +427,7 @@ demuxer_t* demux_open_avi(demuxer_t* demuxer){
} else {
// no index
if(force_ni){
- mp_msg(MSGT_DEMUX,MSGL_INFO,"Using NON-INTERLEAVED Broken AVI file-format!\n");
+ mp_msg(MSGT_DEMUX,MSGL_INFO,MSGTR_UsingNINI);
demuxer->type=DEMUXER_TYPE_AVI_NINI; // HACK!!!!
priv->idx_pos_a=
priv->idx_pos_v=demuxer->movi_start;
@@ -435,7 +436,7 @@ demuxer_t* demux_open_avi(demuxer_t* demuxer){
demuxer->seekable=0;
}
if(!ds_fill_buffer(d_video)){
- mp_msg(MSGT_DEMUX,MSGL_ERR,"AVI: missing video stream!? contact the author, it may be a bug :(\n");
+ mp_msg(MSGT_DEMUX,MSGL_ERR,"AVI: " MSGTR_MissingVideoStreamBug);
return NULL;
// GUI_MSG( mplAVIErrorMissingVideoStream )
}
@@ -443,7 +444,7 @@ demuxer_t* demux_open_avi(demuxer_t* demuxer){
if(d_audio->id!=-2){
mp_msg(MSGT_DEMUX,MSGL_V,"AVI: Searching for audio stream (id:%d)\n",d_audio->id);
if(!ds_fill_buffer(d_audio)){
- mp_msg(MSGT_DEMUX,MSGL_INFO,"AVI: No Audio stream found... ->nosound\n");
+ mp_msg(MSGT_DEMUX,MSGL_INFO,"AVI: " MSGTR_MissingAudioStream);
sh_audio=NULL;
} else {
sh_audio=d_audio->sh;sh_audio->ds=d_audio;
@@ -499,7 +500,7 @@ void demux_seek_avi(demuxer_t *demuxer,float rel_seek_secs,int flags){
// bad video header, try to get it from audio
if(sh_audio) total=sh_video->fps*sh_audio->audio.dwLength/sh_audio->wf->nAvgBytesPerSec;
if(total<=1){
- mp_msg(MSGT_SEEK,MSGL_WARN,"Couldn't determine number of frames (for absoulte seek) \n");
+ mp_msg(MSGT_SEEK,MSGL_WARN,MSGTR_CouldntDetFNo);
total=0;
}
}
diff --git a/demux_mov.c b/demux_mov.c
index c3491e6f4f..351cf284ff 100644
--- a/demux_mov.c
+++ b/demux_mov.c
@@ -7,6 +7,7 @@
#include "config.h"
#include "mp_msg.h"
+#include "help_mp.h"
#include "stream.h"
#include "demuxer.h"
@@ -143,7 +144,7 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak
}
mp_msg(MSGT_DEMUX,MSGL_V,"\n");
if(fourcc!=trak->fourcc && i)
- mp_msg(MSGT_DEMUX,MSGL_WARN,"MOV: Warning! variable FOURCC detected!?\n");
+ mp_msg(MSGT_DEMUX,MSGL_WARN,MSGTR_MOVvariableFourCC);
if(!stream_seek(demuxer->stream,pos+len)) break;
}
break;
@@ -168,7 +169,7 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak
if(id==MOV_FOURCC('t','r','a','k')){
// if(trak) printf("MOV: Warning! trak in trak?\n");
if(priv->track_db>=MOV_MAX_TRACKS){
- mp_msg(MSGT_DEMUX,MSGL_WARN,"MOV: Warning! too many tracks!");
+ mp_msg(MSGT_DEMUX,MSGL_WARN,MSGTR_MOVtooManyTrk);
return;
}
trak=malloc(sizeof(mov_track_t));
@@ -180,7 +181,7 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak
trak=NULL;
} else
if(id==MOV_FOURCC('c','m','o','v')){
- mp_msg(MSGT_DEMUX,MSGL_ERR,"MOV: Compressed headers not (yet) supported!\n");
+ mp_msg(MSGT_DEMUX,MSGL_ERR,MSGTR_MOVcomprhdr);
return;
}
@@ -202,7 +203,7 @@ int mov_read_header(demuxer_t* demuxer){
// Build tables:
// ...
- mp_msg(MSGT_DEMUX,MSGL_ERR,"\n****** Quicktime MOV format not yet supported!!!!!!! *******\n");
+ mp_msg(MSGT_DEMUX,MSGL_ERR,MSGTR_MOVnotyetsupp);
return 1;
}
diff --git a/demux_mpg.c b/demux_mpg.c
index 74604ca160..dc4cc7f438 100644
--- a/demux_mpg.c
+++ b/demux_mpg.c
@@ -6,6 +6,7 @@
#include "config.h"
#include "mp_msg.h"
+#include "help_mp.h"
#include "config.h"
#include "dvdauth.h"
@@ -107,7 +108,7 @@ static int demux_mpg_read_packet(demuxer_t *demux,int id){
#ifdef HAVE_LIBCSS
css=1;
#else
- mp_msg(MSGT_DEMUX,MSGL_WARN,"Encrypted VOB file (not compiled with libcss support)! Read file DOCS/DVD\n");
+ mp_msg(MSGT_DEMUX,MSGL_WARN,MSGTR_EncryptedVOB);
#endif
}
c=stream_read_char(demux->stream); pts_flags=c>>6;
@@ -231,7 +232,7 @@ static int demux_mpg_read_packet(demuxer_t *demux,int id){
#ifdef HAVE_LIBCSS
if (css) {
if (descrambling) CSSDescramble(demux->stream->buffer,key_title); else
- mp_msg(MSGT_DEMUX,MSGL_WARN,"Encrypted stream but authentication was not requested by you!!\n");
+ mp_msg(MSGT_DEMUX,MSGL_WARN,MSGTR_EncryptedVOBauth);
}
#endif
ds_read_packet(ds,demux->stream,len,pts/90000.0f,demux->filepos,0);
@@ -310,7 +311,7 @@ do{
if(!ret)
if(--max_packs==0){
demux->stream->eof=1;
- mp_msg(MSGT_DEMUX,MSGL_ERR,"demux: file doesn't contain the selected audio or video stream\n");
+ mp_msg(MSGT_DEMUX,MSGL_ERR,MSGTR_DoesntContainSelectedStream);
return 0;
}
} else {
diff --git a/demuxer.c b/demuxer.c
index 6742f0e506..b0714e76d2 100644
--- a/demuxer.c
+++ b/demuxer.c
@@ -407,7 +407,7 @@ if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_MPEG_PS){
file_format=DEMUXER_TYPE_MPEG_ES; // <-- hack is here :)
} else {
if(demuxer->synced==2)
- mp_msg(MSGT_DEMUXER,MSGL_ERR,MSGTR_MissingMpegVideo);
+ mp_msg(MSGT_DEMUXER,MSGL_ERR,"MPEG: " MSGTR_MissingVideoStreamBug);
else
mp_msg(MSGT_DEMUXER,MSGL_V,"Not MPEG System Stream format... (maybe Transport Stream?)\n");
}
@@ -465,7 +465,7 @@ switch(file_format){
// demuxer->idx_pos=0;
// demuxer->endpos=avi_header.movi_end;
if(!ds_fill_buffer(d_video)){
- mp_msg(MSGT_DEMUXER,MSGL_WARN,MSGTR_MissingASFvideo);
+ mp_msg(MSGT_DEMUXER,MSGL_WARN,"ASF: " MSGTR_MissingVideoStream);
sh_video=NULL;
//printf("ASF: missing video stream!? contact the author, it may be a bug :(\n");
//GUI_MSG( mplASFErrorMissingVideoStream )
@@ -482,7 +482,7 @@ switch(file_format){
if(audio_id!=-2){
mp_msg(MSGT_DEMUXER,MSGL_V,"ASF: Searching for audio stream (id:%d)\n",d_audio->id);
if(!ds_fill_buffer(d_audio)){
- mp_msg(MSGT_DEMUXER,MSGL_INFO,MSGTR_MissingASFaudio);
+ mp_msg(MSGT_DEMUXER,MSGL_INFO,"ASF: " MSGTR_MissingAudioStream);
sh_audio=NULL;
} else {
sh_audio=d_audio->sh;sh_audio->ds=d_audio;
@@ -503,7 +503,7 @@ switch(file_format){
if(audio_id!=-2) {
if(!ds_fill_buffer(d_audio)){
- mp_msg(MSGT_DEMUXER,MSGL_INFO,MSGTR_MissingMPEGaudio);
+ mp_msg(MSGT_DEMUXER,MSGL_INFO,"MPEG: " MSGTR_MissingAudioStream);
sh_audio=NULL;
} else {
sh_audio=d_audio->sh;sh_audio->ds=d_audio;
@@ -534,9 +534,9 @@ int demux_seek(demuxer_t *demuxer,float rel_seek_secs,int flags){
if(!demuxer->seekable){
if(demuxer->file_format==DEMUXER_TYPE_AVI)
- mp_msg(MSGT_SEEK,MSGL_WARN,"Can't seek in raw .AVI streams! (index required, try with the -idx switch!) \n");
+ mp_msg(MSGT_SEEK,MSGL_WARN,MSGTR_CantSeekRawAVI);
else
- mp_msg(MSGT_SEEK,MSGL_WARN,"Can't seek in this file! \n");
+ mp_msg(MSGT_SEEK,MSGL_WARN,MSGTR_CantSeekFile);
return 0;
}
diff --git a/dll_init.c b/dll_init.c
index 58d97ff4aa..6b5173e858 100644
--- a/dll_init.c
+++ b/dll_init.c
@@ -5,6 +5,7 @@
#include "config.h"
#include "mp_msg.h"
+#include "help_mp.h"
#include "stream.h"
#include "demuxer.h"
@@ -50,7 +51,7 @@ int init_acm_audio_codec(sh_audio_t *sh_audio){
if(ret==ACMERR_NOTPOSSIBLE)
mp_msg(MSGT_WIN32,MSGL_ERR,"ACM_Decoder: Unappropriate audio format\n");
else
- mp_msg(MSGT_WIN32,MSGL_ERR,"ACM_Decoder: acmStreamOpen error %d", (int)ret);
+ mp_msg(MSGT_WIN32,MSGL_ERR,"ACM_Decoder: acmStreamOpen error: %d", (int)ret);
sh_audio->srcstream=NULL;
return 0;
}
@@ -283,7 +284,7 @@ int init_video_codec(sh_video_t *sh_video,int ex){
sh_video->our_out_buffer = memalign(64,sh_video->o_bih.biSizeImage);
if(!sh_video->our_out_buffer){
- mp_msg(MSGT_WIN32,MSGL_ERR,"not enough memory for decoded picture buffer (%ld bytes)\n", sh_video->o_bih.biSizeImage);
+ mp_msg(MSGT_WIN32,MSGL_ERR,MSGTR_NoMemForDecodedImage, sh_video->o_bih.biSizeImage);
return 0;
}
diff --git a/fibmap_mplayer.c b/fibmap_mplayer.c
index 895f3f9a22..ead0879212 100644
--- a/fibmap_mplayer.c
+++ b/fibmap_mplayer.c
@@ -16,20 +16,20 @@ int main ( int argc , char ** argv )
{
int fd,lba=0;
if (argc!=2) {
- printf("Bad usage.\n");
+ fprintf(stderr,"Bad usage.\n");
return 1;
}
if ((fd = open(argv[1], O_RDONLY)) == -1) {
- printf("Cannot open file %s: %s\n",
+ fprintf(stderr,"Cannot open file %s: %s\n",
argv[1] ? argv[1] : "(NULL)", strerror(errno));
return 1;
}
if (ioctl(fd, FIBMAP, &lba) != 0) {
- printf("fibmap ioctl: %s (Hint: %s is not suid root?)\n",strerror(errno),argv[0]);
+ fprintf(stderr,"fibmap ioctl: %s (Hint: %s is not suid root?)\n",strerror(errno),argv[0]);
close(fd);
return 1;
}
close(fd);
- printf("%d\n",lba);
+ fprintf(stderr,"%d\n",lba);
return 0;
}
diff --git a/help_mp-en.h b/help_mp-en.h
index 5bd2e1747a..e324075a6e 100644
--- a/help_mp-en.h
+++ b/help_mp-en.h
@@ -1,3 +1,5 @@
+// ========================= MPlayer help ===========================
+
#ifdef HELP_MP_DEFINE_STATIC
static char* banner_text=
"\n\n"
@@ -49,6 +51,8 @@ static char help_text[]=
"\n";
#endif
+// ========================= MPlayer messages ===========================
+
// mplayer.c:
#define MSGTR_Exiting "\nExiting... (%s)\n"
@@ -91,9 +95,14 @@ static char help_text[]=
#define MSGTR_SystemTooSlow "\n************************************************************************"\
"\n** Your system is too SLOW to play this! try with -framedrop or RTFM! **"\
"\n************************************************************************\n"
-//#define MSGTR_
-// open.c:
+#define MSGTR_NoGui "MPlayer was compiled WITHOUT GUI support!\n"
+#define MSGTR_GuiNeedsX "MPlayer GUI requires X11!\n"
+#define MSGTR_Playing "Playing %s\n"
+#define MSGTR_NoSound "Audio: no sound!!!\n"
+#define MSGTR_FPSforced "FPS forced to be %5.3f (ftime: %5.3f)\n"
+
+// open.c, stream.c:
#define MSGTR_CdDevNotfound "CD-ROM Device '%s' not found!\n"
#define MSGTR_ErrTrackSelect "Error selecting VCD track!"
#define MSGTR_ReadSTDIN "Reading from stdin...\n"
@@ -101,7 +110,19 @@ static char help_text[]=
#define MSGTR_ConnToServer "Connected to server: %s\n"
#define MSGTR_FileNotFound "File not found: '%s'\n"
-// demuxer.c:
+#define MSGTR_CantOpenDVD "Couldn't open DVD device: %s\n"
+#define MSGTR_DVDwait "Reading disc structure, please wait...\n"
+#define MSGTR_DVDnumTitles "There are %d titles on this DVD.\n"
+#define MSGTR_DVDinvalidTitle "Invalid DVD title number: %d\n"
+#define MSGTR_DVDnumChapters "There are %d chapters in this DVD title.\n"
+#define MSGTR_DVDinvalidChapter "Invalid DVD chapter number: %d\n"
+#define MSGTR_DVDnumAngles "There are %d angles in this DVD title.\n"
+#define MSGTR_DVDinvaludAngle "Invalid DVD angle number: %d\n"
+#define MSGTR_DVDnoIFO "Can't open the IFO file for DVD title %d.\n"
+#define MSGTR_DVDnoVOBs "Can't open title VOBS (VTS_%02d_1.VOB).\n"
+#define MSGTR_DVDopenOk "DVD successfully opened!\n"
+
+// demuxer.c, demux_*.c:
#define MSGTR_AudioStreamRedefined "Warning! Audio stream header %d redefined!\n"
#define MSGTR_VideoStreamRedefined "Warning! video stream header %d redefined!\n"
#define MSGTR_TooManyAudioInBuffer "\nDEMUXER: Too many (%d in %d bytes) audio packets in the buffer!\n"
@@ -117,11 +138,71 @@ static char help_text[]=
#define MSGTR_InvalidMPEGES "Invalid MPEG-ES stream??? contact the author, it may be a bug :(\n"
#define MSGTR_FormatNotRecognized "============= Sorry, this file format not recognized/supported ===============\n"\
"=== If this file is an AVI, ASF or MPEG stream, please contact the author! ===\n"
-#define MSGTR_MissingASFvideo "ASF: no video stream found!\n"
-#define MSGTR_MissingASFaudio "ASF: No Audio stream found... ->nosound\n"
-#define MSGTR_MissingMPEGaudio "MPEG: No Audio stream found... ->nosound\n"
+#define MSGTR_MissingVideoStream "No video stream found!\n"
+#define MSGTR_MissingAudioStream "No Audio stream found... ->nosound\n"
+#define MSGTR_MissingVideoStreamBug "Missing video stream!? Contact the author, it may be a bug :(\n"
+
+#define MSGTR_DoesntContainSelectedStream "demux: file doesn't contain the selected audio or video stream\n"
+
+#define MSGTR_NI_Forced "Forced"
+#define MSGTR_NI_Detected "Detected"
+#define MSGTR_NI_Message "%s NON-INTERLEAVED AVI file-format!\n"
+
+#define MSGTR_UsingNINI "Using NON-INTERLEAVED Broken AVI file-format!\n"
+#define MSGTR_CouldntDetFNo "Couldn't determine number of frames (for absoulte seek) \n"
+#define MSGTR_CantSeekRawAVI "Can't seek in raw .AVI streams! (index required, try with the -idx switch!) \n"
+#define MSGTR_CantSeekFile "Can't seek in this file! \n"
+
+#define MSGTR_EncryptedVOB "Encrypted VOB file (not compiled with libcss support)! Read file DOCS/DVD\n"
+#define MSGTR_EncryptedVOBauth "Encrypted stream but authentication was not requested by you!!\n"
+
+#define MSGTR_MOVcomprhdr "MOV: Compressed headers not (yet) supported!\n"
+#define MSGTR_MOVvariableFourCC "MOV: Warning! variable FOURCC detected!?\n"
+#define MSGTR_MOVtooManyTrk "MOV: Warning! too many tracks!"
+#define MSGTR_MOVnotyetsupp "\n****** Quicktime MOV format not yet supported!!!!!!! *******\n"
+
+// dec_video.c & dec_audio.c:
+#define MSGTR_CantOpenCodec "could not open codec\n"
+#define MSGTR_CantCloseCodec "could not close codec\n"
+
+#define MSGTR_MissingDLLcodec "ERROR: Couldn't open required DirectShow codec: %s\n"
+#define MSGTR_ACMiniterror "Could not load/initialize Win32/ACM AUDIO codec (missing DLL file?)\n"
+#define MSGTR_MissingLAVCcodec "Can't find codec '%s' in libavcodec...\n"
+
+#define MSGTR_NoDShowSupport "MPlayer was compiled WITHOUT directshow support!\n"
+#define MSGTR_NoWfvSupport "Support for win32 codecs disabled, or unavailable on non-x86 platforms!\n"
+#define MSGTR_NoDivx4Support "MPlayer was compiled WITHOUT DivX4Linux (libdivxdecore.so) support!\n"
+#define MSGTR_NoLAVCsupport "MPlayer was compiled WITHOUT ffmpeg/libavcodec support!\n"
+#define MSGTR_NoACMSupport "Win32/ACM audio codec disabled, or unavailable on non-x86 CPU -> force nosound :(\n"
+#define MSGTR_NoDShowAudio "Compiled without DirectShow support -> force nosound :(\n"
+#define MSGTR_NoOggVorbis "OggVorbis audio codec disabled -> force nosound :(\n"
+
+#define MSGTR_MpegPPhint "WARNING! You requested image postprocessing for an MPEG 1/2 video,\n" \
+ " but compiled MPlayer without MPEG 1/2 postprocessing support!\n" \
+ " #define MPEG12_POSTPROC in config.h, and recompile libmpeg2!\n"
+#define MSGTR_MpegNoSequHdr "MPEG: FATAL: EOF while searching for sequence header\n"
+#define MSGTR_CannotReadMpegSequHdr "FATAL: Cannot read sequence header!\n"
+#define MSGTR_CannotReadMpegSequHdrEx "FATAL: Cannot read sequence header extension!\n"
+#define MSGTR_BadMpegSequHdr "MPEG: Bad sequence header!\n"
+#define MSGTR_BadMpegSequHdrEx "MPEG: Bad sequence header extension!\n"
+
+#define MSGTR_ShMemAllocFail "Cannot allocate shared memory\n"
+#define MSGTR_CantAllocAudioBuf "Cannot allocate audio out buffer\n"
+#define MSGTR_NoMemForDecodedImage "not enough memory for decoded picture buffer (%ld bytes)\n"
+
+#define MSGTR_AC3notvalid "AC3 stream not valid.\n"
+#define MSGTR_AC3only48k "Only 48000 Hz streams supported.\n"
+#define MSGTR_UnknownAudio "Unknown/missing audio format, using nosound\n"
+
+// LIRC:
+#define MSGTR_SettingUpLIRC "Setting up lirc support...\n"
+#define MSGTR_LIRCdisabled "You won't be able to use your remote control\n"
+#define MSGTR_LIRCopenfailed "Failed opening lirc support!\n"
+#define MSGTR_LIRCsocketerr "Something's wrong with the lirc socket: %s\n"
+#define MSGTR_LIRCcfgerr "Failed to read LIRC config file %s !\n"
+
-//#define MSGTR_
+// ====================== GUI messages/buttons ========================
#ifdef HAVE_NEW_GUI
diff --git a/lirc_mp.c b/lirc_mp.c
index cb632bd083..420789b189 100644
--- a/lirc_mp.c
+++ b/lirc_mp.c
@@ -37,10 +37,9 @@ void lirc_mp_setup(void){
int lirc_flags;
int lirc_sock;
- printf("Setting up lirc support...\n");
+ mp_msg(MSGT_LIRC,MSGL_INFO,MSGTR_SettingUpLIRC);
if((lirc_sock=lirc_init("mplayer_lirc",1))==-1){
- printf("Failed opening lirc support!\n");
- printf("You won't be able to use your remote control\n");
+ mp_msg(MSGT_LIRC,MSGL_ERR,MSGTR_LIRCopenfailed MSGTR_LIRCdisabled);
return;
}
@@ -51,21 +50,18 @@ void lirc_mp_setup(void){
fcntl(lirc_sock,F_SETFL,lirc_flags|O_NONBLOCK);
}else{
lirc_deinit();
- printf("Something's wrong with the lirc socket: %s\n",
- strerror(errno));
- printf("You won't be able to use your remote control\n");
+ mp_msg(MSGT_LIRC,MSGL_ERR,MSGTR_LIRCsocketerr MSGTR_LIRCdisabled,strerror(errno));
return;
}
if(lirc_readconfig( lirc_configfile,&lirc_config,NULL )!=0 ){
- printf("Failed to read config file %s !\n",
+ mp_msg(MSGT_LIRC,MSGL_ERR,MSGTR_LIRCcfgerr MSGTR_LIRCdisabled,
lirc_configfile == NULL ? "~/.lircrc" : lirc_configfile);
- printf("You won't be able to use your remote control\n");
lirc_deinit();
return;
}
- printf("LIRC init was successful.\n");
+ mp_msg(MSGT_LIRC,