From e306174952d42e1cd6cc5efc50ae6bb0410501bc Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Tue, 7 Jul 2009 01:15:02 +0300 Subject: Translation system changes part 2: replace macros by strings Replace all MSGTR_ macros in the source by the corresponding English string. --- libmpdemux/asfheader.c | 28 +++++++++++------------ libmpdemux/aviheader.c | 50 ++++++++++++++++++++--------------------- libmpdemux/demux_asf.c | 6 ++--- libmpdemux/demux_audio.c | 2 +- libmpdemux/demux_avi.c | 24 ++++++++++---------- libmpdemux/demux_demuxers.c | 2 +- libmpdemux/demux_lavf.c | 6 ++--- libmpdemux/demux_lmlm4.c | 4 ++-- libmpdemux/demux_mkv.c | 34 ++++++++++++++-------------- libmpdemux/demux_mov.c | 14 ++++++------ libmpdemux/demux_mpg.c | 8 +++---- libmpdemux/demux_nut.c | 4 ++-- libmpdemux/demux_real.c | 10 ++++----- libmpdemux/demux_ty.c | 2 +- libmpdemux/demux_viv.c | 4 ++-- libmpdemux/demux_xmms.c | 6 ++--- libmpdemux/demuxer.c | 54 ++++++++++++++++++++++++--------------------- libmpdemux/muxer.c | 8 +++---- libmpdemux/muxer_avi.c | 8 +++---- libmpdemux/muxer_lavf.c | 4 ++-- libmpdemux/muxer_mpeg.c | 4 ++-- libmpdemux/muxer_rawaudio.c | 6 ++--- libmpdemux/video.c | 22 +++++++++--------- 23 files changed, 157 insertions(+), 153 deletions(-) (limited to 'libmpdemux') diff --git a/libmpdemux/asfheader.c b/libmpdemux/asfheader.c index d44d92852f..93f47877bc 100644 --- a/libmpdemux/asfheader.c +++ b/libmpdemux/asfheader.c @@ -37,7 +37,7 @@ static char* get_ucs2str(const uint16_t* inbuf, uint16_t inlen) int i; if (!outbuf) { - mp_tmsg(MSGT_HEADER, MSGL_ERR, MSGTR_MemAllocFailed); + mp_tmsg(MSGT_HEADER, MSGL_ERR, "Memory allocation failed.\n"); return NULL; } q = outbuf; @@ -269,7 +269,7 @@ static int get_meta(char *buf, int buf_len, int this_stream_num, if (record_entry.stream_num && record_entry.stream_num != this_stream_num) continue; if (!(name = get_ucs2str(record_entry.name, record_entry.name_length))) { - mp_tmsg(MSGT_HEADER, MSGL_ERR, MSGTR_MemAllocFailed); + mp_tmsg(MSGT_HEADER, MSGL_ERR, "Memory allocation failed.\n"); continue; } if (strcmp(name, "AspectRatioX") == 0) @@ -322,7 +322,7 @@ static int is_drm(char* buf, int buf_len) buf += 4; buf[url_len - 1] = '\0'; - mp_tmsg(MSGT_HEADER, MSGL_INFO, MSGTR_MPDEMUX_ASFHDR_DRMLicenseURL, buf); + mp_tmsg(MSGT_HEADER, MSGL_INFO, "DRM License URL: %s\n", buf); return 1; } @@ -385,14 +385,14 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){ } if (hdr_len > 1024 * 1024) { - mp_tmsg(MSGT_HEADER, MSGL_ERR, MSGTR_MPDEMUX_ASFHDR_HeaderSizeOver1MB, + mp_tmsg(MSGT_HEADER, MSGL_ERR, "FATAL: header size bigger than 1 MB (%d)!\nPlease contact MPlayer authors, and upload/send this file.\n", hdr_len); hdr_skip = hdr_len - 1024 * 1024; hdr_len = 1024 * 1024; } hdr = malloc(hdr_len); if (!hdr) { - mp_tmsg(MSGT_HEADER, MSGL_FATAL, MSGTR_MPDEMUX_ASFHDR_HeaderMallocFailed, + mp_tmsg(MSGT_HEADER, MSGL_FATAL, "Could not allocate %d bytes for header.\n", hdr_len); return 0; } @@ -400,12 +400,12 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){ if (hdr_skip) stream_skip(demuxer->stream, hdr_skip); if (stream_eof(demuxer->stream)) { - mp_tmsg(MSGT_HEADER, MSGL_FATAL, MSGTR_MPDEMUX_ASFHDR_EOFWhileReadingHeader); + mp_tmsg(MSGT_HEADER, MSGL_FATAL, "EOF while reading ASF header, broken/incomplete file?\n"); goto err_out; } if (is_drm(hdr, hdr_len)) - mp_tmsg(MSGT_HEADER, MSGL_FATAL, MSGTR_MPDEMUX_ASFHDR_DRMProtected); + mp_tmsg(MSGT_HEADER, MSGL_FATAL, "This file has been encumbered with DRM encryption, it will not play in MPlayer!\n"); if ((pos = find_asf_guid(hdr, asf_ext_stream_audio, 0, hdr_len)) >= 0) { @@ -427,7 +427,7 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){ audio_pos += 64; //16+16+4+4+4+16+4; buffer = &hdr[audio_pos]; sh_audio=new_sh_audio(demuxer,streamh->stream_no & 0x7F); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "asfheader", streamh->stream_no & 0x7F); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "asfheader", streamh->stream_no & 0x7F); ++audio_streams; if (!asf_init_audio_stream(demuxer, asf, sh_audio, streamh, &audio_pos, &buffer, hdr, hdr_len)) goto len_err_out; @@ -464,7 +464,7 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){ switch(ASF_LOAD_GUID_PREFIX(streamh->type)){ case ASF_GUID_PREFIX_audio_stream: { sh_audio_t* sh_audio=new_sh_audio(demuxer,streamh->stream_no & 0x7F); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "asfheader", streamh->stream_no & 0x7F); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "asfheader", streamh->stream_no & 0x7F); ++audio_streams; if (!asf_init_audio_stream(demuxer, asf, sh_audio, streamh, &pos, &buffer, hdr, hdr_len)) goto len_err_out; @@ -475,7 +475,7 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){ unsigned int len; float asp_ratio; sh_video_t* sh_video=new_sh_video(demuxer,streamh->stream_no & 0x7F); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "asfheader", streamh->stream_no & 0x7F); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Video stream found, -vid %d\n", "asfheader", streamh->stream_no & 0x7F); len=streamh->type_size-(4+4+1+2); ++video_streams; // sh_video->bih=malloc(chunksize); memset(sh_video->bih,0,chunksize); @@ -485,7 +485,7 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){ if (sh_video->bih->biSize > len && sh_video->bih->biSize > sizeof(BITMAPINFOHEADER)) sh_video->bih->biSize = len; if (sh_video->bih->biCompression == mmioFOURCC('D', 'V', 'R', ' ')) { - //mp_tmsg(MSGT_DEMUXER, MSGL_WARN, MSGTR_MPDEMUX_ASFHDR_DVRWantsLibavformat); + //mp_tmsg(MSGT_DEMUXER, MSGL_WARN, "DVR will probably only work with libavformat, try -demuxer 35 if you have problems\n"); //sh_video->fps=(float)sh_video->video.dwRate/(float)sh_video->video.dwScale; //sh_video->frametime=(float)sh_video->video.dwScale/(float)sh_video->video.dwRate; asf->asf_frame_state=-1; @@ -631,7 +631,7 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){ start = stream_tell(demuxer->stream); // start of first data chunk stream_read(demuxer->stream, guid_buffer, 16); if (memcmp(guid_buffer, asf_data_chunk_guid, 16) != 0) { - mp_tmsg(MSGT_HEADER, MSGL_FATAL, MSGTR_MPDEMUX_ASFHDR_NoDataChunkAfterHeader); + mp_tmsg(MSGT_HEADER, MSGL_FATAL, "No data chunk following header!\n"); free(streams); streams = NULL; return 0; @@ -678,7 +678,7 @@ if(!audio_streams) demuxer->audio->id=-2; // nosound else if(best_audio > 0 && demuxer->audio->id == -1) demuxer->audio->id=best_audio; if(!video_streams){ if(!audio_streams){ - mp_tmsg(MSGT_HEADER,MSGL_ERR,MSGTR_MPDEMUX_ASFHDR_AudioVideoHeaderNotFound); + mp_tmsg(MSGT_HEADER,MSGL_ERR,"ASF: no audio or video headers found - broken file?\n"); return 0; } demuxer->video->id=-2; // audio-only @@ -695,7 +695,7 @@ if( mp_msg_test(MSGT_HEADER,MSGL_V) ){ return 1; len_err_out: - mp_tmsg(MSGT_HEADER, MSGL_FATAL, MSGTR_MPDEMUX_ASFHDR_InvalidLengthInASFHeader); + mp_tmsg(MSGT_HEADER, MSGL_FATAL, "Invalid length in ASF header!\n"); err_out: if (hdr) free(hdr); if (streams) free(streams); diff --git a/libmpdemux/aviheader.c b/libmpdemux/aviheader.c index f7228c590f..516da9d0f8 100644 --- a/libmpdemux/aviheader.c +++ b/libmpdemux/aviheader.c @@ -80,7 +80,7 @@ while(1){ len -= 4; list_end=stream_tell(demuxer->stream)+((len+1)&(~1)); } else { - mp_tmsg(MSGT_HEADER,MSGL_WARN,MSGTR_MPDEMUX_AVIHDR_EmptyList); + mp_tmsg(MSGT_HEADER,MSGL_WARN,"** empty list?!\n"); list_end = 0; } mp_msg(MSGT_HEADER,MSGL_V,"list_end=0x%X\n",(int)list_end); @@ -88,7 +88,7 @@ while(1){ // found MOVI header if(!demuxer->movi_start) demuxer->movi_start=stream_tell(demuxer->stream); demuxer->movi_end=stream_tell(demuxer->stream)+len; - mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_FoundMovieAt,(int)demuxer->movi_start,(int)demuxer->movi_end); + mp_tmsg(MSGT_HEADER,MSGL_V,"Found movie at 0x%X - 0x%X\n",(int)demuxer->movi_start,(int)demuxer->movi_end); if(demuxer->stream->end_pos>demuxer->movi_end) demuxer->movi_end=demuxer->stream->end_pos; if(index_mode==-2 || index_mode==2 || index_mode==0) break; // reading from non-seekable source (stdin) or forced index or no index forced @@ -193,13 +193,13 @@ while(1){ ++stream_id; if(h.fccType==streamtypeVIDEO){ sh_video=new_sh_video(demuxer,stream_id); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "aviheader", stream_id); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Video stream found, -vid %d\n", "aviheader", stream_id); memcpy(&sh_video->video,&h,sizeof(h)); sh_video->stream_delay = (float)sh_video->video.dwStart * sh_video->video.dwScale/sh_video->video.dwRate; } else if(h.fccType==streamtypeAUDIO){ sh_audio=new_sh_audio(demuxer,stream_id); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "aviheader", stream_id); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "aviheader", stream_id); memcpy(&sh_audio->audio,&h,sizeof(h)); sh_audio->stream_delay = (float)sh_audio->audio.dwStart * sh_audio->audio.dwScale/sh_audio->audio.dwRate; } @@ -262,7 +262,7 @@ while(1){ if(last_fccType==streamtypeVIDEO){ sh_video->bih=calloc(FFMAX(chunksize, sizeof(BITMAPINFOHEADER)), 1); // sh_video->bih=malloc(chunksize); memset(sh_video->bih,0,chunksize); - mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_FoundBitmapInfoHeader,chunksize,sizeof(BITMAPINFOHEADER)); + mp_tmsg(MSGT_HEADER,MSGL_V,"Found 'bih', %u bytes of %d\n",chunksize,sizeof(BITMAPINFOHEADER)); stream_read(demuxer->stream,(char*) sh_video->bih,chunksize); le2me_BITMAPINFOHEADER(sh_video->bih); // swap to machine endian if (sh_video->bih->biSize > chunksize && sh_video->bih->biSize > sizeof(BITMAPINFOHEADER)) @@ -283,7 +283,7 @@ while(1){ case mmioFOURCC('m', 'p', 'g', '4'): case mmioFOURCC('D', 'I', 'V', '1'): idxfix_divx=3; // set index recovery mpeg4 flavour: msmpeg4v1 - mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPG4V1); + mp_tmsg(MSGT_HEADER,MSGL_V,"Regenerating keyframe table for M$ mpg4v1 video.\n"); break; case mmioFOURCC('D', 'I', 'V', '3'): case mmioFOURCC('d', 'i', 'v', '3'): @@ -300,7 +300,7 @@ while(1){ case mmioFOURCC('D', 'I', 'V', '2'): case mmioFOURCC('A', 'P', '4', '1'): idxfix_divx=1; // set index recovery mpeg4 flavour: msmpeg4v3 - mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForDIVX3); + mp_tmsg(MSGT_HEADER,MSGL_V,"Regenerating keyframe table for DIVX3 video.\n"); break; case mmioFOURCC('D', 'I', 'V', 'X'): case mmioFOURCC('d', 'i', 'v', 'x'): @@ -310,7 +310,7 @@ while(1){ case mmioFOURCC('F', 'M', 'P', '4'): case mmioFOURCC('f', 'm', 'p', '4'): idxfix_divx=2; // set index recovery mpeg4 flavour: generic mpeg4 - mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPEG4); + mp_tmsg(MSGT_HEADER,MSGL_V,"Regenerating keyframe table for MPEG-4 video.\n"); break; } } else @@ -318,7 +318,7 @@ while(1){ unsigned wf_size = chunksizewf=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; isuidx_size; cx++, i++) { @@ -479,7 +479,7 @@ if (priv->isodml && (index_mode==-1 || index_mode==0 || index_mode==1)) { // gen_index routine handle this priv->isodml = 0; priv->idx_size = 0; - mp_tmsg(MSGT_HEADER, MSGL_WARN, MSGTR_MPDEMUX_AVIHDR_BrokenODMLfile); + mp_tmsg(MSGT_HEADER, MSGL_WARN, "AVI: ODML: Broken (incomplete?) file detected. Will use traditional index.\n"); goto freeout; } @@ -583,18 +583,18 @@ if (index_file_load) { unsigned int i; if ((fp = fopen(index_file_load, "r")) == NULL) { - mp_tmsg(MSGT_HEADER,MSGL_ERR, MSGTR_MPDEMUX_AVIHDR_CantReadIdxFile, index_file_load, strerror(errno)); + mp_tmsg(MSGT_HEADER,MSGL_ERR, "Can't read index file %s: %s\n", index_file_load, strerror(errno)); goto gen_index; } fread(&magic, 6, 1, fp); if (strncmp(magic, "MPIDX1", 6)) { - mp_tmsg(MSGT_HEADER,MSGL_ERR, MSGTR_MPDEMUX_AVIHDR_NotValidMPidxFile, index_file_load); + mp_tmsg(MSGT_HEADER,MSGL_ERR, "%s is not a valid MPlayer index file.\n", index_file_load); goto gen_index; } fread(&priv->idx_size, sizeof(priv->idx_size), 1, fp); priv->idx=malloc(priv->idx_size*sizeof(AVIINDEXENTRY)); if (!priv->idx) { - mp_tmsg(MSGT_HEADER,MSGL_ERR, MSGTR_MPDEMUX_AVIHDR_FailedMallocForIdxFile, index_file_load); + mp_tmsg(MSGT_HEADER,MSGL_ERR, "Could not allocate memory for index data from %s.\n", index_file_load); priv->idx_size = 0; goto gen_index; } @@ -604,14 +604,14 @@ if (index_file_load) { idx=&((AVIINDEXENTRY *)priv->idx)[i]; fread(idx, sizeof(AVIINDEXENTRY), 1, fp); if (feof(fp)) { - mp_tmsg(MSGT_HEADER,MSGL_ERR, MSGTR_MPDEMUX_AVIHDR_PrematureEOF, index_file_load); + mp_tmsg(MSGT_HEADER,MSGL_ERR, "premature end of index file %s\n", index_file_load); free(priv->idx); priv->idx_size = 0; goto gen_index; } } fclose(fp); - mp_tmsg(MSGT_HEADER,MSGL_INFO, MSGTR_MPDEMUX_AVIHDR_IdxFileLoaded, index_file_load); + mp_tmsg(MSGT_HEADER,MSGL_INFO, "Loaded index file: %s\n", index_file_load); } gen_index: if(index_mode>=2 || (priv->idx_size==0 && index_mode==1)){ @@ -678,7 +678,7 @@ if(index_mode>=2 || (priv->idx_size==0 && index_mode==1)){ } if(pos!=lastpos){ lastpos=pos; - mp_tmsg(MSGT_HEADER,MSGL_STATUS,MSGTR_MPDEMUX_AVIHDR_GeneratingIdx, + mp_tmsg(MSGT_HEADER,MSGL_STATUS, "Generating Index: %3lu %s \r", (unsigned long)pos, len?"%":"MB"); } } @@ -697,7 +697,7 @@ skip_chunk: stream_seek(demuxer->stream,8+demuxer->filepos+skip); } priv->idx_size=priv->idx_pos; - mp_tmsg(MSGT_HEADER,MSGL_INFO,MSGTR_MPDEMUX_AVIHDR_IdxGeneratedForHowManyChunks,priv->idx_size); + mp_tmsg(MSGT_HEADER,MSGL_INFO,"AVI: Generated index table for %d chunks!\n",priv->idx_size); if( mp_msg_test(MSGT_HEADER,MSGL_DBG2) ) print_index(priv->idx,priv->idx_size,MSGL_DBG2); /* Write generated index to a file */ @@ -706,7 +706,7 @@ skip_chunk: unsigned int i; if ((fp=fopen(index_file_save, "w")) == NULL) { - mp_tmsg(MSGT_HEADER,MSGL_ERR, MSGTR_MPDEMUX_AVIHDR_Failed2WriteIdxFile, index_file_save, strerror(errno)); + mp_tmsg(MSGT_HEADER,MSGL_ERR, "Couldn't write index file %s: %s\n", index_file_save, strerror(errno)); return; } fwrite("MPIDX1", 6, 1, fp); @@ -716,7 +716,7 @@ skip_chunk: fwrite(idx, sizeof(AVIINDEXENTRY), 1, fp); } fclose(fp); - mp_tmsg(MSGT_HEADER,MSGL_INFO, MSGTR_MPDEMUX_AVIHDR_IdxFileSaved, index_file_save); + mp_tmsg(MSGT_HEADER,MSGL_INFO, "Saved index file: %s\n", index_file_save); } } } diff --git a/libmpdemux/demux_asf.c b/libmpdemux/demux_asf.c index ac1a16da04..b8be24f965 100644 --- a/libmpdemux/demux_asf.c +++ b/libmpdemux/demux_asf.c @@ -623,7 +623,7 @@ static demuxer_t* demux_open_asf(demuxer_t* demuxer) // demuxer->endpos=avi_header.movi_end; if(demuxer->video->id != -2) { if(!ds_fill_buffer(demuxer->video)){ - mp_tmsg(MSGT_DEMUXER,MSGL_WARN,"ASF: " MSGTR_MissingVideoStream); + mp_tmsg(MSGT_DEMUXER,MSGL_WARN,"ASF: " "No video stream found.\n"); demuxer->video->sh=NULL; //printf("ASF: missing video stream!? contact the author, it may be a bug :(\n"); } else { @@ -638,9 +638,9 @@ static demuxer_t* demux_open_asf(demuxer_t* demuxer) } if(demuxer->audio->id!=-2){ - mp_tmsg(MSGT_DEMUXER,MSGL_V,MSGTR_ASFSearchingForAudioStream,demuxer->audio->id); + mp_tmsg(MSGT_DEMUXER,MSGL_V,"ASF: Searching for audio stream (id:%d).\n",demuxer->audio->id); if(!ds_fill_buffer(demuxer->audio)){ - mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"ASF: " MSGTR_MissingAudioStream); + mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"ASF: " "No audio stream found -> no sound.\n"); demuxer->audio->sh=NULL; } else { sh_audio=demuxer->audio->sh;sh_audio->ds=demuxer->audio; diff --git a/libmpdemux/demux_audio.c b/libmpdemux/demux_audio.c index dd83fbe53c..d374e3d130 100644 --- a/libmpdemux/demux_audio.c +++ b/libmpdemux/demux_audio.c @@ -572,7 +572,7 @@ static int demux_audio_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds) { break; } default: - mp_tmsg(MSGT_DEMUXER,MSGL_WARN,MSGTR_MPDEMUX_AUDIO_UnknownFormat,priv->frmt); + mp_tmsg(MSGT_DEMUXER,MSGL_WARN,"Audio demuxer: unknown format %d.\n",priv->frmt); return 0; } diff --git a/libmpdemux/demux_avi.c b/libmpdemux/demux_avi.c index 396e4d26a7..8ef549cf42 100644 --- a/libmpdemux/demux_avi.c +++ b/libmpdemux/demux_avi.c @@ -56,7 +56,7 @@ static demux_stream_t* demux_avi_select_stream(demuxer_t *demux, // workaround old mencoder's bug: if(sh->audio.dwSampleSize==1 && sh->audio.dwScale==1 && (sh->wf->nBlockAlign==1152 || sh->wf->nBlockAlign==576)){ - mp_tmsg(MSGT_DEMUX,MSGL_WARN,MSGTR_WorkAroundBlockAlignHeaderBug); + mp_tmsg(MSGT_DEMUX,MSGL_WARN,"AVI: Working around CBR-MP3 nBlockAlign header bug!\n"); priv->audio_block_size=1; } } @@ -253,7 +253,7 @@ do{ if(ds) if(ds->packs+1>=MAX_PACKS || ds->bytes+len>=MAX_PACK_BYTES){ // this packet will cause a buffer overflow, switch to -ni mode!!! - mp_tmsg(MSGT_DEMUX,MSGL_WARN,MSGTR_SwitchToNi); + mp_tmsg(MSGT_DEMUX,MSGL_WARN,"\nBadly interleaved AVI file detected - switching to -ni mode...\n"); if(priv->idx_size>0){ // has index demux->type=DEMUXER_TYPE_AVI_NI; @@ -427,11 +427,11 @@ static demuxer_t* demux_open_avi(demuxer_t* demuxer){ read_avi_header(demuxer,(demuxer->stream->flags & STREAM_SEEK_BW)?index_mode:-2); if(demuxer->audio->id>=0 && !demuxer->a_streams[demuxer->audio->id]){ - mp_tmsg(MSGT_DEMUX,MSGL_WARN,MSGTR_InvalidAudioStreamNosound,demuxer->audio->id); + mp_tmsg(MSGT_DEMUX,MSGL_WARN,"AVI: invalid audio stream ID: %d - ignoring (nosound)\n",demuxer->audio->id); demuxer->audio->id=-2; // disabled } if(demuxer->video->id>=0 && !demuxer->v_streams[demuxer->video->id]){ - mp_tmsg(MSGT_DEMUX,MSGL_WARN,MSGTR_InvalidAudioStreamUsingDefault,demuxer->video->id); + mp_tmsg(MSGT_DEMUX,MSGL_WARN,"AVI: invalid video stream ID: %d - ignoring (using default)\n",demuxer->video->id); demuxer->video->id=-1; // autodetect } @@ -479,14 +479,14 @@ static demuxer_t* demux_open_avi(demuxer_t* demuxer){ } } if(v_pos==-1){ - mp_tmsg(MSGT_DEMUX,MSGL_ERR,"AVI_NI: " MSGTR_MissingVideoStream); + mp_tmsg(MSGT_DEMUX,MSGL_ERR,"AVI_NI: " "No video stream found.\n"); return NULL; } if(a_pos==-1){ d_audio->sh=sh_audio=NULL; } else { if(force_ni || abs(a_pos-v_pos)>0x100000){ // distance > 1MB - mp_tmsg(MSGT_DEMUX,MSGL_INFO,MSGTR_NI_Message,force_ni?MSGTR_NI_Forced:MSGTR_NI_Detected); + mp_tmsg(MSGT_DEMUX,MSGL_INFO,"%s NON-INTERLEAVED AVI file format.\n",force_ni?"Forced":"Detected"); demuxer->type=DEMUXER_TYPE_AVI_NI; // HACK!!!! demuxer->desc=&demuxer_desc_avi_ni; // HACK!!!! pts_from_bps=1; // force BPS sync! @@ -495,7 +495,7 @@ static demuxer_t* demux_open_avi(demuxer_t* demuxer){ } else { // no index if(force_ni){ - mp_tmsg(MSGT_DEMUX,MSGL_INFO,MSGTR_UsingNINI); + mp_tmsg(MSGT_DEMUX,MSGL_INFO,"Using NON-INTERLEAVED broken AVI file format.\n"); demuxer->type=DEMUXER_TYPE_AVI_NINI; // HACK!!!! demuxer->desc=&demuxer_desc_avi_nini; // HACK!!!! priv->idx_pos_a= @@ -505,14 +505,14 @@ static demuxer_t* demux_open_avi(demuxer_t* demuxer){ demuxer->seekable=0; } if(!ds_fill_buffer(d_video)){ - mp_tmsg(MSGT_DEMUX,MSGL_ERR,"AVI: " MSGTR_MissingVideoStreamBug); + mp_tmsg(MSGT_DEMUX,MSGL_ERR,"AVI: " "Missing video stream!? Contact the author, it may be a bug :(\n"); return NULL; } sh_video=d_video->sh;sh_video->ds=d_video; if(d_audio->id!=-2){ mp_msg(MSGT_DEMUX,MSGL_V,"AVI: Searching for audio stream (id:%d)\n",d_audio->id); if(!priv->audio_streams || !ds_fill_buffer(d_audio)){ - mp_tmsg(MSGT_DEMUX,MSGL_INFO,"AVI: " MSGTR_MissingAudioStream); + mp_tmsg(MSGT_DEMUX,MSGL_INFO,"AVI: " "No audio stream found -> no sound.\n"); d_audio->sh=sh_audio=NULL; } else { sh_audio=d_audio->sh;sh_audio->ds=d_audio; @@ -552,7 +552,7 @@ static demuxer_t* demux_open_avi(demuxer_t* demuxer){ // bad video header, try to get number of frames from audio if(sh_audio && sh_audio->wf->nAvgBytesPerSec) priv->numberofframes=sh_video->fps*sh_audio->audio.dwLength/sh_audio->audio.dwRate*sh_audio->audio.dwScale; if(priv->numberofframes<=1){ - mp_tmsg(MSGT_SEEK,MSGL_WARN,MSGTR_CouldntDetFNo); + mp_tmsg(MSGT_SEEK,MSGL_WARN,"Could not determine number of frames (for absolute seek).\n"); priv->numberofframes=0; } @@ -828,7 +828,7 @@ static int avi_check_file(demuxer_t *demuxer) if(id==mmioFOURCC('A','V','I',0x19)) return DEMUXER_TYPE_AVI; if(id==mmioFOURCC('O','N','2','f')){ - mp_tmsg(MSGT_DEMUXER,MSGL_INFO,MSGTR_ON2AviFormat); + mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"ON2 AVI format"); return DEMUXER_TYPE_AVI; } } @@ -856,7 +856,7 @@ static demuxer_t* demux_open_hack_avi(demuxer_t *demuxer) s = new_ds_stream(demuxer->audio); od = new_demuxer(opts, s,DEMUXER_TYPE_OGG,-1,-2,-2,NULL); if(!demux_ogg_open(od)) { - mp_tmsg( MSGT_DEMUXER,MSGL_ERR,MSGTR_ErrorOpeningOGGDemuxer); + mp_tmsg( MSGT_DEMUXER,MSGL_ERR,"Unable to open the Ogg demuxer.\n"); free_stream(s); demuxer->audio->id = -2; } else diff --git a/libmpdemux/demux_demuxers.c b/libmpdemux/demux_demuxers.c index 3e055a1e6b..156251c33a 100644 --- a/libmpdemux/demux_demuxers.c +++ b/libmpdemux/demux_demuxers.c @@ -61,7 +61,7 @@ static int demux_demuxers_fill_buffer(demuxer_t *demux,demux_stream_t *ds) { else if(ds->demuxer == priv->sd) return demux_fill_buffer(priv->sd,ds); - mp_tmsg(MSGT_DEMUX,MSGL_WARN,MSGTR_MPDEMUX_DEMUXERS_FillBufferError); + mp_tmsg(MSGT_DEMUX,MSGL_WARN,"fill_buffer error: bad demuxer: not vd, ad or sd.\n"); return 0; } diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index 29bc4e07f6..a7da1a9b36 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -228,7 +228,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { if(priv->audio_streams >= MAX_A_STREAMS) break; sh_audio=new_sh_audio(demuxer, i); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "lavf", i); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "lavf", i); if(!sh_audio) break; priv->astreams[priv->audio_streams] = i; @@ -308,7 +308,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { if(priv->video_streams >= MAX_V_STREAMS) break; sh_video=new_sh_video(demuxer, i); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "lavf", i); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Video stream found, -vid %d\n", "lavf", i); if(!sh_video) break; priv->vstreams[priv->video_streams] = i; priv->video_streams++; @@ -388,7 +388,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { else break; sh_sub = new_sh_sub_sid(demuxer, i, priv->sub_streams); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_SubtitleID, "lavf", priv->sub_streams); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Subtitle stream found, -sid %d\n", "lavf", priv->sub_streams); if(!sh_sub) break; priv->sstreams[priv->sub_streams] = i; sh_sub->type = type; diff --git a/libmpdemux/demux_lmlm4.c b/libmpdemux/demux_lmlm4.c index 46430aefb2..9b4382ba5a 100644 --- a/libmpdemux/demux_lmlm4.c +++ b/libmpdemux/demux_lmlm4.c @@ -328,14 +328,14 @@ static demuxer_t* demux_open_lmlm4(demuxer_t* demuxer){ demuxer->seekable = 0; if(!ds_fill_buffer(demuxer->video)){ - mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"LMLM4: " MSGTR_MissingVideoStream); + mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"LMLM4: " "No video stream found.\n"); demuxer->video->sh=NULL; } else { sh_video=demuxer->video->sh;sh_video->ds=demuxer->video; } if(demuxer->audio->id!=-2) { if(!ds_fill_buffer(demuxer->audio)){ - mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"LMLM4: " MSGTR_MissingAudioStream); + mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"LMLM4: " "No audio stream found -> no sound.\n"); demuxer->audio->sh=NULL; } else { sh_audio=demuxer->audio->sh;sh_audio->ds=demuxer->audio; diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c index 3ddf1c40cd..c8dfd92ba1 100644 --- a/libmpdemux/demux_mkv.c +++ b/libmpdemux/demux_mkv.c @@ -308,7 +308,7 @@ demux_mkv_decode (mkv_track_t *track, uint8_t *src, uint8_t **dest, if (inflateInit (&zstream) != Z_OK) { mp_tmsg (MSGT_DEMUX, MSGL_WARN, - MSGTR_MPDEMUX_MKV_ZlibInitializationFailed); + "[mkv] zlib initialization failed.\n"); return modified; } zstream.next_in = (Bytef *) src; @@ -325,7 +325,7 @@ demux_mkv_decode (mkv_track_t *track, uint8_t *src, uint8_t **dest, if (result != Z_OK && result != Z_STREAM_END) { mp_tmsg (MSGT_DEMUX, MSGL_WARN, - MSGTR_MPDEMUX_MKV_ZlibDecompressionFailed); + "[mkv] zlib decompression failed.\n"); free(*dest); *dest = NULL; inflateEnd (&zstream); @@ -357,7 +357,7 @@ demux_mkv_decode (mkv_track_t *track, uint8_t *src, uint8_t **dest, { lzo_fail: mp_tmsg (MSGT_DEMUX, MSGL_WARN, - MSGTR_MPDEMUX_MKV_LzoDecompressionFailed); + "[mkv] lzo decompression failed.\n"); free(*dest); *dest = NULL; return modified; @@ -545,25 +545,25 @@ demux_mkv_read_trackencodings (demuxer_t *demuxer, mkv_track_t *track) if (e.type == 1) { mp_tmsg(MSGT_DEMUX, MSGL_WARN, - MSGTR_MPDEMUX_MKV_TrackEncrypted, track->tnum); + "[mkv] Track number %u has been encrypted and decryption has not yet been\n[mkv] implemented. Skipping track.\n", track->tnum); } else if (e.type != 0) { mp_tmsg(MSGT_DEMUX, MSGL_WARN, - MSGTR_MPDEMUX_MKV_UnknownContentEncoding, track->tnum); + "[mkv] Unknown content encoding type for track %u. Skipping track.\n", track->tnum); } if (e.comp_algo != 0 && e.comp_algo != 2) { mp_tmsg (MSGT_DEMUX, MSGL_WARN, - MSGTR_MPDEMUX_MKV_UnknownCompression, + "[mkv] Track %u has been compressed with an unknown/unsupported compression\n[mkv] algorithm (%u). Skipping track.\n", track->tnum, e.comp_algo); } #if !CONFIG_ZLIB else if (e.comp_algo == 0) { mp_tmsg (MSGT_DEMUX, MSGL_WARN, - MSGTR_MPDEMUX_MKV_ZlibCompressionUnsupported, + "[mkv] Track %u was compressed with zlib but mplayer has not been compiled\n[mkv] with support for zlib compression. Skipping track.\n", track->tnum); } #endif @@ -1533,10 +1533,10 @@ display_create_tracks (demuxer_t *demuxer) break; } if (mkv_d->tracks[i]->name) - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_MPDEMUX_MKV_TrackIDName, + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[mkv] Track ID %u: %s (%s) \"%s\", %s\n", mkv_d->tracks[i]->tnum, type, mkv_d->tracks[i]->codec_id, mkv_d->tracks[i]->name, str); else - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_MPDEMUX_MKV_TrackID, + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[mkv] Track ID %u: %s (%s), %s\n", mkv_d->tracks[i]->tnum, type, mkv_d->tracks[i]->codec_id, str); } } @@ -1674,7 +1674,7 @@ demux_mkv_open_video (demuxer_t *demuxer, mkv_track_t *track, int vid) } track->reorder_timecodes = opts->user_correct_pts == 0; if (!vi->id) { - mp_tmsg (MSGT_DEMUX,MSGL_WARN, MSGTR_MPDEMUX_MKV_UnknownCodecID, + mp_tmsg (MSGT_DEMUX,MSGL_WARN, "[mkv] Unknown/unsupported CodecID (%s) or missing/bad CodecPrivate\n[mkv] data (track %u).\n", track->codec_id, track->tnum); free(bih); return 1; @@ -1789,7 +1789,7 @@ demux_mkv_open_audio (demuxer_t *demuxer, mkv_track_t *track, int aid) if (track->private_data == NULL || track->private_size == 0) { mp_tmsg (MSGT_DEMUX, MSGL_WARN, - MSGTR_MPDEMUX_MKV_FlacTrackDoesNotContainValidHeaders); + "[mkv] FLAC track does not contain valid headers.\n"); return 1; } track->a_formattag = mmioFOURCC ('f', 'L', 'a', 'C'); @@ -1809,7 +1809,7 @@ demux_mkv_open_audio (demuxer_t *demuxer, mkv_track_t *track, int aid) } else { - mp_tmsg (MSGT_DEMUX, MSGL_WARN, MSGTR_MPDEMUX_MKV_UnknownAudioCodec, + mp_tmsg (MSGT_DEMUX, MSGL_WARN, "[mkv] Unknown/unsupported audio codec ID '%s' for track %u or missing/faulty\n[mkv] private codec data.\n", track->codec_id, track->tnum); free_sh_audio(demuxer, track->tnum); return 1; @@ -2066,7 +2066,7 @@ demux_mkv_open_sub (demuxer_t *demuxer, mkv_track_t *track, int sid) } else { - mp_tmsg (MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_MKV_SubtitleTypeNotSupported, + mp_tmsg (MSGT_DEMUX, MSGL_ERR, "[mkv] Subtitle type '%s' is not supported.\n", track->codec_id); return 1; } @@ -2209,13 +2209,13 @@ demux_mkv_open (demuxer_t *demuxer) if (track && demuxer->v_streams[track->tnum]) { mp_tmsg (MSGT_DEMUX, MSGL_INFO, - MSGTR_MPDEMUX_MKV_WillPlayVideoTrack, track->tnum); + "[mkv] Will play video track %u.\n", track->tnum); demuxer->video->id = track->tnum; demuxer->video->sh = demuxer->v_streams[track->tnum]; } else { - mp_tmsg (MSGT_DEMUX, MSGL_INFO, MSGTR_MPDEMUX_MKV_NoVideoTrackFound); + mp_tmsg (MSGT_DEMUX, MSGL_INFO, "[mkv] No video track found/wanted.\n"); demuxer->video->id = -2; } @@ -2248,7 +2248,7 @@ demux_mkv_open (demuxer_t *demuxer) } else { - mp_tmsg (MSGT_DEMUX, MSGL_INFO, MSGTR_MPDEMUX_MKV_NoAudioTrackFound); + mp_tmsg (MSGT_DEMUX, MSGL_INFO, "[mkv] No audio track found/wanted.\n"); demuxer->audio->id = -2; } @@ -2398,7 +2398,7 @@ handle_subtitles(demuxer_t *demuxer, mkv_track_t *track, char *block, if (block_duration == 0) { mp_msg (MSGT_DEMUX, MSGL_WARN, - MSGTR_MPDEMUX_MKV_NoBlockDurationForSubtitleTrackFound); + "[mkv] Warning: No BlockDuration for subtitle track found.\n"); return; } diff --git a/libmpdemux/demux_mov.c b/libmpdemux/demux_mov.c index c4c764391b..bb05aaeae0 100644 --- a/libmpdemux/demux_mov.c +++ b/libmpdemux/demux_mov.c @@ -1303,7 +1303,7 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak case MOV_FOURCC('t','r','a','k'): { // if(trak) printf("MOV: Warning! trak in trak?\n"); if(priv->track_db>=MOV_MAX_TRACKS){ - mp_tmsg(MSGT_DEMUX,MSGL_WARN,MSGTR_MOVtooManyTrk); + mp_tmsg(MSGT_DEMUX,MSGL_WARN,"MOV: WARNING: too many tracks"); return; } if(!priv->track_db) mp_msg(MSGT_DEMUX, MSGL_V, "--------------\n"); @@ -1317,13 +1317,13 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak switch(trak->type){ case MOV_TRAK_AUDIO: { sh_audio_t* sh=new_sh_audio(demuxer,priv->track_db); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "mov", priv->track_db); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "mov", priv->track_db); gen_sh_audio(sh, trak, priv->timescale); break; } case MOV_TRAK_VIDEO: { sh_video_t* sh=new_sh_video(demuxer,priv->track_db); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "mov", priv->track_db); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Video stream found, -vid %d\n", "mov", priv->track_db); gen_sh_video(sh, trak, priv->timescale); break; } @@ -1332,7 +1332,7 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak trak->fourcc == mmioFOURCC('t','x','3','g') || trak->fourcc == mmioFOURCC('t','e','x','t')) { sh_sub_t *sh = new_sh_sub(demuxer, priv->track_db); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_SubtitleID, "mov", priv->track_db); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Subtitle stream found, -sid %d\n", "mov", priv->track_db); if (trak->fourcc == mmioFOURCC('m','p','4','s')) init_vobsub(sh, trak); else { @@ -1398,13 +1398,13 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak } #if !CONFIG_ZLIB case MOV_FOURCC('c','m','o','v'): { - mp_tmsg(MSGT_DEMUX,MSGL_ERR,MSGTR_MOVcomprhdr); + mp_tmsg(MSGT_DEMUX,MSGL_ERR,"MOV: Compressed headers support requires ZLIB!\n"); return; } #else case MOV_FOURCC('m','o','o','v'): case MOV_FOURCC('c','m','o','v'): { -// mp_tmsg(MSGT_DEMUX,MSGL_ERR,MSGTR_MOVcomprhdr); +// mp_tmsg(MSGT_DEMUX,MSGL_ERR,"MOV: Compressed headers support requires ZLIB!\n"); lschunks(demuxer,level+1,pos+len,NULL); break; } @@ -1728,7 +1728,7 @@ static int lschunks_intrak(demuxer_t* demuxer, int level, unsigned int id, "MOV: %*s desc #%d: %.4s (%"PRId64" bytes)\n", level, "", i, (char *)&fourcc, (int64_t)len - 16); if (fourcc != trak->fourcc && i) - mp_tmsg(MSGT_DEMUX, MSGL_WARN, MSGTR_MOVvariableFourCC); + mp_tmsg(MSGT_DEMUX, MSGL_WARN, "MOV: WARNING: Variable FourCC detected!?\n"); // if(!i) { trak->fourcc = fourcc; diff --git a/libmpdemux/demux_mpg.c b/libmpdemux/demux_mpg.c index 01c1c78ed1..620b44598c 100644 --- a/libmpdemux/demux_mpg.c +++ b/libmpdemux/demux_mpg.c @@ -706,9 +706,9 @@ static int demux_mpg_probe(demuxer_t *demuxer) { } else { if(demuxer->synced==2) - mp_tmsg(MSGT_DEMUXER,MSGL_ERR,"MPEG: " MSGTR_MissingVideoStreamBug); + mp_tmsg(MSGT_DEMUXER,MSGL_ERR,"MPEG: " "Missing video stream!? Contact the author, it may be a bug :(\n"); else - mp_tmsg(MSGT_DEMUXER,MSGL_V,MSGTR_NotSystemStream); + mp_tmsg(MSGT_DEMUXER,MSGL_V,"Not MPEG System Stream format... (maybe Transport Stream?)\n"); } } //FIXME this shouldn't be necessary @@ -847,7 +847,7 @@ do{ if(!ret) if(--max_packs==0){ demux->stream->eof=1; - mp_tmsg(MSGT_DEMUX,MSGL_ERR,MSGTR_DoesntContainSelectedStream); + mp_tmsg(MSGT_DEMUX,MSGL_ERR,"demux: File doesn't contain the selected audio or video stream.\n"); return 0; } if(demux->synced==3) demux->synced=(ret==1)?2:0; // PES detect @@ -1082,7 +1082,7 @@ static demuxer_t* demux_mpg_ps_open(demuxer_t* demuxer) if(demuxer->audio->id!=-2) { if(!ds_fill_buffer(demuxer->audio)){ - mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"MPEG: " MSGTR_MissingAudioStream); + mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"MPEG: " "No audio stream found -> no sound.\n"); demuxer->audio->sh=NULL; } else { sh_audio=demuxer->audio->sh;sh_audio->ds=demuxer->audio; diff --git a/libmpdemux/demux_nut.c b/libmpdemux/demux_nut.c index 17c39bbb4f..d7bb2e8e6c 100644 --- a/libmpdemux/demux_nut.c +++ b/libmpdemux/demux_nut.c @@ -97,7 +97,7 @@ static demuxer_t * demux_open_nut(demuxer_t * demuxer) { s[i].codec_specific_len, 1); sh_audio_t* sh_audio = new_sh_audio(demuxer, i); int j; - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "nut", i); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "nut", i); sh_audio->wf= wf; sh_audio->ds = demuxer->audio; sh_audio->audio.dwSampleSize = 0; // FIXME @@ -133,7 +133,7 @@ static demuxer_t * demux_open_nut(demuxer_t * demuxer) { s[i].codec_specific_len, 1); sh_video_t * sh_video = new_sh_video(demuxer, i); int j; - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "nut", i); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Video stream found, -vid %d\n", "nut", i); sh_video->bih = bih; sh_video->ds = demuxer->video; diff --git a/libmpdemux/demux_real.c b/libmpdemux/demux_real.c index 24e63e75b4..5c4497e4e5 100644 --- a/libmpdemux/demux_real.c +++ b/libmpdemux/demux_real.c @@ -1266,7 +1266,7 @@ static demuxer_t* demux_open_real(demuxer_t* demuxer) int i; char *buft; int hdr_size; - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "real", stream_id); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "real", stream_id); mp_msg(MSGT_DEMUX,MSGL_V,"Found audio stream!\n"); version = stream_read_word(demuxer->stream); mp_msg(MSGT_DEMUX,MSGL_V,"version: %d\n", version); @@ -1467,7 +1467,7 @@ static demuxer_t* demux_open_real(demuxer_t* demuxer) } } else if (strstr(mimet,"X-MP3-draft-00")) { sh_audio_t *sh = new_sh_audio(demuxer, stream_id); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "real", stream_id); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "real", stream_id); /* Emulate WAVEFORMATEX struct: */ sh->wf = malloc(sizeof(WAVEFORMATEX)); @@ -1503,7 +1503,7 @@ static demuxer_t* demux_open_real(demuxer_t* demuxer) } else { /* video header */ sh_video_t *sh = new_sh_video(demuxer, stream_id); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "real", stream_id); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Video stream found, -vid %d\n", "real", stream_id); sh->format = stream_read_dword_le(demuxer->stream); /* fourcc */ mp_msg(MSGT_DEMUX,MSGL_V,"video fourcc: %.4s (%x)\n", (char *)&sh->format, sh->format); @@ -1726,13 +1726,13 @@ header_end: if(demuxer->video->id==-1 && v_streams>0){ // find the valid video stream: if(!ds_fill_buffer(demuxer->video)){ - mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"RM: " MSGTR_MissingVideoStream); + mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"RM: " "No video stream found.\n"); } } if(demuxer->audio->id==-1 && a_streams>0){ // find the valid audio stream: if(!ds_fill_buffer(demuxer->audio)){ - mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"RM: " MSGTR_MissingAudioStream); + mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"RM: " "No audio stream found -> no sound.\n"); } } diff --git a/libmpdemux/demux_ty.c b/libmpdemux/demux_ty.c index 5f6d195767..77dfbe7fd5 100644 --- a/libmpdemux/demux_ty.c +++ b/libmpdemux/demux_ty.c @@ -870,7 +870,7 @@ static demuxer_t* demux_open_ty(demuxer_t* demuxer) if(demuxer->audio->id!=-2) { if(!ds_fill_buffer(demuxer->audio)){ - mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"MPEG: " MSGTR_MissingAudioStream); + mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"MPEG: " "No audio stream found -> no sound.\n"); demuxer->audio->sh=NULL; } else { sh_audio=demuxer->audio->sh;sh_audio->ds=demuxer->audio; diff --git a/libmpdemux/demux_viv.c b/libmpdemux/demux_viv.c index 3482167039..6db7276b41 100644 --- a/libmpdemux/demux_viv.c +++ b/libmpdemux/demux_viv.c @@ -543,7 +543,7 @@ static demuxer_t* demux_open_vivo(demuxer_t* demuxer){ vivo_priv_t* priv=demuxer->priv; if(!ds_fill_buffer(demuxer->video)){ - mp_tmsg(MSGT_DEMUX,MSGL_ERR,"VIVO: " MSGTR_MissingVideoStreamBug); + mp_tmsg(MSGT_DEMUX,MSGL_ERR,"VIVO: " "Missing video stream!? Contact the author, it may be a bug :(\n"); return NULL; } @@ -626,7 +626,7 @@ static demuxer_t* demux_open_vivo(demuxer_t* demuxer){ /* AUDIO init */ if (demuxer->audio->id >= -1){ if(!ds_fill_buffer(demuxer->audio)){ - mp_tmsg(MSGT_DEMUX,MSGL_ERR,"VIVO: " MSGTR_MissingAudioStream); + mp_tmsg(MSGT_DEMUX,MSGL_ERR,"VIVO: " "No audio stream found -> no sound.\n"); } else { sh_audio_t* sh=new_sh_audio(demuxer,1); diff --git a/libmpdemux/demux_xmms.c b/libmpdemux/demux_xmms.c index 1e95738dd9..a75def6e33 100644 --- a/libmpdemux/demux_xmms.c +++ b/libmpdemux/demux_xmms.c @@ -195,7 +195,7 @@ static void init_plugins_from_dir(const char *plugin_dir){ gpi=dlsym(handle, "get_iplugin_info"); if(gpi){ InputPlugin *p=gpi(); - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_MPDEMUX_XMMS_FoundPlugin, + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "Found plugin: %s (%s).\n", ent->d_name,p->description); p->handle = handle; p->filename = strdup(filename); @@ -230,7 +230,7 @@ static void init_plugins(void) { static void cleanup_plugins(void) { while(no_plugins>0){ --no_plugins; - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_MPDEMUX_XMMS_ClosingPlugin, + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "Closing plugin: %s.\n", input_plugins[no_plugins]->filename); if(input_plugins[no_plugins]->cleanup) input_plugins[no_plugins]->cleanup(); @@ -284,7 +284,7 @@ static int demux_xmms_open(demuxer_t* demuxer) { ip->get_song_info(demuxer->stream->url,&xmms_title,&xmms_length); if (xmms_length<=0) demuxer->seekable=0; - mp_tmsg(MSGT_DEMUX,MSGL_INFO,MSGTR_MPDEMUX_XMMS_WaitForStart, + mp_tmsg(MSGT_DEMUX,MSGL_INFO,"Waiting for the XMMS plugin to start playback of '%s'...\n", demuxer->stream->url); while (xmms_channels==0) { usleep(10000); diff --git a/libmpdemux/demuxer.c b/libmpdemux/demuxer.c index 468a651bfc..46662cb926 100644 --- a/libmpdemux/demuxer.c +++ b/libmpdemux/demuxer.c @@ -288,9 +288,9 @@ sh_audio_t *new_sh_audio_aid(demuxer_t *demuxer, int id, int aid) return NULL; } if (demuxer->a_streams[id]) { - mp_tmsg(MSGT_DEMUXER, MSGL_WARN, MSGTR_AudioStreamRedefined, id); + mp_tmsg(MSGT_DEMUXER, MSGL_WARN, "WARNING: Audio stream header %d redefined.\n", id); } else { - mp_tmsg(MSGT_DEMUXER, MSGL_V, MSGTR_FoundAudioStream, id); + mp_tmsg(MSGT_DEMUXER, MSGL_V, "==> Found audio stream: %d\n", id); sh_audio_t *sh = calloc(1, sizeof(sh_audio_t)); demuxer->a_streams[id] = sh; sh->aid = aid; @@ -326,9 +326,9 @@ sh_video_t *new_sh_video_vid(demuxer_t *demuxer, int id, int vid) return NULL; } if (demuxer->v_streams[id]) - mp_tmsg(MSGT_DEMUXER, MSGL_WARN, MSGTR_VideoStreamRedefined, id); + mp_tmsg(MSGT_DEMUXER, MSGL_WARN, "WARNING: Video stream header %d redefined.\n", id); else { - mp_tmsg(MSGT_DEMUXER, MSGL_V, MSGTR_FoundVideoStream, id); + mp_tmsg(MSGT_DEMUXER, MSGL_V, "==> Found video stream: %d\n", id); sh_video_t *sh = calloc(1, sizeof *sh); demuxer->v_streams[id] = sh; sh->vid = vid; @@ -505,18 +505,22 @@ int ds_fill_buffer(demux_stream_t *ds) ds->eof = 0; return 1; } + +#define MaybeNI _("Maybe you are playing a non-interleaved stream/file or the codec failed?\n" \ + "For AVI files, try to force non-interleaved mode with the -ni option.\n") + if (demux->audio->packs >= MAX_PACKS || demux->audio->bytes >= MAX_PACK_BYTES) { - mp_tmsg(MSGT_DEMUXER, MSGL_ERR, MSGTR_TooManyAudioInBuffer, + mp_tmsg(MSGT_DEMUXER, MSGL_ERR, "\nToo many audio packets in the buffer: (%d in %d bytes).\n", demux->audio->packs, demux->audio->bytes); - mp_tmsg(MSGT_DEMUXER, MSGL_HINT, MSGTR_MaybeNI); + mp_tmsg(MSGT_DEMUXER, MSGL_HINT, MaybeNI); break; } if (demux->video->packs >= MAX_PACKS || demux->video->bytes >= MAX_PACK_BYTES) { - mp_tmsg(MSGT_DEMUXER, MSGL_ERR, MSGTR_TooManyVideoInBuffer, + mp_tmsg(MSGT_DEMUXER, MSGL_ERR, "\nToo many video packets in the buffer: (%d in %d bytes).\n", demux->video->packs, demux->video->bytes); - mp_tmsg(MSGT_DEMUXER, MSGL_HINT, MSGTR_MaybeNI); + mp_tmsg(MSGT_DEMUXER, MSGL_HINT, MaybeNI); break; } if (!demux_fill_buffer(demux, ds)) { @@ -677,16 +681,16 @@ double ds_get_next_pts(demux_stream_t *ds) while (!ds->first) { if (demux->audio->packs >= MAX_PACKS || demux->audio->bytes >= MAX_PACK_BYTES) { - mp_tmsg(MSGT_DEMUXER, MSGL_ERR, MSGTR_TooManyAudioInBuffer, + mp_tmsg(MSGT_DEMUXER, MSGL_ERR, "\nToo many audio packets in the buffer: (%d in %d bytes).\n", demux->audio->packs, demux->audio->bytes); - mp_tmsg(MSGT_DEMUXER, MSGL_HINT, MSGTR_MaybeNI); + mp_tmsg(MSGT_DEMUXER, MSGL_HINT, MaybeNI); return MP_NOPTS_VALUE; } if (demux->video->packs >= MAX_PACKS || demux->video->bytes >= MAX_PACK_BYTES) { - mp_tmsg(MSGT_DEMUXER, MSGL_ERR, MSGTR_TooManyVideoInBuffer, + mp_tmsg(MSGT_DEMUXER, MSGL_ERR, "\nToo many video packets in the buffer: (%d in %d bytes).\n", demux->video->packs, demux->video->bytes); - mp_tmsg(MSGT_DEMUXER, MSGL_HINT, MSGTR_MaybeNI); + mp_tmsg(MSGT_DEMUXER, MSGL_HINT, MaybeNI); return MP_NOPTS_VALUE; } if (!demux_fill_buffer(demux, ds)) @@ -798,7 +802,7 @@ static demuxer_t *demux_open_stream(struct MPOpts *opts, stream_t *stream, demuxer_t *demux2 = demuxer; // Move messages to demuxer detection code? mp_tmsg(MSGT_DEMUXER, MSGL_INFO, - MSGTR_Detected_XXX_FileFormat, + "%s file format detected.\n", demuxer_desc->shortdesc); file_format = fformat; if (!demuxer->desc->open @@ -828,7 +832,7 @@ static demuxer_t *demux_open_stream(struct MPOpts *opts, stream_t *stream, if (fformat == demuxer_desc->type) { demuxer_t *demux2 = demuxer; mp_tmsg(MSGT_DEMUXER, MSGL_INFO, - MSGTR_Detected_XXX_FileFormat, + "%s file format detected.\n", demuxer_desc->shortdesc); file_format = fformat; if (!demuxer->desc->open @@ -882,7 +886,7 @@ static demuxer_t *demux_open_stream(struct MPOpts *opts, stream_t *stream, if (fformat == demuxer_desc->type) { demuxer_t *demux2 = demuxer; mp_tmsg(MSGT_DEMUXER, MSGL_INFO, - MSGTR_Detected_XXX_FileFormat, + "%s file format detected.\n", demuxer_desc->shortdesc); file_format = fformat; if (!demuxer->desc->open @@ -986,7 +990,7 @@ demuxer_t *demux_open(struct MPOpts *opts, stream_t *vs, int file_format, if (audio_stream) { as = open_stream(audio_stream, 0, &afmt); if (!as) { - mp_tmsg(MSGT_DEMUXER, MSGL_ERR, MSGTR_CannotOpenAudioStream, + mp_tmsg(MSGT_DEMUXER, MSGL_ERR, "Cannot open audio stream: %s\n", audio_stream); return NULL; } @@ -1007,7 +1011,7 @@ demuxer_t *demux_open(struct MPOpts *opts, stream_t *vs, int file_format, if (sub_stream) { ss = open_stream(sub_stream, 0, &sfmt); if (!ss) { - mp_tmsg(MSGT_DEMUXER, MSGL_ERR, MSGTR_CannotOpenSubtitlesStream, + mp_tmsg(MSGT_DEMUXER, MSGL_ERR, "Cannot open subtitle stream: %s\n", sub_stream); return NULL; } @@ -1029,7 +1033,7 @@ demuxer_t *demux_open(struct MPOpts *opts, stream_t *vs, int file_format, audio_demuxer_force, audio_id, -2, -2, audio_stream); if (!ad) { - mp_tmsg(MSGT_DEMUXER, MSGL_WARN, MSGTR_OpeningAudioDemuxerFailed, + mp_tmsg(MSGT_DEMUXER, MSGL_WARN, "Failed to open audio demuxer: %s\n", audio_stream); free_stream(as); } else if (ad->audio->sh @@ -1043,7 +1047,7 @@ demuxer_t *demux_open(struct MPOpts *opts, stream_t *vs, int file_format, sub_stream); if (!sd) { mp_tmsg(MSGT_DEMUXER, MSGL_WARN, - MSGTR_OpeningSubtitlesDemuxerFailed, sub_stream); + "Failed to open subtitle demuxer: %s\n", sub_stream); free_stream(ss); } } @@ -1085,13 +1089,13 @@ int demux_seek(demuxer_t *demuxer, float rel_seek_secs, float audio_delay, if (!demuxer->seekable) { if (demuxer->file_format == DEMUXER_TYPE_AVI) - mp_tmsg(MSGT_SEEK, MSGL_WARN, MSGTR_CantSeekRawAVI); + mp_tmsg(MSGT_SEEK, MSGL_WARN, "Cannot seek in raw AVI streams. (Index required, try with the -idx switch.)\n"); #ifdef CONFIG_TV else if (demuxer->file_format == DEMUXER_TYPE_TV) - mp_tmsg(MSGT_SEEK, MSGL_WARN, MSGTR_TVInputNotSeekable); + mp_tmsg(MSGT_SEEK, MSGL_WARN, "TV input is not seekable! (Seeking will probably be for changing channels ;)\n"); #endif else - mp_tmsg(MSGT_SEEK, MSGL_WARN, MSGTR_CantSeekFile); + mp_tmsg(MSGT_SEEK, MSGL_WARN, "Cannot seek in this file.\n"); return 0; } // clear demux buffers: @@ -1146,7 +1150,7 @@ int demux_info_add(demuxer_t *demuxer, const char *opt, const char *param) for (n = 0; info && info[2 * n] != NULL; n++) { if (!strcasecmp(opt, info[2 * n])) { - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_DemuxerInfoChanged, opt, + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "Demuxer info %s changed to %s\n", opt, param); free(info[2 * n + 1]); info[2 * n + 1] = strdup(param); @@ -1171,7 +1175,7 @@ int demux_info_print(demuxer_t *demuxer) if (!info) return 0; - mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_ClipInfo); + mp_tmsg(MSGT_DEMUX, MSGL_INFO, "Clip info:\n"); for (n = 0; info[2 * n] != NULL; n++) { mp_msg(MSGT_DEMUX, MSGL_INFO, " %s: %s\n", info[2 * n], info[2 * n + 1]); @@ -1321,7 +1325,7 @@ int demuxer_add_chapter(demuxer_t *demuxer, const char *name, uint64_t start, demuxer->chapters[demuxer->num_chapters].start = start; demuxer->chapters[demuxer->num_chapters].end = end; - demuxer->chapters[demuxer->num_chapters].name = strdup(name ? name : mp_gtext(MSGTR_Unknown)); + demuxer->chapters[demuxer->num_chapters].name = strdup(name ? name : mp_gtext("unknown")); return demuxer->num_chapters++; } diff --git a/libmpdemux/muxer.c b/libmpdemux/muxer.c index f265aee5b5..858c21546b 100644 --- a/libmpdemux/muxer.c +++ b/libmpdemux/muxer.c @@ -68,7 +68,7 @@ void muxer_write_chunk(muxer_stream_t *s, size_t len, unsigned int flags, double tmp = realloc_struct(s->muxer->muxbuf, (num+1), sizeof(muxbuf_t)); if(!tmp) { - mp_tmsg(MSGT_MUXER, MSGL_FATAL, MSGTR_MuxbufReallocErr); + mp_tmsg(MSGT_MUXER, MSGL_FATAL, "Muxer frame buffer cannot reallocate memory!\n"); return; } s->muxer->muxbuf = tmp; @@ -82,7 +82,7 @@ void muxer_write_chunk(muxer_stream_t *s, size_t len, unsigned int flags, double buf->flags = flags; buf->buffer = malloc(len); if (!buf->buffer) { - mp_tmsg(MSGT_MUXER, MSGL_FATAL, MSGTR_MuxbufMallocErr); + mp_tmsg(MSGT_MUXER, MSGL_FATAL, "Muxer frame buffer cannot allocate memory!\n"); return; } memcpy(buf->buffer, s->buffer, buf->len); @@ -96,7 +96,7 @@ void muxer_write_chunk(muxer_stream_t *s, size_t len, unsigned int flags, double /* see if we can flush buffer now */ if (s->muxer->muxbuf_skip_buffer) { - mp_tmsg(MSGT_MUXER, MSGL_V, MSGTR_MuxbufSending, s->muxer->muxbuf_num); + mp_tmsg(MSGT_MUXER, MSGL_V, "Muxer frame buffer sending %d frame(s) to the muxer.\n", s->muxer->muxbuf_num); /* fix parameters for all streams */ for (num = 0; s->muxer->streams[num]; ++num) { @@ -139,7 +139,7 @@ void muxer_write_chunk(muxer_stream_t *s, size_t len, unsigned int flags, double if(s->h.dwSampleSize){ // CBR s->h.dwLength+=len/s->h.dwSampleSize; - if(len%s->h.dwSampleSize) mp_tmsg(MSGT_MUXER, MSGL_WARN, MSGTR_WarningLenIsntDivisible); + if(len%s->h.dwSampleSize) mp_tmsg(MSGT_MUXER, MSGL_WARN, "Warning, len isn't divisible by samplesize!\n"); } else { // VBR s->h.dwLength++; diff --git a/libmpdemux/muxer_avi.c b/libmpdemux/muxer_avi.c index b34d9b7101..6eab6fc569 100644 --- a/libmpdemux/muxer_avi.c +++ b/libmpdemux/muxer_avi.c @@ -273,7 +273,7 @@ static void avifile_write_header(muxer_t *muxer){ struct avi_stream_info *vsi = muxer->def_v->priv; int isodml = vsi->riffofspos > 0; - mp_tmsg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingHeader); + mp_tmsg(MSGT_MUXER, MSGL_INFO, "Writing header...\n"); if (aspect == 0) { mp_msg(MSGT_MUXER, MSGL_INFO, "ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.\n"); } else { @@ -285,11 +285,11 @@ static void avifile_write_header(muxer_t *muxer){ muxer_stream_t *s = muxer->streams[i]; if (s->type == MUXER_TYPE_AUDIO && muxer->audio_delay_fix > 0.0) { s->h.dwStart = muxer->audio_delay_fix * s->h.dwRate/s->h.dwScale + 0.5; - mp_tmsg(MSGT_MUXER, MSGL_INFO, MSGTR_SettingAudioDelay, (float)s->h.dwStart * s->h.dwScale/s->h.dwRate); + mp_tmsg(MSGT_MUXER, MSGL_INFO, "Setting audio delay to %5.3fs.\n", (float)s->h.dwStart * s->h.dwScale/s->h.dwRate); } if (s->type == MUXER_TYPE_VIDEO && muxer->audio_delay_fix < 0.0) { s->h.dwStart = -muxer->audio_delay_fix * s->h.dwRate/s->h.dwScale + 0.5; - mp_tmsg(MSGT_MUXER, MSGL_INFO, MSGTR_SettingVideoDelay, (float)s->h.dwStart * s->h.dwScale/s->h.dwRate); + mp_tmsg(MSGT_MUXER, MSGL_INFO, "Setting video delay to %5.3fs.\n", (float)s->h.dwStart * s->h.dwScale/s->h.dwRate); } } @@ -652,7 +652,7 @@ static void avifile_write_standard_index(muxer_t *muxer){ static void avifile_write_index(muxer_t *muxer){ struct avi_stream_info *vsi = muxer->def_v->priv; - mp_tmsg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingTrailer); + mp_tmsg(MSGT_MUXER, MSGL_INFO, "Writing index...\n"); if (vsi->riffofspos > 0){ avifile_odml_write_index(muxer); } else { diff --git a/libmpdemux/muxer_lavf.c b/libmpdemux/muxer_lavf.c index 5f0ca51e16..f208d52df0 100644 --- a/libmpdemux/muxer_lavf.c +++ b/libmpdemux/muxer_lavf.c @@ -272,7 +272,7 @@ static void write_header(muxer_t *muxer) { muxer_priv_t *priv = (muxer_priv_t *) muxer->priv; - mp_tmsg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingHeader); + mp_tmsg(MSGT_MUXER, MSGL_INFO, "Writing header...\n"); av_write_header(priv->oc); muxer->cont_write_header = NULL; } @@ -283,7 +283,7 @@ static void write_trailer(muxer_t *muxer) int i; muxer_priv_t *priv = (muxer_priv_t *) muxer->priv; - mp_tmsg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingTrailer); + mp_tmsg(MSGT_MUXER, MSGL_INFO, "Writing index...\n"); av_write_trailer(priv->oc); for(i = 0; i < priv->oc->nb_streams; i++) { diff --git a/libmpdemux/muxer_mpeg.c b/libmpdemux/muxer_mpeg.c index d9c9dd7341..9d00a7bdd1 100644 --- a/libmpdemux/muxer_mpeg.c +++ b/libmpdemux/muxer_mpeg.c @@ -2376,7 +2376,7 @@ static void mpegfile_write_index(muxer_t *muxer) double fake_timer; muxer_priv_t *priv = (muxer_priv_t *) muxer->priv; - mp_tmsg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingTrailer); + mp_tmsg(MSGT_MUXER, MSGL_INFO, "Writing index...\n"); for(i = 0; i < muxer->avih.dwStreams; i++) { @@ -2398,7 +2398,7 @@ static void mpegfile_write_header(muxer_t *muxer) { muxer_priv_t *priv = (muxer_priv_t*) muxer->priv; - mp_tmsg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingHeader); + mp_tmsg(MSGT_MUXER, MSGL_INFO, "Writing header...\n"); priv->headers_cnt++; diff --git a/libmpdemux/muxer_rawaudio.c b/libmpdemux/muxer_rawaudio.c index f88c225277..69abf8200b 100644 --- a/libmpdemux/muxer_rawaudio.c +++ b/libmpdemux/muxer_rawaudio.c @@ -16,7 +16,7 @@ static muxer_stream_t* rawaudiofile_new_stream(muxer_t *muxer,int type){ muxer_stream_t* s; if (!muxer) return NULL; if(type==MUXER_TYPE_AUDIO && muxer->avih.dwStreams>=1){ - mp_tmsg(MSGT_MUXER,MSGL_ERR,MSGTR_TooManyStreams" "MSGTR_RawMuxerOnlyOneStream); + mp_tmsg(MSGT_MUXER,MSGL_ERR,"Too many streams!"" ""Rawaudio muxer supports only one audio stream!\n"); return NULL; } s=malloc(sizeof(muxer_stream_t)); @@ -35,12 +35,12 @@ static muxer_stream_t* rawaudiofile_new_stream(muxer_t *muxer,int type){ muxer->avih.dwStreams++; break; case MUXER_TYPE_VIDEO: - mp_tmsg(MSGT_MUXER,MSGL_WARN,MSGTR_IgnoringVideoStream); + mp_tmsg(MSGT_MUXER,MSGL_WARN,"Ignoring video stream!\n"); s->ckid=mmioFOURCC(('0'+s->id/10),('0'+(s->id%10)),'d','c'); s->h.fccType=streamtypeAUDIO; break; default: - mp_tmsg(MSGT_MUXER,MSGL_ERR,MSGTR_UnknownStreamType,type); + mp_tmsg(MSGT_MUXER,MSGL_ERR,"Warning, unknown stream type: %d\n",type); return NULL; } return s; diff --git a/libmpdemux/video.c b/libmpdemux/video.c index 9c8e0a7a0e..2d7e064202 100644 --- a/libmpdemux/video.c +++ b/libmpdemux/video.c @@ -114,7 +114,7 @@ switch(video_codec){ videobuffer=(char*)memalign(8,VIDEOBUFFER_SIZE + MP_INPUT_BUFFER_PADDING_SIZE); if (videobuffer) memset(videobuffer+VIDEOBUFFER_SIZE, 0, MP_INPUT_BUFFER_PADDING_SIZE); else { - mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_ShMemAllocFail); + mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,"Cannot allocate shared memory.\n"); return 0; } } @@ -207,7 +207,7 @@ switch(video_codec){ videobuffer=(char*)memalign(8,VIDEOBUFFER_SIZE + MP_INPUT_BUFFER_PADDING_SIZE); if (videobuffer) memset(videobuffer+VIDEOBUFFER_SIZE, 0, MP_INPUT_BUFFER_PADDING_SIZE); else { - mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_ShMemAllocFail); + mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,"Cannot allocate shared memory.\n"); return 0; } } @@ -260,7 +260,7 @@ mpeg_header_parser: if(i==0x1B3) break; // found it! if(!i || !skip_video_packet(d_video)){ if( mp_msg_test(MSGT_DECVIDEO,MSGL_V) ) mp_msg(MSGT_DECVIDEO,MSGL_V,"NONE :(\n"); - mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_MpegNoSequHdr); + mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,"MPEG: FATAL: EOF while searching for sequence header.\n"); return 0; } } @@ -270,27 +270,27 @@ mpeg_header_parser: videobuffer=(char*)memalign(8,VIDEOBUFFER_SIZE + MP_INPUT_BUFFER_PADDING_SIZE); if (videobuffer) memset(videobuffer+VIDEOBUFFER_SIZE, 0, MP_INPUT_BUFFER_PADDING_SIZE); else { - mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_ShMemAllocFail); + mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,"Cannot allocate shared memory.\n"); return 0; } } if(!read_video_packet(d_video)){ - mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_CannotReadMpegSequHdr); + mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,"FATAL: Cannot read sequence header.\n"); return 0; } if(mp_header_process_sequence_header (&picture, &videobuffer[4])) { - mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_BadMpegSequHdr); + mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,"MPEG: bad sequence header\n"); goto mpeg_header_parser; } if(sync_video_packet(d_video)==0x1B5){ // next packet is seq. ext. int pos=videobuf_len; if(!read_video_packet(d_video)){ - mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_CannotReadMpegSequHdrEx); + mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,"FATAL: Cannot read sequence header extension.\n"); return 0; } if(mp_header_process_extension (&picture, &videobuffer[pos+4])) { - mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_BadMpegSequHdrEx); + mp_tmsg(MSGT_DECVIDEO,MSGL_ERR,"MPEG: bad sequence header extension\n"); return 0; } } @@ -338,7 +33