summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/asfheader.c28
-rw-r--r--libmpdemux/aviheader.c50
-rw-r--r--libmpdemux/demux_asf.c6
-rw-r--r--libmpdemux/demux_audio.c2
-rw-r--r--libmpdemux/demux_avi.c24
-rw-r--r--libmpdemux/demux_demuxers.c2
-rw-r--r--libmpdemux/demux_lavf.c6
-rw-r--r--libmpdemux/demux_lmlm4.c4
-rw-r--r--libmpdemux/demux_mkv.c34
-rw-r--r--libmpdemux/demux_mov.c14
-rw-r--r--libmpdemux/demux_mpg.c8
-rw-r--r--libmpdemux/demux_nut.c4
-rw-r--r--libmpdemux/demux_real.c10
-rw-r--r--libmpdemux/demux_ty.c2
-rw-r--r--libmpdemux/demux_viv.c4
-rw-r--r--libmpdemux/demux_xmms.c6
-rw-r--r--libmpdemux/demuxer.c54
-rw-r--r--libmpdemux/muxer.c8
-rw-r--r--libmpdemux/muxer_avi.c8
-rw-r--r--libmpdemux/muxer_lavf.c4
-rw-r--r--libmpdemux/muxer_mpeg.c4
-rw-r--r--libmpdemux/muxer_rawaudio.c6
-rw-r--r--libmpdemux/video.c22
23 files changed, 157 insertions, 153 deletions
diff --git a/libmpdemux/asfheader.c b/libmpdemux/asfheader.c
index d44d92852f..93f47877bc 100644
--- a/libmpdemux/asfheader.c
+++ b/libmpdemux/asfheader.c
@@ -37,7 +37,7 @@ static char* get_ucs2str(const uint16_t* inbuf, uint16_t inlen)
int i;
if (!outbuf) {
- mp_tmsg(MSGT_HEADER, MSGL_ERR, MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_HEADER, MSGL_ERR, "Memory allocation failed.\n");
return NULL;
}
q = outbuf;
@@ -269,7 +269,7 @@ static int get_meta(char *buf, int buf_len, int this_stream_num,
if (record_entry.stream_num && record_entry.stream_num != this_stream_num)
continue;
if (!(name = get_ucs2str(record_entry.name, record_entry.name_length))) {
- mp_tmsg(MSGT_HEADER, MSGL_ERR, MSGTR_MemAllocFailed);
+ mp_tmsg(MSGT_HEADER, MSGL_ERR, "Memory allocation failed.\n");
continue;
}
if (strcmp(name, "AspectRatioX") == 0)
@@ -322,7 +322,7 @@ static int is_drm(char* buf, int buf_len)
buf += 4;
buf[url_len - 1] = '\0';
- mp_tmsg(MSGT_HEADER, MSGL_INFO, MSGTR_MPDEMUX_ASFHDR_DRMLicenseURL, buf);
+ mp_tmsg(MSGT_HEADER, MSGL_INFO, "DRM License URL: %s\n", buf);
return 1;
}
@@ -385,14 +385,14 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){
}
if (hdr_len > 1024 * 1024) {
- mp_tmsg(MSGT_HEADER, MSGL_ERR, MSGTR_MPDEMUX_ASFHDR_HeaderSizeOver1MB,
+ mp_tmsg(MSGT_HEADER, MSGL_ERR, "FATAL: header size bigger than 1 MB (%d)!\nPlease contact MPlayer authors, and upload/send this file.\n",
hdr_len);
hdr_skip = hdr_len - 1024 * 1024;
hdr_len = 1024 * 1024;
}
hdr = malloc(hdr_len);
if (!hdr) {
- mp_tmsg(MSGT_HEADER, MSGL_FATAL, MSGTR_MPDEMUX_ASFHDR_HeaderMallocFailed,
+ mp_tmsg(MSGT_HEADER, MSGL_FATAL, "Could not allocate %d bytes for header.\n",
hdr_len);
return 0;
}
@@ -400,12 +400,12 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){
if (hdr_skip)
stream_skip(demuxer->stream, hdr_skip);
if (stream_eof(demuxer->stream)) {
- mp_tmsg(MSGT_HEADER, MSGL_FATAL, MSGTR_MPDEMUX_ASFHDR_EOFWhileReadingHeader);
+ mp_tmsg(MSGT_HEADER, MSGL_FATAL, "EOF while reading ASF header, broken/incomplete file?\n");
goto err_out;
}
if (is_drm(hdr, hdr_len))
- mp_tmsg(MSGT_HEADER, MSGL_FATAL, MSGTR_MPDEMUX_ASFHDR_DRMProtected);
+ mp_tmsg(MSGT_HEADER, MSGL_FATAL, "This file has been encumbered with DRM encryption, it will not play in MPlayer!\n");
if ((pos = find_asf_guid(hdr, asf_ext_stream_audio, 0, hdr_len)) >= 0)
{
@@ -427,7 +427,7 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){
audio_pos += 64; //16+16+4+4+4+16+4;
buffer = &hdr[audio_pos];
sh_audio=new_sh_audio(demuxer,streamh->stream_no & 0x7F);
- mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "asfheader", streamh->stream_no & 0x7F);
+ mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "asfheader", streamh->stream_no & 0x7F);
++audio_streams;
if (!asf_init_audio_stream(demuxer, asf, sh_audio, streamh, &audio_pos, &buffer, hdr, hdr_len))
goto len_err_out;
@@ -464,7 +464,7 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){
switch(ASF_LOAD_GUID_PREFIX(streamh->type)){
case ASF_GUID_PREFIX_audio_stream: {
sh_audio_t* sh_audio=new_sh_audio(demuxer,streamh->stream_no & 0x7F);
- mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "asfheader", streamh->stream_no & 0x7F);
+ mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "asfheader", streamh->stream_no & 0x7F);
++audio_streams;
if (!asf_init_audio_stream(demuxer, asf, sh_audio, streamh, &pos, &buffer, hdr, hdr_len))
goto len_err_out;
@@ -475,7 +475,7 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){
unsigned int len;
float asp_ratio;
sh_video_t* sh_video=new_sh_video(demuxer,streamh->stream_no & 0x7F);
- mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "asfheader", streamh->stream_no & 0x7F);
+ mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Video stream found, -vid %d\n", "asfheader", streamh->stream_no & 0x7F);
len=streamh->type_size-(4+4+1+2);
++video_streams;
// sh_video->bih=malloc(chunksize); memset(sh_video->bih,0,chunksize);
@@ -485,7 +485,7 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){
if (sh_video->bih->biSize > len && sh_video->bih->biSize > sizeof(BITMAPINFOHEADER))
sh_video->bih->biSize = len;
if (sh_video->bih->biCompression == mmioFOURCC('D', 'V', 'R', ' ')) {
- //mp_tmsg(MSGT_DEMUXER, MSGL_WARN, MSGTR_MPDEMUX_ASFHDR_DVRWantsLibavformat);
+ //mp_tmsg(MSGT_DEMUXER, MSGL_WARN, "DVR will probably only work with libavformat, try -demuxer 35 if you have problems\n");
//sh_video->fps=(float)sh_video->video.dwRate/(float)sh_video->video.dwScale;
//sh_video->frametime=(float)sh_video->video.dwScale/(float)sh_video->video.dwRate;
asf->asf_frame_state=-1;
@@ -631,7 +631,7 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){
start = stream_tell(demuxer->stream); // start of first data chunk
stream_read(demuxer->stream, guid_buffer, 16);
if (memcmp(guid_buffer, asf_data_chunk_guid, 16) != 0) {
- mp_tmsg(MSGT_HEADER, MSGL_FATAL, MSGTR_MPDEMUX_ASFHDR_NoDataChunkAfterHeader);
+ mp_tmsg(MSGT_HEADER, MSGL_FATAL, "No data chunk following header!\n");
free(streams);
streams = NULL;
return 0;
@@ -678,7 +678,7 @@ if(!audio_streams) demuxer->audio->id=-2; // nosound
else if(best_audio > 0 && demuxer->audio->id == -1) demuxer->audio->id=best_audio;
if(!video_streams){
if(!audio_streams){
- mp_tmsg(MSGT_HEADER,MSGL_ERR,MSGTR_MPDEMUX_ASFHDR_AudioVideoHeaderNotFound);
+ mp_tmsg(MSGT_HEADER,MSGL_ERR,"ASF: no audio or video headers found - broken file?\n");
return 0;
}
demuxer->video->id=-2; // audio-only
@@ -695,7 +695,7 @@ if( mp_msg_test(MSGT_HEADER,MSGL_V) ){
return 1;
len_err_out:
- mp_tmsg(MSGT_HEADER, MSGL_FATAL, MSGTR_MPDEMUX_ASFHDR_InvalidLengthInASFHeader);
+ mp_tmsg(MSGT_HEADER, MSGL_FATAL, "Invalid length in ASF header!\n");
err_out:
if (hdr) free(hdr);
if (streams) free(streams);
diff --git a/libmpdemux/aviheader.c b/libmpdemux/aviheader.c
index f7228c590f..516da9d0f8 100644
--- a/libmpdemux/aviheader.c
+++ b/libmpdemux/aviheader.c
@@ -80,7 +80,7 @@ while(1){
len -= 4;
list_end=stream_tell(demuxer->stream)+((len+1)&(~1));
} else {
- mp_tmsg(MSGT_HEADER,MSGL_WARN,MSGTR_MPDEMUX_AVIHDR_EmptyList);
+ mp_tmsg(MSGT_HEADER,MSGL_WARN,"** empty list?!\n");
list_end = 0;
}
mp_msg(MSGT_HEADER,MSGL_V,"list_end=0x%X\n",(int)list_end);
@@ -88,7 +88,7 @@ while(1){
// found MOVI header
if(!demuxer->movi_start) demuxer->movi_start=stream_tell(demuxer->stream);
demuxer->movi_end=stream_tell(demuxer->stream)+len;
- mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_FoundMovieAt,(int)demuxer->movi_start,(int)demuxer->movi_end);
+ mp_tmsg(MSGT_HEADER,MSGL_V,"Found movie at 0x%X - 0x%X\n",(int)demuxer->movi_start,(int)demuxer->movi_end);
if(demuxer->stream->end_pos>demuxer->movi_end) demuxer->movi_end=demuxer->stream->end_pos;
if(index_mode==-2 || index_mode==2 || index_mode==0)
break; // reading from non-seekable source (stdin) or forced index or no index forced
@@ -193,13 +193,13 @@ while(1){
++stream_id;
if(h.fccType==streamtypeVIDEO){
sh_video=new_sh_video(demuxer,stream_id);
- mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "aviheader", stream_id);
+ mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Video stream found, -vid %d\n", "aviheader", stream_id);
memcpy(&sh_video->video,&h,sizeof(h));
sh_video->stream_delay = (float)sh_video->video.dwStart * sh_video->video.dwScale/sh_video->video.dwRate;
} else
if(h.fccType==streamtypeAUDIO){
sh_audio=new_sh_audio(demuxer,stream_id);
- mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "aviheader", stream_id);
+ mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "aviheader", stream_id);
memcpy(&sh_audio->audio,&h,sizeof(h));
sh_audio->stream_delay = (float)sh_audio->audio.dwStart * sh_audio->audio.dwScale/sh_audio->audio.dwRate;
}
@@ -262,7 +262,7 @@ while(1){
if(last_fccType==streamtypeVIDEO){
sh_video->bih=calloc(FFMAX(chunksize, sizeof(BITMAPINFOHEADER)), 1);
// sh_video->bih=malloc(chunksize); memset(sh_video->bih,0,chunksize);
- mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_FoundBitmapInfoHeader,chunksize,sizeof(BITMAPINFOHEADER));
+ mp_tmsg(MSGT_HEADER,MSGL_V,"Found 'bih', %u bytes of %d\n",chunksize,sizeof(BITMAPINFOHEADER));
stream_read(demuxer->stream,(char*) sh_video->bih,chunksize);
le2me_BITMAPINFOHEADER(sh_video->bih); // swap to machine endian
if (sh_video->bih->biSize > chunksize && sh_video->bih->biSize > sizeof(BITMAPINFOHEADER))
@@ -283,7 +283,7 @@ while(1){
case mmioFOURCC('m', 'p', 'g', '4'):
case mmioFOURCC('D', 'I', 'V', '1'):
idxfix_divx=3; // set index recovery mpeg4 flavour: msmpeg4v1
- mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPG4V1);
+ mp_tmsg(MSGT_HEADER,MSGL_V,"Regenerating keyframe table for M$ mpg4v1 video.\n");
break;
case mmioFOURCC('D', 'I', 'V', '3'):
case mmioFOURCC('d', 'i', 'v', '3'):
@@ -300,7 +300,7 @@ while(1){
case mmioFOURCC('D', 'I', 'V', '2'):
case mmioFOURCC('A', 'P', '4', '1'):
idxfix_divx=1; // set index recovery mpeg4 flavour: msmpeg4v3
- mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForDIVX3);
+ mp_tmsg(MSGT_HEADER,MSGL_V,"Regenerating keyframe table for DIVX3 video.\n");
break;
case mmioFOURCC('D', 'I', 'V', 'X'):
case mmioFOURCC('d', 'i', 'v', 'x'):
@@ -310,7 +310,7 @@ while(1){
case mmioFOURCC('F', 'M', 'P', '4'):
case mmioFOURCC('f', 'm', 'p', '4'):
idxfix_divx=2; // set index recovery mpeg4 flavour: generic mpeg4
- mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPEG4);
+ mp_tmsg(MSGT_HEADER,MSGL_V,"Regenerating keyframe table for MPEG-4 video.\n");
break;
}
} else
@@ -318,7 +318,7 @@ while(1){
unsigned wf_size = chunksize<sizeof(WAVEFORMATEX)?sizeof(WAVEFORMATEX):chunksize;
sh_audio->wf=calloc(wf_size,1);
// sh_audio->wf=malloc(chunksize); memset(sh_audio->wf,0,chunksize);
- mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_FoundWaveFmt,chunksize,sizeof(WAVEFORMATEX));
+ mp_tmsg(MSGT_HEADER,MSGL_V,"Found 'wf', %d bytes of %d\n",chunksize,sizeof(WAVEFORMATEX));
stream_read(demuxer->stream,(char*) sh_audio->wf,chunksize);
le2me_WAVEFORMATEX(sh_audio->wf);
if (sh_audio->wf->cbSize != 0 &&
@@ -361,7 +361,7 @@ while(1){
case mmioFOURCC('d', 'm', 'l', 'h'): {
// dmlh 00 00 00 04 frms
unsigned int total_frames = stream_read_dword_le(demuxer->stream);
- mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_FoundAVIV2Header, chunksize, total_frames);
+ mp_tmsg(MSGT_HEADER,MSGL_V,"AVI: dmlh found (size=%d) (total_frames=%d)\n", chunksize, total_frames);
stream_skip(demuxer->stream, chunksize-4);
chunksize = 0;
}
@@ -372,7 +372,7 @@ while(1){
if(index_mode && !priv->isodml){
int i;
priv->idx_size=size2>>4;
- mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_ReadingIndexBlockChunksForFrames,
+ mp_tmsg(MSGT_HEADER,MSGL_V,"Reading INDEX block, %d chunks for %d frames (fpos=%"PRId64").\n",
priv->idx_size,avih.dwTotalFrames, (int64_t)stream_tell(demuxer->stream));
priv->idx=malloc(priv->idx_size<<4);
// printf("\nindex to %p !!!!! (priv=%p)\n",priv->idx,priv);
@@ -395,10 +395,10 @@ while(1){
case mmioFOURCC('R','I','F','F'): {
char riff_type[4];
- mp_tmsg(MSGT_HEADER, MSGL_V, MSGTR_MPDEMUX_AVIHDR_AdditionalRIFFHdr);
+ mp_tmsg(MSGT_HEADER, MSGL_V, "Additional RIFF header...\n");
stream_read(demuxer->stream, riff_type, sizeof riff_type);
if (strncmp(riff_type, "AVIX", sizeof riff_type))
- mp_tmsg(MSGT_HEADER, MSGL_WARN, MSGTR_MPDEMUX_AVIHDR_WarnNotExtendedAVIHdr);
+ mp_tmsg(MSGT_HEADER, MSGL_WARN, "** Warning: this is no extended AVI header..\n");
else {
/*
* We got an extended AVI header, so we need to switch to
@@ -436,7 +436,7 @@ while(1){
if(list_end>0 &&
chunksize+stream_tell(demuxer->stream) == list_end) list_end=0;
if(list_end>0 && chunksize+stream_tell(demuxer->stream)>list_end){
- mp_tmsg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_BrokenChunk,chunksize,(char *) &id);
+ mp_tmsg(MSGT_HEADER,MSGL_V,"Broken chunk? chunksize=%d (id=%.4s)\n",chunksize,(char *) &id);
stream_seek(demuxer->stream,list_end);
list_end=0;
} else
@@ -464,7 +464,7 @@ if (priv->isodml && (index_mode==-1 || index_mode==0 || index_mode==1)) {
priv->idx_offset = 0;
priv->idx = NULL;
- mp_tmsg(MSGT_HEADER, MSGL_INFO, MSGTR_MPDEMUX_AVIHDR_BuildingODMLidx, priv->suidx_size);
+ mp_tmsg(MSGT_HEADER, MSGL_INFO, "AVI: ODML: Building ODML index (%d superindexchunks).\n", priv->suidx_size);
// read the standard indices
for (cx = &priv->suidx[0], i=0; i<priv->suidx_size; cx++, i++) {
@@ -479,7 +479,7 @@ if (priv->isodml && (index_mode==-1 || index_mode==0 || index_mode==1)) {
// gen_index routine handle this
priv->isodml = 0;
priv->idx_size = 0;
- mp_tmsg(MSGT_HEADER, MSGL_WARN, MSGTR_MPDEMUX_AVIHDR_BrokenODMLfile);
+ mp_tmsg(MSGT_HEADER, MSGL_WARN, "AVI: ODML: Broken (incomplete?) file detected. Will use traditional index.\n");
goto freeout;
}
@@ -583,18 +583,18 @@ if (index_file_load) {
unsigned int i;
if ((fp = fopen(index_file_load, "r")) == NULL) {
- mp_tmsg(MSGT_HEADER,MSGL_ERR, MSGTR_MPDEMUX_AVIHDR_CantReadIdxFile, index_file_load, strerror(errno));
+ mp_tmsg(MSGT_HEADER,MSGL_ERR, "Can't read index file %s: %s\n", index_file_load, strerror(errno));
goto gen_index;
}
fread(&magic, 6, 1, fp);
if (strncmp(magic, "MPIDX1", 6)) {
- mp_tmsg(MSGT_HEADER,MSGL_ERR, MSGTR_MPDEMUX_AVIHDR_NotValidMPidxFile, index_file_load);
+ mp_tmsg(MSGT_HEADER,MSGL_ERR, "%s is not a valid MPlayer index file.\n", index_file_load);
goto gen_index;
}
fread(&priv->idx_size, sizeof(priv->idx_size), 1, fp);
priv->idx=malloc(priv->idx_size*sizeof(AVIINDEXENTRY));
if (!priv->idx) {
- mp_tmsg(MSGT_HEADER,MSGL_ERR, MSGTR_MPDEMUX_AVIHDR_FailedMallocForIdxFile, index_file_load);
+ mp_tmsg(MSGT_HEADER,MSGL_ERR, "Could not allocate memory for index data from %s.\n", index_file_load);
priv->idx_size = 0;
goto gen_index;
}
@@ -604,14 +604,14 @@ if (index_file_load) {
idx=&((AVIINDEXENTRY *)priv->idx)[i];
fread(idx, sizeof(AVIINDEXENTRY), 1, fp);
if (feof(fp)) {
- mp_tmsg(MSGT_HEADER,MSGL_ERR, MSGTR_MPDEMUX_AVIHDR_PrematureEOF, index_file_load);
+ mp_tmsg(MSGT_HEADER,MSGL_ERR, "premature end of index file %s\n", index_file_load);
free(priv->idx);
priv->idx_size = 0;
goto gen_index;
}
}
fclose(fp);
- mp_tmsg(MSGT_HEADER,MSGL_INFO, MSGTR_MPDEMUX_AVIHDR_IdxFileLoaded, index_file_load);
+ mp_tmsg(MSGT_HEADER,MSGL_INFO, "Loaded index file: %s\n", index_file_load);
}
gen_index:
if(index_mode>=2 || (priv->idx_size==0 && index_mode==1)){
@@ -678,7 +678,7 @@ if(index_mode>=2 || (priv->idx_size==0 && index_mode==1)){
}
if(pos!=lastpos){
lastpos=pos;
- mp_tmsg(MSGT_HEADER,MSGL_STATUS,MSGTR_MPDEMUX_AVIHDR_GeneratingIdx,
+ mp_tmsg(MSGT_HEADER,MSGL_STATUS, "Generating Index: %3lu %s \r",
(unsigned long)pos, len?"%":"MB");
}
}
@@ -697,7 +697,7 @@ skip_chunk:
stream_seek(demuxer->stream,8+demuxer->filepos+skip);
}
priv->idx_size=priv->idx_pos;
- mp_tmsg(MSGT_HEADER,MSGL_INFO,MSGTR_MPDEMUX_AVIHDR_IdxGeneratedForHowManyChunks,priv->idx_size);
+ mp_tmsg(MSGT_HEADER,MSGL_INFO,"AVI: Generated index table for %d chunks!\n",priv->idx_size);
if( mp_msg_test(MSGT_HEADER,MSGL_DBG2) ) print_index(priv->idx,priv->idx_size,MSGL_DBG2);
/* Write generated index to a file */
@@ -706,7 +706,7 @@ skip_chunk:
unsigned int i;
if ((fp=fopen(index_file_save, "w")) == NULL) {
- mp_tmsg(MSGT_HEADER,MSGL_ERR, MSGTR_MPDEMUX_AVIHDR_Failed2WriteIdxFile, index_file_save, strerror(errno));
+ mp_tmsg(MSGT_HEADER,MSGL_ERR, "Couldn't write index file %s: %s\n", index_file_save, strerror(errno));
return;
}
fwrite("MPIDX1", 6, 1, fp);
@@ -716,7 +716,7 @@ skip_chunk:
fwrite(idx, sizeof(AVIINDEXENTRY), 1, fp);
}
fclose(fp);
- mp_tmsg(MSGT_HEADER,MSGL_INFO, MSGTR_MPDEMUX_AVIHDR_IdxFileSaved, index_file_save);
+ mp_tmsg(MSGT_HEADER,MSGL_INFO, "Saved index file: %s\n", index_file_save);
}
}
}
diff --git a/libmpdemux/demux_asf.c b/libmpdemux/demux_asf.c
index ac1a16da04..b8be24f965 100644
--- a/libmpdemux/demux_asf.c
+++ b/libmpdemux/demux_asf.c
@@ -623,7 +623,7 @@ static demuxer_t* demux_open_asf(demuxer_t* demuxer)
// demuxer->endpos=avi_header.movi_end;
if(demuxer->video->id != -2) {
if(!ds_fill_buffer(demuxer->video)){
- mp_tmsg(MSGT_DEMUXER,MSGL_WARN,"ASF: " MSGTR_MissingVideoStream);
+ mp_tmsg(MSGT_DEMUXER,MSGL_WARN,"ASF: " "No video stream found.\n");
demuxer->video->sh=NULL;
//printf("ASF: missing video stream!? contact the author, it may be a bug :(\n");
} else {
@@ -638,9 +638,9 @@ static demuxer_t* demux_open_asf(demuxer_t* demuxer)
}
if(demuxer->audio->id!=-2){
- mp_tmsg(MSGT_DEMUXER,MSGL_V,MSGTR_ASFSearchingForAudioStream,demuxer->audio->id);
+ mp_tmsg(MSGT_DEMUXER,MSGL_V,"ASF: Searching for audio stream (id:%d).\n",demuxer->audio->id);
if(!ds_fill_buffer(demuxer->audio)){
- mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"ASF: " MSGTR_MissingAudioStream);
+ mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"ASF: " "No audio stream found -> no sound.\n");
demuxer->audio->sh=NULL;
} else {
sh_audio=demuxer->audio->sh;sh_audio->ds=demuxer->audio;
diff --git a/libmpdemux/demux_audio.c b/libmpdemux/demux_audio.c
index dd83fbe53c..d374e3d130 100644
--- a/libmpdemux/demux_audio.c
+++ b/libmpdemux/demux_audio.c
@@ -572,7 +572,7 @@ static int demux_audio_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds) {
break;
}
default:
- mp_tmsg(MSGT_DEMUXER,MSGL_WARN,MSGTR_MPDEMUX_AUDIO_UnknownFormat,priv->frmt);
+ mp_tmsg(MSGT_DEMUXER,MSGL_WARN,"Audio demuxer: unknown format %d.\n",priv->frmt);
return 0;
}
diff --git a/libmpdemux/demux_avi.c b/libmpdemux/demux_avi.c
index 396e4d26a7..8ef549cf42 100644
--- a/libmpdemux/demux_avi.c
+++ b/libmpdemux/demux_avi.c
@@ -56,7 +56,7 @@ static demux_stream_t* demux_avi_select_stream(demuxer_t *demux,
// workaround old mencoder's bug:
if(sh->audio.dwSampleSize==1 && sh->audio.dwScale==1 &&
(sh->wf->nBlockAlign==1152 || sh->wf->nBlockAlign==576)){
- mp_tmsg(MSGT_DEMUX,MSGL_WARN,MSGTR_WorkAroundBlockAlignHeaderBug);
+ mp_tmsg(MSGT_DEMUX,MSGL_WARN,"AVI: Working around CBR-MP3 nBlockAlign header bug!\n");
priv->audio_block_size=1;
}
}
@@ -253,7 +253,7 @@ do{
if(ds)
if(ds->packs+1>=MAX_PACKS || ds->bytes+len>=MAX_PACK_BYTES){
// this packet will cause a buffer overflow, switch to -ni mode!!!
- mp_tmsg(MSGT_DEMUX,MSGL_WARN,MSGTR_SwitchToNi);
+ mp_tmsg(MSGT_DEMUX,MSGL_WARN,"\nBadly interleaved AVI file detected - switching to -ni mode...\n");
if(priv->idx_size>0){
// has index
demux->type=DEMUXER_TYPE_AVI_NI;
@@ -427,11 +427,11 @@ static demuxer_t* demux_open_avi(demuxer_t* demuxer){
read_avi_header(demuxer,(demuxer->stream->flags & STREAM_SEEK_BW)?index_mode:-2);
if(demuxer->audio->id>=0 && !demuxer->a_streams[demuxer->audio->id]){
- mp_tmsg(MSGT_DEMUX,MSGL_WARN,MSGTR_InvalidAudioStreamNosound,demuxer->audio->id);
+ mp_tmsg(MSGT_DEMUX,MSGL_WARN,"AVI: invalid audio stream ID: %d - ignoring (nosound)\n",demuxer->audio->id);
demuxer->audio->id=-2; // disabled
}
if(demuxer->video->id>=0 && !demuxer->v_streams[demuxer->video->id]){
- mp_tmsg(MSGT_DEMUX,MSGL_WARN,MSGTR_InvalidAudioStreamUsingDefault,demuxer->video->id);
+ mp_tmsg(MSGT_DEMUX,MSGL_WARN,"AVI: invalid video stream ID: %d - ignoring (using default)\n",demuxer->video->id);
demuxer->video->id=-1; // autodetect
}
@@ -479,14 +479,14 @@ static demuxer_t* demux_open_avi(demuxer_t* demuxer){
}
}
if(v_pos==-1){
- mp_tmsg(MSGT_DEMUX,MSGL_ERR,"AVI_NI: " MSGTR_MissingVideoStream);
+ mp_tmsg(MSGT_DEMUX,MSGL_ERR,"AVI_NI: " "No video stream found.\n");
return NULL;
}
if(a_pos==-1){
d_audio->sh=sh_audio=NULL;
} else {
if(force_ni || abs(a_pos-v_pos)>0x100000){ // distance > 1MB
- mp_tmsg(MSGT_DEMUX,MSGL_INFO,MSGTR_NI_Message,force_ni?MSGTR_NI_Forced:MSGTR_NI_Detected);
+ mp_tmsg(MSGT_DEMUX,MSGL_INFO,"%s NON-INTERLEAVED AVI file format.\n",force_ni?"Forced":"Detected");
demuxer->type=DEMUXER_TYPE_AVI_NI; // HACK!!!!
demuxer->desc=&demuxer_desc_avi_ni; // HACK!!!!
pts_from_bps=1; // force BPS sync!
@@ -495,7 +495,7 @@ static demuxer_t* demux_open_avi(demuxer_t* demuxer){
} else {
// no index
if(force_ni){
- mp_tmsg(MSGT_DEMUX,MSGL_INFO,MSGTR_UsingNINI);
+ mp_tmsg(MSGT_DEMUX,MSGL_INFO,"Using NON-INTERLEAVED broken AVI file format.\n");
demuxer->type=DEMUXER_TYPE_AVI_NINI; // HACK!!!!
demuxer->desc=&demuxer_desc_avi_nini; // HACK!!!!
priv->idx_pos_a=
@@ -505,14 +505,14 @@ static demuxer_t* demux_open_avi(demuxer_t* demuxer){
demuxer->seekable=0;
}
if(!ds_fill_buffer(d_video)){
- mp_tmsg(MSGT_DEMUX,MSGL_ERR,"AVI: " MSGTR_MissingVideoStreamBug);
+ mp_tmsg(MSGT_DEMUX,MSGL_ERR,"AVI: " "Missing video stream!? Contact the author, it may be a bug :(\n");
return NULL;
}
sh_video=d_video->sh;sh_video->ds=d_video;
if(d_audio->id!=-2){
mp_msg(MSGT_DEMUX,MSGL_V,"AVI: Searching for audio stream (id:%d)\n",d_audio->id);
if(!priv->audio_streams || !ds_fill_buffer(d_audio)){
- mp_tmsg(MSGT_DEMUX,MSGL_INFO,"AVI: " MSGTR_MissingAudioStream);
+ mp_tmsg(MSGT_DEMUX,MSGL_INFO,"AVI: " "No audio stream found -> no sound.\n");
d_audio->sh=sh_audio=NULL;
} else {
sh_audio=d_audio->sh;sh_audio->ds=d_audio;
@@ -552,7 +552,7 @@ static demuxer_t* demux_open_avi(demuxer_t* demuxer){
// bad video header, try to get number of frames from audio
if(sh_audio && sh_audio->wf->nAvgBytesPerSec) priv->numberofframes=sh_video->fps*sh_audio->audio.dwLength/sh_audio->audio.dwRate*sh_audio->audio.dwScale;
if(priv->numberofframes<=1){
- mp_tmsg(MSGT_SEEK,MSGL_WARN,MSGTR_CouldntDetFNo);
+ mp_tmsg(MSGT_SEEK,MSGL_WARN,"Could not determine number of frames (for absolute seek).\n");
priv->numberofframes=0;
}
@@ -828,7 +828,7 @@ static int avi_check_file(demuxer_t *demuxer)
if(id==mmioFOURCC('A','V','I',0x19))
return DEMUXER_TYPE_AVI;
if(id==mmioFOURCC('O','N','2','f')){
- mp_tmsg(MSGT_DEMUXER,MSGL_INFO,MSGTR_ON2AviFormat);
+ mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"ON2 AVI format");
return DEMUXER_TYPE_AVI;
}
}
@@ -856,7 +856,7 @@ static demuxer_t* demux_open_hack_avi(demuxer_t *demuxer)
s = new_ds_stream(demuxer->audio);
od = new_demuxer(opts, s,DEMUXER_TYPE_OGG,-1,-2,-2,NULL);
if(!demux_ogg_open(od)) {
- mp_tmsg( MSGT_DEMUXER,MSGL_ERR,MSGTR_ErrorOpeningOGGDemuxer);
+ mp_tmsg( MSGT_DEMUXER,MSGL_ERR,"Unable to open the Ogg demuxer.\n");
free_stream(s);
demuxer->audio->id = -2;
} else
diff --git a/libmpdemux/demux_demuxers.c b/libmpdemux/demux_demuxers.c
index 3e055a1e6b..156251c33a 100644
--- a/libmpdemux/demux_demuxers.c
+++ b/libmpdemux/demux_demuxers.c
@@ -61,7 +61,7 @@ static int demux_demuxers_fill_buffer(demuxer_t *demux,demux_stream_t *ds) {
else if(ds->demuxer == priv->sd)
return demux_fill_buffer(priv->sd,ds);
- mp_tmsg(MSGT_DEMUX,MSGL_WARN,MSGTR_MPDEMUX_DEMUXERS_FillBufferError);
+ mp_tmsg(MSGT_DEMUX,MSGL_WARN,"fill_buffer error: bad demuxer: not vd, ad or sd.\n");
return 0;
}
diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c
index 29bc4e07f6..a7da1a9b36 100644
--- a/libmpdemux/demux_lavf.c
+++ b/libmpdemux/demux_lavf.c
@@ -228,7 +228,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
if(priv->audio_streams >= MAX_A_STREAMS)
break;
sh_audio=new_sh_audio(demuxer, i);
- mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "lavf", i);
+ mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Audio stream found, -aid %d\n", "lavf", i);
if(!sh_audio)
break;
priv->astreams[priv->audio_streams] = i;
@@ -308,7 +308,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
if(priv->video_streams >= MAX_V_STREAMS)
break;
sh_video=new_sh_video(demuxer, i);
- mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "lavf", i);
+ mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Video stream found, -vid %d\n", "lavf", i);
if(!sh_video) break;
priv->vstreams[priv->video_streams] = i;
priv->video_streams++;
@@ -388,7 +388,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
else
break;
sh_sub = new_sh_sub_sid(demuxer, i, priv->sub_streams);
- mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_SubtitleID, "lavf", priv->sub_streams);
+ mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[%s] Subtitle stream found, -sid %d\n", "lavf", priv->sub_streams);
if(!sh_sub) break;
priv->sstreams[priv->sub_streams] = i;
sh_sub->type = type;
diff --git a/libmpdemux/demux_lmlm4.c b/libmpdemux/demux_lmlm4.c
index 46430aefb2..9b4382ba5a 100644
--- a/libmpdemux/demux_lmlm4.c
+++ b/libmpdemux/demux_lmlm4.c
@@ -328,14 +328,14 @@ static demuxer_t* demux_open_lmlm4(demuxer_t* demuxer){
demuxer->seekable = 0;
if(!ds_fill_buffer(demuxer->video)){
- mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"LMLM4: " MSGTR_MissingVideoStream);
+ mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"LMLM4: " "No video stream found.\n");
demuxer->video->sh=NULL;
} else {
sh_video=demuxer->video->sh;sh_video->ds=demuxer->video;
}
if(demuxer->audio->id!=-2) {
if(!ds_fill_buffer(demuxer->audio)){
- mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"LMLM4: " MSGTR_MissingAudioStream);
+ mp_tmsg(MSGT_DEMUXER,MSGL_INFO,"LMLM4: " "No audio stream found -> no sound.\n");
demuxer->audio->sh=NULL;
} else {
sh_audio=demuxer->audio->sh;sh_audio->ds=demuxer->audio;
diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c
index 3ddf1c40cd..c8dfd92ba1 100644
--- a/libmpdemux/demux_mkv.c
+++ b/libmpdemux/demux_mkv.c
@@ -308,7 +308,7 @@ demux_mkv_decode (mkv_track_t *track, uint8_t *src, uint8_t **dest,
if (inflateInit (&zstream) != Z_OK)
{
mp_tmsg (MSGT_DEMUX, MSGL_WARN,
- MSGTR_MPDEMUX_MKV_ZlibInitializationFailed);
+ "[mkv] zlib initialization failed.\n");
return modified;
}
zstream.next_in = (Bytef *) src;
@@ -325,7 +325,7 @@ demux_mkv_decode (mkv_track_t *track, uint8_t *src, uint8_t **dest,
if (result != Z_OK && result != Z_STREAM_END)
{
mp_tmsg (MSGT_DEMUX, MSGL_WARN,
- MSGTR_MPDEMUX_MKV_ZlibDecompressionFailed);
+ "[mkv] zlib decompression failed.\n");
free(*dest);
*dest = NULL;
inflateEnd (&zstream);
@@ -357,7 +357,7 @@ demux_mkv_decode (mkv_track_t *track, uint8_t *src, uint8_t **dest,
{
lzo_fail:
mp_tmsg (MSGT_DEMUX, MSGL_WARN,
- MSGTR_MPDEMUX_MKV_LzoDecompressionFailed);
+ "[mkv] lzo decompression failed.\n");
free(*dest);
*dest = NULL;
return modified;
@@ -545,25 +545,25 @@ demux_mkv_read_trackencodings (demuxer_t *demuxer, mkv_track_t *track)
if (e.type == 1)
{
mp_tmsg(MSGT_DEMUX, MSGL_WARN,
- MSGTR_MPDEMUX_MKV_TrackEncrypted, track->tnum);
+ "[mkv] Track number %u has been encrypted and decryption has not yet been\n[mkv] implemented. Skipping track.\n", track->tnum);
}
else if (e.type != 0)
{
mp_tmsg(MSGT_DEMUX, MSGL_WARN,
- MSGTR_MPDEMUX_MKV_UnknownContentEncoding, track->tnum);
+ "[mkv] Unknown content encoding type for track %u. Skipping track.\n", track->tnum);
}
if (e.comp_algo != 0 && e.comp_algo != 2)
{
mp_tmsg (MSGT_DEMUX, MSGL_WARN,
- MSGTR_MPDEMUX_MKV_UnknownCompression,
+ "[mkv] Track %u has been compressed with an unknown/unsupported compression\n[mkv] algorithm (%u). Skipping track.\n",
track->tnum, e.comp_algo);
}
#if !CONFIG_ZLIB
else if (e.comp_algo == 0)
{
mp_tmsg (MSGT_DEMUX, MSGL_WARN,
- MSGTR_MPDEMUX_MKV_ZlibCompressionUnsupported,
+ "[mkv] Track %u was compressed with zlib but mplayer has not been compiled\n[mkv] with support for zlib compression. Skipping track.\n",
track->tnum);
}
#endif
@@ -1533,10 +1533,10 @@ display_create_tracks (demuxer_t *demuxer)
break;
}
if (mkv_d->tracks[i]->name)
- mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_MPDEMUX_MKV_TrackIDName,
+ mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[mkv] Track ID %u: %s (%s) \"%s\", %s\n",
mkv_d->tracks[i]->tnum, type, mkv_d->tracks[i]->codec_id, mkv_d->tracks[i]->name, str);
else
- mp_tmsg(MSGT_DEMUX, MSGL_INFO, MSGTR_MPDEMUX_MKV_TrackID,
+ mp_tmsg(MSGT_DEMUX, MSGL_INFO, "[mkv] Track ID %u: %s (%s), %s\n",
mkv_d->tracks[i]->tnum, type, mkv_d->tracks[i]->codec_id, str);
}
}
@@ -1674,7 +1674,7 @@ demux_mkv_open_video (demuxer_t *demuxer, mkv_track_t *track, int vid)
}
track->reorder_timecodes = opts->user_correct_pts == 0;
if (!vi->id) {
- mp_tmsg (MSGT_DEMUX,MSGL_WARN, MSGTR_MPDEMUX_MKV_UnknownCodecID,
+ mp_tmsg (MSGT_DEMUX,MSGL_WARN, "[mkv] Unknown/unsupported CodecID (%s) or missing/bad CodecPrivate\n[mkv] data (track %u).\n",
track->codec_id, track->tnum);
free(bih);
return 1;
@@ -1789,7 +1789,7 @@ demux_mkv_open_audio (demuxer_t *demuxer, mkv_track_t *track, int aid)
if (track->private_data == NULL || track->private_size == 0)
{
mp_tmsg (MSGT_DEMUX, MSGL_WARN,
- MSGTR_MPDEMUX_MKV_FlacTrackDoesNotContainValidHeaders);
+ "[mkv] FLAC track does not contain valid headers.\n");
return 1;
}
track->a_formattag = mmioFOURCC ('f', 'L', 'a', 'C');
@@ -1809,7 +1809,7 @@ demux_mkv_open_audio (demuxer_t *demuxer, mkv_track_t *track, int aid)
}
else
{
- mp_tmsg (MSGT_DEMUX, MSGL_WARN, MSGTR_MPDEMUX_MKV_UnknownAudioCodec,
+ mp_tmsg (MSGT_DEMUX, MSGL_WARN, "[mkv] Unknown/unsupported audio codec ID '%s' for track %u or missing/faulty\n[mkv] private codec data.\n",
track->codec_id, track->tnum);
free_sh_audio(demuxer, track->tnum);
return 1;
@@ -2066,7 +2066,7 @@ demux_mkv_open_sub (demuxer_t *demuxer, mkv_track_t *track, int sid)
}
else
{
- mp_tmsg (MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_MKV_SubtitleTypeNotSupported,
+ mp_tmsg (MSGT_DEMUX, MSGL_ERR, "[mkv] Subtitle type '%s' is not supported.\n",
track->codec_id);
return 1;
}
@@ -2209,13 +2209,13 @@ demux_mkv_open (demuxer_t *demuxer)
if (track && demuxer->v_streams[track->tnum])
{
mp_tmsg