[MPlayer-cvslog] CVS: main/libmpdemux asfheader.c, 1.46, 1.47 aviheader.c, 1.71, 1.72 aviprint.c, 1.20, 1.21 demux_audio.c, 1.48, 1.49 demux_lavf.c, 1.29, 1.30 demux_ogg.c, 1.90, 1.91 demux_real.c, 1.93, 1.94 demux_realaud.c, 1.14, 1.15
Diego Biurrun CVS
syncmail at mplayerhq.hu
Mon Mar 27 19:25:44 CEST 2006
CVS change done by Diego Biurrun CVS
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv23699/libmpdemux
Modified Files:
asfheader.c aviheader.c aviprint.c demux_audio.c demux_lavf.c
demux_ogg.c demux_real.c demux_realaud.c
Log Message:
Convert printfs in aviprint.c to mp_msg and give the information printing
functions in this file a verbosity_level parameter.
Index: asfheader.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/asfheader.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- asfheader.c 24 Mar 2006 08:12:02 -0000 1.46
+++ asfheader.c 27 Mar 2006 17:25:41 -0000 1.47
@@ -137,8 +137,8 @@
return DEMUXER_TYPE_ASF;
}
-extern void print_wave_header(WAVEFORMATEX *h);
-extern void print_video_header(BITMAPINFOHEADER *h);
+extern void print_wave_header(WAVEFORMATEX *h, int verbose_level);
+extern void print_video_header(BITMAPINFOHEADER *h, int verbose_level);
int find_asf_guid(char *buf, const char *guid, int cur_pos, int buf_len)
{
@@ -210,7 +210,7 @@
sh_audio->wf=calloc((streamh->type_size<sizeof(WAVEFORMATEX))?sizeof(WAVEFORMATEX):streamh->type_size,1);
memcpy(sh_audio->wf,buffer,streamh->type_size);
le2me_WAVEFORMATEX(sh_audio->wf);
- if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_wave_header(sh_audio->wf);
+ if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_wave_header(sh_audio->wf,MSGL_V);
if(ASF_LOAD_GUID_PREFIX(streamh->concealment)==ASF_GUID_PREFIX_audio_conceal_interleave){
buffer = &hdr[pos];
pos += streamh->stream_size;
@@ -238,7 +238,7 @@
mp_msg(MSGT_DEMUXER, MSGL_WARN, MSGTR_MPDEMUX_ASFHDR_DVRWantsLibavformat);
//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;
- if( mp_msg_test(MSGT_DEMUX,MSGL_V) ) print_video_header(sh_video->bih);
+ if( mp_msg_test(MSGT_DEMUX,MSGL_V) ) print_video_header(sh_video->bih, MSGL_V);
//asf_video_id=streamh.stream_no & 0x7F;
//if(demuxer->video->id==-1) demuxer->video->id=streamh.stream_no & 0x7F;
break;
Index: aviheader.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/aviheader.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- aviheader.c 24 Mar 2006 08:12:02 -0000 1.71
+++ aviheader.c 27 Mar 2006 17:25:41 -0000 1.72
@@ -20,15 +20,15 @@
static MainAVIHeader avih;
-extern void print_avih(MainAVIHeader *h);
-extern void print_avih_flags(MainAVIHeader *h);
-extern void print_strh(AVIStreamHeader *h);
-extern void print_wave_header(WAVEFORMATEX *h);
-extern void print_video_header(BITMAPINFOHEADER *h);
-extern void print_index(AVIINDEXENTRY *idx,int idx_size);
-extern void print_avistdindex_chunk(avistdindex_chunk *h);
-extern void print_avisuperindex_chunk(avisuperindex_chunk *h);
-extern void print_vprp(VideoPropHeader *vprp);
+extern void print_avih(MainAVIHeader *h, int verbose_level);
+extern void print_avih_flags(MainAVIHeader *h, int verbose_level);
+extern void print_strh(AVIStreamHeader *h, int verbose_level);
+extern void print_wave_header(WAVEFORMATEX *h, int verbose_level);
+extern void print_video_header(BITMAPINFOHEADER *h, int verbose_level);
+extern void print_index(AVIINDEXENTRY *idx,int idx_size, int verbose_level);
+extern void print_avistdindex_chunk(avistdindex_chunk *h, int verbose_level);
+extern void print_avisuperindex_chunk(avisuperindex_chunk *h, int verbose_level);
+extern void print_vprp(VideoPropHeader *vprp, int verbose_level);
static int odml_get_vstream_id(int id, unsigned char res[])
{
@@ -185,7 +185,7 @@
stream_read(demuxer->stream,(char*) &avih,MIN(size2,sizeof(avih)));
le2me_MainAVIHeader(&avih); // swap to machine endian
chunksize-=MIN(size2,sizeof(avih));
- if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_avih(&avih); // else print_avih_flags(&avih);
+ if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_avih(&avih,MSGL_V); // else print_avih_flags(&avih,MSGL_V);
break;
case ckidSTREAMHEADER: { // read 'strh'
AVIStreamHeader h;
@@ -202,7 +202,7 @@
memcpy(&sh_audio->audio,&h,sizeof(h));
}
last_fccType=h.fccType;
- if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_strh(&h);
+ if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_strh(&h,MSGL_V);
break; }
case mmioFOURCC('i', 'n', 'd', 'x'): {
uint32_t i;
@@ -223,7 +223,7 @@
stream_read(demuxer->stream, (char *)s->dwReserved, 3*4);
memset(s->dwReserved, 0, 3*4);
- print_avisuperindex_chunk(s);
+ print_avisuperindex_chunk(s,MSGL_V);
msize = sizeof (uint32_t) * s->wLongsPerEntry * s->nEntriesInUse;
s->aIndex = malloc(msize);
@@ -254,7 +254,7 @@
// fixup MS-RLE header (seems to be broken for <256 color files)
if(sh_video->bih->biCompression<=1 && sh_video->bih->biSize==40)
sh_video->bih->biSize=chunksize;
- if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_video_header(sh_video->bih);
+ if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_video_header(sh_video->bih,MSGL_V);
chunksize=0;
// 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;
@@ -309,7 +309,7 @@
sh_audio->wf=realloc(sh_audio->wf, sizeof(WAVEFORMATEX)+sh_audio->wf->cbSize);
}
chunksize=0;
- if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_wave_header(sh_audio->wf);
+ if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_wave_header(sh_audio->wf,MSGL_V);
++priv->audio_streams;
// if(demuxer->audio->id==-1) demuxer->audio->id=stream_id;
}
@@ -332,7 +332,7 @@
if (sh_video) {
sh_video->aspect = GET_AVI_ASPECT(vprp->dwFrameAspectRatio);
}
- if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_vprp(vprp);
+ if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_vprp(vprp,MSGL_V);
free(vprp);
break;
}
@@ -368,7 +368,7 @@
entry->dwFlags&=0xffff;
}
chunksize-=priv->idx_size<<4;
- if( mp_msg_test(MSGT_HEADER,MSGL_DBG2) ) print_index(priv->idx,priv->idx_size);
+ if( mp_msg_test(MSGT_HEADER,MSGL_DBG2) ) print_index(priv->idx,priv->idx_size,MSGL_DBG2);
}
break;
/* added May 2002 */
@@ -465,7 +465,7 @@
}
le2me_AVISTDIDXCHUNK(&cx->stdidx[j]);
- print_avistdindex_chunk(&cx->stdidx[j]);
+ print_avistdindex_chunk(&cx->stdidx[j],MSGL_V);
priv->idx_size += cx->stdidx[j].nEntriesInUse;
cx->stdidx[j].aIndex = malloc(cx->stdidx[j].nEntriesInUse*sizeof(avistdindex_entry));
stream_read(demuxer->stream, (char *)cx->stdidx[j].aIndex,
@@ -539,7 +539,7 @@
}
}
- if ( mp_msg_test(MSGT_HEADER,MSGL_DBG2) ) print_index(priv->idx, priv->idx_size);
+ if ( mp_msg_test(MSGT_HEADER,MSGL_DBG2) ) print_index(priv->idx, priv->idx_size,MSGL_DBG2);
demuxer->movi_end=demuxer->stream->end_pos;
@@ -677,7 +677,7 @@
}
priv->idx_size=priv->idx_pos;
mp_msg(MSGT_HEADER,MSGL_INFO,MSGTR_MPDEMUX_AVIHDR_IdxGeneratedForHowManyChunks,priv->idx_size);
- if( mp_msg_test(MSGT_HEADER,MSGL_DBG2) ) print_index(priv->idx,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 */
if (index_file_save) {
Index: aviprint.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/aviprint.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- aviprint.c 13 Oct 2005 18:33:56 -0000 1.20
+++ aviprint.c 27 Mar 2006 17:25:41 -0000 1.21
@@ -15,8 +15,8 @@
//#include "codec-cfg.h"
//#include "stheader.h"
-void print_avih_flags(MainAVIHeader *h){
- printf("MainAVIHeader.dwFlags: (%ld)%s%s%s%s%s%s\n",h->dwFlags,
+void print_avih_flags(MainAVIHeader *h, int verbose_level){
+ mp_msg(MSGT_HEADER, verbose_level, "MainAVIHeader.dwFlags: (%ld)%s%s%s%s%s%s\n",h->dwFlags,
(h->dwFlags&AVIF_HASINDEX)?" HAS_INDEX":"",
(h->dwFlags&AVIF_MUSTUSEINDEX)?" MUST_USE_INDEX":"",
(h->dwFlags&AVIF_ISINTERLEAVED)?" IS_INTERLEAVED":"",
@@ -26,111 +26,111 @@
);
}
-void print_avih(MainAVIHeader *h){
- printf("======= AVI Header =======\n");
- printf("us/frame: %ld (fps=%5.3f)\n",h->dwMicroSecPerFrame,1000000.0f/(float)h->dwMicroSecPerFrame);
- printf("max bytes/sec: %ld\n",h->dwMaxBytesPerSec);
- printf("padding: %ld\n",h->dwPaddingGranularity);
- print_avih_flags(h);
- printf("frames total: %ld initial: %ld\n",h->dwTotalFrames,h->dwInitialFrames);
- printf("streams: %ld\n",h->dwStreams);
- printf("Suggested BufferSize: %ld\n",h->dwSuggestedBufferSize);
- printf("Size: %ld x %ld\n",h->dwWidth,h->dwHeight);
- printf("==========================\n");
-}
-
-void print_strh(AVIStreamHeader *h){
- printf("====== STREAM Header =====\n");
- printf("Type: %.4s FCC: %.4s (%X)\n",(char *)&h->fccType,(char *)&h->fccHandler,(unsigned int)h->fccHandler);
- printf("Flags: %ld\n",h->dwFlags);
- printf("Priority: %d Language: %d\n",h->wPriority,h->wLanguage);
- printf("InitialFrames: %ld\n",h->dwInitialFrames);
- printf("Rate: %ld/%ld = %5.3f\n",h->dwRate,h->dwScale,(float)h->dwRate/(float)h->dwScale);
- printf("Start: %ld Len: %ld\n",h->dwStart,h->dwLength);
- printf("Suggested BufferSize: %ld\n",h->dwSuggestedBufferSize);
- printf("Quality %ld\n",h->dwQuality);
- printf("Sample size: %ld\n",h->dwSampleSize);
- printf("==========================\n");
-}
-
-void print_wave_header(WAVEFORMATEX *h){
- printf("======= WAVE Format =======\n");
- printf("Format Tag: %d (0x%X)\n",h->wFormatTag,h->wFormatTag);
- printf("Channels: %d\n",h->nChannels);
- printf("Samplerate: %ld\n",h->nSamplesPerSec);
- printf("avg byte/sec: %ld\n",h->nAvgBytesPerSec);
- printf("Block align: %d\n",h->nBlockAlign);
- printf("bits/sample: %d\n",h->wBitsPerSample);
- printf("cbSize: %d\n",h->cbSize);
+void print_avih(MainAVIHeader *h, int verbose_level){
+ mp_msg(MSGT_HEADER, verbose_level, "======= AVI Header =======\n");
+ mp_msg(MSGT_HEADER, verbose_level, "us/frame: %ld (fps=%5.3f)\n",h->dwMicroSecPerFrame,1000000.0f/(float)h->dwMicroSecPerFrame);
+ mp_msg(MSGT_HEADER, verbose_level, "max bytes/sec: %ld\n",h->dwMaxBytesPerSec);
+ mp_msg(MSGT_HEADER, verbose_level, "padding: %ld\n",h->dwPaddingGranularity);
+ print_avih_flags(h, verbose_level);
+ mp_msg(MSGT_HEADER, verbose_level, "frames total: %ld initial: %ld\n",h->dwTotalFrames,h->dwInitialFrames);
+ mp_msg(MSGT_HEADER, verbose_level, "streams: %ld\n",h->dwStreams);
+ mp_msg(MSGT_HEADER, verbose_level, "Suggested BufferSize: %ld\n",h->dwSuggestedBufferSize);
+ mp_msg(MSGT_HEADER, verbose_level, "Size: %ld x %ld\n",h->dwWidth,h->dwHeight);
+ mp_msg(MSGT_HEADER, verbose_level, "==========================\n");
+}
+
+void print_strh(AVIStreamHeader *h, int verbose_level){
+ mp_msg(MSGT_HEADER, verbose_level, "====== STREAM Header =====\n");
+ mp_msg(MSGT_HEADER, verbose_level, "Type: %.4s FCC: %.4s (%X)\n",(char *)&h->fccType,(char *)&h->fccHandler,(unsigned int)h->fccHandler);
+ mp_msg(MSGT_HEADER, verbose_level, "Flags: %ld\n",h->dwFlags);
+ mp_msg(MSGT_HEADER, verbose_level, "Priority: %d Language: %d\n",h->wPriority,h->wLanguage);
+ mp_msg(MSGT_HEADER, verbose_level, "InitialFrames: %ld\n",h->dwInitialFrames);
+ mp_msg(MSGT_HEADER, verbose_level, "Rate: %ld/%ld = %5.3f\n",h->dwRate,h->dwScale,(float)h->dwRate/(float)h->dwScale);
+ mp_msg(MSGT_HEADER, verbose_level, "Start: %ld Len: %ld\n",h->dwStart,h->dwLength);
+ mp_msg(MSGT_HEADER, verbose_level, "Suggested BufferSize: %ld\n",h->dwSuggestedBufferSize);
+ mp_msg(MSGT_HEADER, verbose_level, "Quality %ld\n",h->dwQuality);
+ mp_msg(MSGT_HEADER, verbose_level, "Sample size: %ld\n",h->dwSampleSize);
+ mp_msg(MSGT_HEADER, verbose_level, "==========================\n");
+}
+
+void print_wave_header(WAVEFORMATEX *h, int verbose_level){
+ mp_msg(MSGT_HEADER, verbose_level, "======= WAVE Format =======\n");
+ mp_msg(MSGT_HEADER, verbose_level, "Format Tag: %d (0x%X)\n",h->wFormatTag,h->wFormatTag);
+ mp_msg(MSGT_HEADER, verbose_level, "Channels: %d\n",h->nChannels);
+ mp_msg(MSGT_HEADER, verbose_level, "Samplerate: %ld\n",h->nSamplesPerSec);
+ mp_msg(MSGT_HEADER, verbose_level, "avg byte/sec: %ld\n",h->nAvgBytesPerSec);
+ mp_msg(MSGT_HEADER, verbose_level, "Block align: %d\n",h->nBlockAlign);
+ mp_msg(MSGT_HEADER, verbose_level, "bits/sample: %d\n",h->wBitsPerSample);
+ mp_msg(MSGT_HEADER, verbose_level, "cbSize: %d\n",h->cbSize);
if(h->wFormatTag==0x55 && h->cbSize>=12){
MPEGLAYER3WAVEFORMAT* h2=(MPEGLAYER3WAVEFORMAT *)h;
- printf("mp3.wID=%d\n",h2->wID);
- printf("mp3.fdwFlags=0x%lX\n",h2->fdwFlags);
- printf("mp3.nBlockSize=%d\n",h2->nBlockSize);
- printf("mp3.nFramesPerBlock=%d\n",h2->nFramesPerBlock);
- printf("mp3.nCodecDelay=%d\n",h2->nCodecDelay);
+ mp_msg(MSGT_HEADER, verbose_level, "mp3.wID=%d\n",h2->wID);
+ mp_msg(MSGT_HEADER, verbose_level, "mp3.fdwFlags=0x%lX\n",h2->fdwFlags);
+ mp_msg(MSGT_HEADER, verbose_level, "mp3.nBlockSize=%d\n",h2->nBlockSize);
+ mp_msg(MSGT_HEADER, verbose_level, "mp3.nFramesPerBlock=%d\n",h2->nFramesPerBlock);
+ mp_msg(MSGT_HEADER, verbose_level, "mp3.nCodecDelay=%d\n",h2->nCodecDelay);
}
else if (h->cbSize > 0)
{
int i;
uint8_t* p = ((uint8_t*)h) + sizeof(WAVEFORMATEX);
- printf("Unknown extra header dump: ");
+ mp_msg(MSGT_HEADER, verbose_level, "Unknown extra header dump: ");
for (i = 0; i < h->cbSize; i++)
- printf("[%x] ", p[i]);
- printf("\n");
+ mp_msg(MSGT_HEADER, verbose_level, "[%x] ", p[i]);
+ mp_msg(MSGT_HEADER, verbose_level, "\n");
}
- printf("===========================\n");
+ mp_msg(MSGT_HEADER, verbose_level, "==========================================================================\n");
}
-void print_video_header(BITMAPINFOHEADER *h){
- printf("======= VIDEO Format ======\n");
- printf(" biSize %d\n", h->biSize);
- printf(" biWidth %d\n", h->biWidth);
- printf(" biHeight %d\n", h->biHeight);
- printf(" biPlanes %d\n", h->biPlanes);
- printf(" biBitCount %d\n", h->biBitCount);
- printf(" biCompression %d='%.4s'\n", h->biCompression, (char *)&h->biCompression);
- printf(" biSizeImage %d\n", h->biSizeImage);
+void print_video_header(BITMAPINFOHEADER *h, int verbose_level){
+ mp_msg(MSGT_HEADER, verbose_level, "======= VIDEO Format ======\n");
+ mp_msg(MSGT_HEADER, verbose_level, " biSize %d\n", h->biSize);
+ mp_msg(MSGT_HEADER, verbose_level, " biWidth %d\n", h->biWidth);
+ mp_msg(MSGT_HEADER, verbose_level, " biHeight %d\n", h->biHeight);
+ mp_msg(MSGT_HEADER, verbose_level, " biPlanes %d\n", h->biPlanes);
+ mp_msg(MSGT_HEADER, verbose_level, " biBitCount %d\n", h->biBitCount);
+ mp_msg(MSGT_HEADER, verbose_level, " biCompression %d='%.4s'\n", h->biCompression, (char *)&h->biCompression);
+ mp_msg(MSGT_HEADER, verbose_level, " biSizeImage %d\n", h->biSizeImage);
if (h->biSize > sizeof(BITMAPINFOHEADER))
{
int i;
uint8_t* p = ((uint8_t*)h) + sizeof(BITMAPINFOHEADER);
- printf("Unknown extra header dump: ");
+ mp_msg(MSGT_HEADER, verbose_level, "Unknown extra header dump: ");
for (i = 0; i < h->biSize-sizeof(BITMAPINFOHEADER); i++)
- printf("[%x] ", *(p+i));
- printf("\n");
+ mp_msg(MSGT_HEADER, verbose_level, "[%x] ", *(p+i));
+ mp_msg(MSGT_HEADER, verbose_level, "\n");
}
- printf("===========================\n");
+ mp_msg(MSGT_HEADER, verbose_level, "===========================\n");
}
-void print_vprp(VideoPropHeader *vprp){
+void print_vprp(VideoPropHeader *vprp, int verbose_level){
int i;
- printf("======= Video Properties Header =======\n");
- printf("Format: %d VideoStandard: %d\n",
+ mp_msg(MSGT_HEADER, verbose_level, "======= Video Properties Header =======\n");
+ mp_msg(MSGT_HEADER, verbose_level, "Format: %d VideoStandard: %d\n",
vprp->VideoFormatToken,vprp->VideoStandard);
- printf("VRefresh: %d HTotal: %d VTotal: %d\n",
+ mp_msg(MSGT_HEADER, verbose_level, "VRefresh: %d HTotal: %d VTotal: %d\n",
vprp->dwVerticalRefreshRate, vprp->dwHTotalInT, vprp->dwVTotalInLines);
- printf("FrameAspect: %d:%d Framewidth: %d Frameheight: %d\n",
+ mp_msg(MSGT_HEADER, verbose_level, "FrameAspect: %d:%d Framewidth: %d Frameheight: %d\n",
vprp->dwFrameAspectRatio >> 16, vprp->dwFrameAspectRatio & 0xffff,
vprp->dwFrameWidthInPixels, vprp->dwFrameHeightInLines);
- printf("Fields: %d\n", vprp->nbFieldPerFrame);
+ mp_msg(MSGT_HEADER, verbose_level, "Fields: %d\n", vprp->nbFieldPerFrame);
for (i=0; i<vprp->nbFieldPerFrame; i++) {
VIDEO_FIELD_DESC *vfd = &vprp->FieldInfo[i];
- printf(" == Field %d description ==\n", i);
- printf(" CompressedBMHeight: %d CompressedBMWidth: %d\n",
+ mp_msg(MSGT_HEADER, verbose_level, " == Field %d description ==\n", i);
+ mp_msg(MSGT_HEADER, verbose_level, " CompressedBMHeight: %d CompressedBMWidth: %d\n",
vfd->CompressedBMHeight, vfd->CompressedBMWidth);
- printf(" ValidBMHeight: %d ValidBMWidth: %d\n",
+ mp_msg(MSGT_HEADER, verbose_level, " ValidBMHeight: %d ValidBMWidth: %d\n",
vfd->ValidBMHeight, vfd->ValidBMWidth);
- printf(" ValidBMXOffset: %d ValidBMYOffset: %d\n",
+ mp_msg(MSGT_HEADER, verbose_level, " ValidBMXOffset: %d ValidBMYOffset: %d\n",
vfd->ValidBMXOffset, vfd->ValidBMYOffset);
- printf(" VideoXOffsetInT: %d VideoYValidStartLine: %d\n",
+ mp_msg(MSGT_HEADER, verbose_level, " VideoXOffsetInT: %d VideoYValidStartLine: %d\n",
vfd->VideoXOffsetInT, vfd->VideoYValidStartLine);
}
- printf("=======================================\n");
+ mp_msg(MSGT_HEADER, verbose_level, "=======================================\n");
}
-void print_index(AVIINDEXENTRY *idx,int idx_size){
+void print_index(AVIINDEXENTRY *idx, int idx_size, int verbose_level){
int i;
unsigned int pos[256];
unsigned int num[256];
@@ -138,7 +138,7 @@
for(i=0;i<idx_size;i++){
int id=avi_stream_id(idx[i].ckid);
if(id<0 || id>255) id=255;
- printf("%5d: %.4s %4X %016llX len:%6ld pos:%7d->%7.3f %7d->%7.3f\n",i,
+ mp_msg(MSGT_HEADER, verbose_level, "%5d: %.4s %4X %016llX len:%6ld pos:%7d->%7.3f %7d->%7.3f\n",i,
(char *)&idx[i].ckid,
(unsigned int)idx[i].dwFlags&0xffff,
(uint64_t)AVI_IDX_OFFSET(&idx[i]),
@@ -152,21 +152,21 @@
}
}
-void print_avistdindex_chunk(avistdindex_chunk *h){
- mp_msg (MSGT_HEADER, MSGL_V, "====== AVI Standard Index Header ========\n");
- mp_msg (MSGT_HEADER, MSGL_V, " FCC (%.4s) dwSize (%d) wLongsPerEntry(%d)\n", h->fcc, h->dwSize, h->wLongsPerEntry);
- mp_msg (MSGT_HEADER, MSGL_V, " bIndexSubType (%d) bIndexType (%d)\n", h->bIndexSubType, h->bIndexType);
- mp_msg (MSGT_HEADER, MSGL_V, " nEntriesInUse (%d) dwChunkId (%.4s)\n", h->nEntriesInUse, h->dwChunkId);
- mp_msg (MSGT_HEADER, MSGL_V, " qwBaseOffset (0x%"PRIX64") dwReserved3 (%d)\n", h->qwBaseOffset, h->dwReserved3);
- mp_msg (MSGT_HEADER, MSGL_V, "===========================\n");
-}
-void print_avisuperindex_chunk(avisuperindex_chunk *h){
- mp_msg (MSGT_HEADER, MSGL_V, "====== AVI Super Index Header ========\n");
- mp_msg (MSGT_HEADER, MSGL_V, " FCC (%.4s) dwSize (%d) wLongsPerEntry(%d)\n", h->fcc, h->dwSize, h->wLongsPerEntry);
- mp_msg (MSGT_HEADER, MSGL_V, " bIndexSubType (%d) bIndexType (%d)\n", h->bIndexSubType, h->bIndexType);
- mp_msg (MSGT_HEADER, MSGL_V, " nEntriesInUse (%d) dwChunkId (%.4s)\n", h->nEntriesInUse, h->dwChunkId);
- mp_msg (MSGT_HEADER, MSGL_V, " dwReserved[0] (%d) dwReserved[1] (%d) dwReserved[2] (%d)\n",
+void print_avistdindex_chunk(avistdindex_chunk *h, int verbose_level){
+ mp_msg (MSGT_HEADER, verbose_level, "====== AVI Standard Index Header ========\n");
+ mp_msg (MSGT_HEADER, verbose_level, " FCC (%.4s) dwSize (%d) wLongsPerEntry(%d)\n", h->fcc, h->dwSize, h->wLongsPerEntry);
+ mp_msg (MSGT_HEADER, verbose_level, " bIndexSubType (%d) bIndexType (%d)\n", h->bIndexSubType, h->bIndexType);
+ mp_msg (MSGT_HEADER, verbose_level, " nEntriesInUse (%d) dwChunkId (%.4s)\n", h->nEntriesInUse, h->dwChunkId);
+ mp_msg (MSGT_HEADER, verbose_level, " qwBaseOffset (0x%"PRIX64") dwReserved3 (%d)\n", h->qwBaseOffset, h->dwReserved3);
+ mp_msg (MSGT_HEADER, verbose_level, "===========================\n");
+}
+void print_avisuperindex_chunk(avisuperindex_chunk *h, int verbose_level){
+ mp_msg (MSGT_HEADER, verbose_level, "====== AVI Super Index Header ========\n");
+ mp_msg (MSGT_HEADER, verbose_level, " FCC (%.4s) dwSize (%d) wLongsPerEntry(%d)\n", h->fcc, h->dwSize, h->wLongsPerEntry);
+ mp_msg (MSGT_HEADER, verbose_level, " bIndexSubType (%d) bIndexType (%d)\n", h->bIndexSubType, h->bIndexType);
+ mp_msg (MSGT_HEADER, verbose_level, " nEntriesInUse (%d) dwChunkId (%.4s)\n", h->nEntriesInUse, h->dwChunkId);
+ mp_msg (MSGT_HEADER, verbose_level, " dwReserved[0] (%d) dwReserved[1] (%d) dwReserved[2] (%d)\n",
h->dwReserved[0], h->dwReserved[1], h->dwReserved[2]);
- mp_msg (MSGT_HEADER, MSGL_V, "===========================\n");
+ mp_msg (MSGT_HEADER, verbose_level, "===========================\n");
}
Index: demux_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_audio.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- demux_audio.c 24 Mar 2006 08:12:02 -0000 1.48
+++ demux_audio.c 27 Mar 2006 17:25:41 -0000 1.49
@@ -44,7 +44,7 @@
} mp3_hdr_t;
extern void free_sh_audio(sh_audio_t* sh);
-extern void print_wave_header(WAVEFORMATEX *h);
+extern void print_wave_header(WAVEFORMATEX *h, int verbose_level);
int hr_mp3_seek = 0;
@@ -438,7 +438,7 @@
}
}
- if( mp_msg_test(MSGT_DEMUX,MSGL_V) ) print_wave_header(w);
+ if( mp_msg_test(MSGT_DEMUX,MSGL_V) ) print_wave_header(w, MSGL_V);
if(l)
stream_skip(s,l);
do
Index: demux_lavf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_lavf.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- demux_lavf.c 24 Mar 2006 08:12:02 -0000 1.29
+++ demux_lavf.c 27 Mar 2006 17:25:41 -0000 1.30
@@ -46,8 +46,8 @@
int64_t last_pts;
}lavf_priv_t;
-extern void print_wave_header(WAVEFORMATEX *h);
-extern void print_video_header(BITMAPINFOHEADER *h);
+extern void print_wave_header(WAVEFORMATEX *h, int verbose_level);
+extern void print_video_header(BITMAPINFOHEADER *h, int verbose_level);
int64_t ff_gcd(int64_t a, int64_t b);
@@ -237,7 +237,7 @@
sh_audio->format = 0x7;
break;
}
- if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_wave_header(sh_audio->wf);
+ if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_wave_header(sh_audio->wf, MSGL_V);
if(demuxer->audio->id != i && demuxer->audio->id != -1)
st->discard= AVDISCARD_ALL;
else{
@@ -286,7 +286,7 @@
sh_video->ds= demuxer->video;
if(codec->extradata_size)
memcpy(sh_video->bih + 1, codec->extradata, codec->extradata_size);
- if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_video_header(sh_video->bih);
+ if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_video_header(sh_video->bih, MSGL_V);
/* short biPlanes;
int biXPelsPerMeter;
int biYPelsPerMeter;
Index: demux_ogg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ogg.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -r1.90 -r1.91
--- demux_ogg.c 24 Mar 2006 08:12:02 -0000 1.90
+++ demux_ogg.c 27 Mar 2006 17:25:41 -0000 1.91
@@ -705,8 +705,8 @@
}
-extern void print_wave_header(WAVEFORMATEX *h);
-extern void print_video_header(BITMAPINFOHEADER *h);
+extern void print_wave_header(WAVEFORMATEX *h, int verbose_level);
+extern void print_video_header(BITMAPINFOHEADER *h, int verbose_level);
/** \brief Return the number of subtitle tracks in the file.
@@ -993,7 +993,7 @@
(int)inf.version_minor,
(int)inf.version_subminor,
n_video - 1);
- if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_video_header(sh_v->bih);
+ if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_video_header(sh_v->bih,MSGL_V);
}
# endif /* HAVE_OGGTHEORA */
# ifdef HAVE_FLAC
@@ -1036,7 +1036,7 @@
n_video++;
mp_msg(MSGT_DEMUX,MSGL_INFO,"[Ogg] stream %d: video (FOURCC %c%c%c%c), -vid %d\n",
ogg_d->num_sub,pack.packet[68],pack.packet[69],pack.packet[70],pack.packet[71],n_video-1);
- if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_video_header(sh_v->bih);
+ if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_video_header(sh_v->bih,MSGL_V);
// Old audio header
} else if(get_uint32(pack.packet+96) == 0x05589F81) {
unsigned int extra_size;
@@ -1060,7 +1060,7 @@
ogg_d->subs[ogg_d->num_sub].id = n_audio;
n_audio++;
mp_msg(MSGT_DEMUX,MSGL_INFO,"[Ogg] stream %d: audio (format 0x%04x), -aid %d\n",ogg_d->num_sub,sh_a->format,n_audio-1);
- if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_wave_header(sh_a->wf);
+ if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_wave_header(sh_a->wf,MSGL_V);
} else
mp_msg(MSGT_DEMUX,MSGL_WARN,"Ogg stream %d contains an old header but the header type is unknown\n",ogg_d->num_sub);
@@ -1092,7 +1092,7 @@
n_video++;
mp_msg(MSGT_DEMUX,MSGL_INFO,"[Ogg] stream %d: video (FOURCC %c%c%c%c), -vid %d\n",
ogg_d->num_sub,st->subtype[0],st->subtype[1],st->subtype[2],st->subtype[3],n_video-1);
- if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_video_header(sh_v->bih);
+ if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_video_header(sh_v->bih,MSGL_V);
/// New audio header
} else if(strncmp(st->streamtype,"audio",5) == 0) {
char buffer[5];
@@ -1131,7 +1131,7 @@
ogg_d->subs[ogg_d->num_sub].id = n_audio;
n_audio++;
mp_msg(MSGT_DEMUX,MSGL_INFO,"[Ogg] stream %d: audio (format 0x%04x), -aid %d\n",ogg_d->num_sub,sh_a->format,n_audio-1);
- if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_wave_header(sh_a->wf);
+ if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_wave_header(sh_a->wf,MSGL_V);
/// Check for text (subtitles) header
} else if (strncmp(st->streamtype, "text", 4) == 0) {
@@ -1162,7 +1162,7 @@
// If the audio stream is not defined we took the first one
if(demuxer->audio->id == -1) {
demuxer->audio->id = n_audio - 1;
-// if(sh_a->wf) print_wave_header(sh_a->wf);
+// if(sh_a->wf) print_wave_header(sh_a->wf,MSGL_INFO);
}
/// Is it the stream we want
if(demuxer->audio->id == (n_audio - 1)) {
@@ -1176,7 +1176,7 @@
/// Also for video
if(demuxer->video->id == -1) {
demuxer->video->id = n_video - 1;
-// if(sh_v->bih) print_video_header(sh_v->bih);
+// if(sh_v->bih) print_video_header(sh_v->bih,MSGL_INFO);
}
if(demuxer->video->id == (n_video - 1)) {
demuxer->video->sh = sh_v;
Index: demux_real.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_real.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- demux_real.c 24 Mar 2006 08:12:02 -0000 1.93
+++ demux_real.c 27 Mar 2006 17:25:41 -0000 1.94
@@ -1070,7 +1070,7 @@
}// goto loop;
}
-extern void print_wave_header(WAVEFORMATEX *h);
+extern void print_wave_header(WAVEFORMATEX *h, int verbose_level);
static demuxer_t* demux_open_real(demuxer_t* demuxer)
{
@@ -1449,7 +1449,7 @@
mp_msg(MSGT_DEMUX,MSGL_V,"audio fourcc: %.4s (%x)\n", (char *)&sh->format, sh->format);
if ( mp_msg_test(MSGT_DEMUX,MSGL_V) )
- print_wave_header(sh->wf);
+ print_wave_header(sh->wf, MSGL_V);
/* Select audio stream with highest bitrate if multirate file*/
if (priv->is_multirate && ((demuxer->audio->id == -1) ||
Index: demux_realaud.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_realaud.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- demux_realaud.c 17 Feb 2006 01:57:41 -0000 1.14
+++ demux_realaud.c 27 Mar 2006 17:25:41 -0000 1.15
@@ -144,7 +144,7 @@
-extern void print_wave_header(WAVEFORMATEX *h);
+extern void print_wave_header(WAVEFORMATEX *h, int verbose_level);
@@ -313,7 +313,7 @@
mp_msg(MSGT_DEMUX,MSGL_V,"Audio: Unknown (%d)\n", sh->format);
}
- print_wave_header(sh->wf);
+ print_wave_header(sh->wf, MSGL_V);
/* disable seeking */
demuxer->seekable = 0;
More information about the MPlayer-cvslog
mailing list