annotate libmpdemux/aviprint.c @ 34061:fe03e0d5c7d0

Remove usage of glColor3f, there is not really a point in it.
author reimar
date Wed, 28 Sep 2011 18:52:11 +0000
parents 7c8d240d37a6
children a93891202051
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29238
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 28190
diff changeset
1 /*
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 28190
diff changeset
2 * This file is part of MPlayer.
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 28190
diff changeset
3 *
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 28190
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 28190
diff changeset
5 * it under the terms of the GNU General Public License as published by
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 28190
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 28190
diff changeset
7 * (at your option) any later version.
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 28190
diff changeset
8 *
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 28190
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 28190
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 28190
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 28190
diff changeset
12 * GNU General Public License for more details.
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 28190
diff changeset
13 *
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 28190
diff changeset
14 * You should have received a copy of the GNU General Public License along
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 28190
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 28190
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 28190
diff changeset
17 */
587
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
18
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
19 #include <stdio.h>
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
20 #include <stdlib.h>
1430
1728d249c783 missing unistd.h (requires for off_t under freebsd)
arpi
parents: 602
diff changeset
21 #include <unistd.h>
23626
53cc0856f3fe Fix format strings to match argument type
reimar
parents: 22605
diff changeset
22 #include <inttypes.h>
587
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
23
2555
66837325b929 config.h cleanup, few things added to steram/demuxer headers
arpi
parents: 2314
diff changeset
24 #include "config.h"
66837325b929 config.h cleanup, few things added to steram/demuxer headers
arpi
parents: 2314
diff changeset
25
7471
5e56ce70b551 wine headers cleanup
arpi
parents: 7127
diff changeset
26 // for avi_stream_id():
22605
4d81dbdf46b9 Add explicit location for headers from the stream/ directory.
diego
parents: 17977
diff changeset
27 #include "stream/stream.h"
587
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
28 #include "demuxer.h"
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
29
12036
846ed866f86c OpenDML read/write support
ranma
parents: 10484
diff changeset
30 #include "aviheader.h"
12341
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents: 12036
diff changeset
31 #include "ms_hdr.h"
30589
df6c41f16b40 Add header for AVI print functions; avoids many forward declarations.
diego
parents: 29263
diff changeset
32 #include "aviprint.h"
12036
846ed866f86c OpenDML read/write support
ranma
parents: 10484
diff changeset
33
587
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
34 //#include "codec-cfg.h"
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
35 //#include "stheader.h"
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
36
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
37 void print_avih_flags(MainAVIHeader *h, int verbose_level){
23626
53cc0856f3fe Fix format strings to match argument type
reimar
parents: 22605
diff changeset
38 mp_msg(MSGT_HEADER, verbose_level, "MainAVIHeader.dwFlags: (%"PRId32")%s%s%s%s%s%s\n",h->dwFlags,
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
39 (h->dwFlags&AVIF_HASINDEX)?" HAS_INDEX":"",
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
40 (h->dwFlags&AVIF_MUSTUSEINDEX)?" MUST_USE_INDEX":"",
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41 (h->dwFlags&AVIF_ISINTERLEAVED)?" IS_INTERLEAVED":"",
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
42 (h->dwFlags&AVIF_TRUSTCKTYPE)?" TRUST_CKTYPE":"",
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43 (h->dwFlags&AVIF_WASCAPTUREFILE)?" WAS_CAPTUREFILE":"",
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
44 (h->dwFlags&AVIF_COPYRIGHTED)?" COPYRIGHTED":""
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45 );
1456
8c57a5a3c645 printfs cleanup - moved to higher -v level or moved to stderr
arpi
parents: 1430
diff changeset
46 }
8c57a5a3c645 printfs cleanup - moved to higher -v level or moved to stderr
arpi
parents: 1430
diff changeset
47
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
48 void print_avih(MainAVIHeader *h, int verbose_level){
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
49 mp_msg(MSGT_HEADER, verbose_level, "======= AVI Header =======\n");
23626
53cc0856f3fe Fix format strings to match argument type
reimar
parents: 22605
diff changeset
50 mp_msg(MSGT_HEADER, verbose_level, "us/frame: %"PRId32" (fps=%5.3f)\n",h->dwMicroSecPerFrame,1000000.0f/(float)h->dwMicroSecPerFrame);
53cc0856f3fe Fix format strings to match argument type
reimar
parents: 22605
diff changeset
51 mp_msg(MSGT_HEADER, verbose_level, "max bytes/sec: %"PRId32"\n",h->dwMaxBytesPerSec);
53cc0856f3fe Fix format strings to match argument type
reimar
parents: 22605
diff changeset
52 mp_msg(MSGT_HEADER, verbose_level, "padding: %"PRId32"\n",h->dwPaddingGranularity);
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
53 print_avih_flags(h, verbose_level);
23626
53cc0856f3fe Fix format strings to match argument type
reimar
parents: 22605
diff changeset
54 mp_msg(MSGT_HEADER, verbose_level, "frames total: %"PRId32" initial: %"PRId32"\n",h->dwTotalFrames,h->dwInitialFrames);
53cc0856f3fe Fix format strings to match argument type
reimar
parents: 22605
diff changeset
55 mp_msg(MSGT_HEADER, verbose_level, "streams: %"PRId32"\n",h->dwStreams);
53cc0856f3fe Fix format strings to match argument type
reimar
parents: 22605
diff changeset
56 mp_msg(MSGT_HEADER, verbose_level, "Suggested BufferSize: %"PRId32"\n",h->dwSuggestedBufferSize);
53cc0856f3fe Fix format strings to match argument type
reimar
parents: 22605
diff changeset
57 mp_msg(MSGT_HEADER, verbose_level, "Size: %"PRId32" x %"PRId32"\n",h->dwWidth,h->dwHeight);
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
58 mp_msg(MSGT_HEADER, verbose_level, "==========================\n");
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
59 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
60
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
61 void print_strh(AVIStreamHeader *h, int verbose_level){
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
62 mp_msg(MSGT_HEADER, verbose_level, "====== STREAM Header =====\n");
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
63 mp_msg(MSGT_HEADER, verbose_level, "Type: %.4s FCC: %.4s (%X)\n",(char *)&h->fccType,(char *)&h->fccHandler,(unsigned int)h->fccHandler);
23626
53cc0856f3fe Fix format strings to match argument type
reimar
parents: 22605
diff changeset
64 mp_msg(MSGT_HEADER, verbose_level, "Flags: %"PRId32"\n",h->dwFlags);
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
65 mp_msg(MSGT_HEADER, verbose_level, "Priority: %d Language: %d\n",h->wPriority,h->wLanguage);
23626
53cc0856f3fe Fix format strings to match argument type
reimar
parents: 22605
diff changeset
66 mp_msg(MSGT_HEADER, verbose_level, "InitialFrames: %"PRId32"\n",h->dwInitialFrames);
53cc0856f3fe Fix format strings to match argument type
reimar
parents: 22605
diff changeset
67 mp_msg(MSGT_HEADER, verbose_level, "Rate: %"PRId32"/%"PRId32" = %5.3f\n",h->dwRate,h->dwScale,(float)h->dwRate/(float)h->dwScale);
53cc0856f3fe Fix format strings to match argument type
reimar
parents: 22605
diff changeset
68 mp_msg(MSGT_HEADER, verbose_level, "Start: %"PRId32" Len: %"PRId32"\n",h->dwStart,h->dwLength);
53cc0856f3fe Fix format strings to match argument type
reimar
parents: 22605
diff changeset
69 mp_msg(MSGT_HEADER, verbose_level, "Suggested BufferSize: %"PRId32"\n",h->dwSuggestedBufferSize);
53cc0856f3fe Fix format strings to match argument type
reimar
parents: 22605
diff changeset
70 mp_msg(MSGT_HEADER, verbose_level, "Quality %"PRId32"\n",h->dwQuality);
53cc0856f3fe Fix format strings to match argument type
reimar
parents: 22605
diff changeset
71 mp_msg(MSGT_HEADER, verbose_level, "Sample size: %"PRId32"\n",h->dwSampleSize);
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
72 mp_msg(MSGT_HEADER, verbose_level, "==========================\n");
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
73 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
74
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
75 void print_wave_header(WAVEFORMATEX *h, int verbose_level){
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
76 mp_msg(MSGT_HEADER, verbose_level, "======= WAVE Format =======\n");
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
77 mp_msg(MSGT_HEADER, verbose_level, "Format Tag: %d (0x%X)\n",h->wFormatTag,h->wFormatTag);
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
78 mp_msg(MSGT_HEADER, verbose_level, "Channels: %d\n",h->nChannels);
23626
53cc0856f3fe Fix format strings to match argument type
reimar
parents: 22605
diff changeset
79 mp_msg(MSGT_HEADER, verbose_level, "Samplerate: %"PRId32"\n",h->nSamplesPerSec);
53cc0856f3fe Fix format strings to match argument type
reimar
parents: 22605
diff changeset
80 mp_msg(MSGT_HEADER, verbose_level, "avg byte/sec: %"PRId32"\n",h->nAvgBytesPerSec);
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
81 mp_msg(MSGT_HEADER, verbose_level, "Block align: %d\n",h->nBlockAlign);
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
82 mp_msg(MSGT_HEADER, verbose_level, "bits/sample: %d\n",h->wBitsPerSample);
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
83 mp_msg(MSGT_HEADER, verbose_level, "cbSize: %d\n",h->cbSize);
5711
arpi
parents: 5688
diff changeset
84 if(h->wFormatTag==0x55 && h->cbSize>=12){
7127
1e47c2e7aa8e mostly compiler warning fixes, some small bugfix
arpi
parents: 5896
diff changeset
85 MPEGLAYER3WAVEFORMAT* h2=(MPEGLAYER3WAVEFORMAT *)h;
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
86 mp_msg(MSGT_HEADER, verbose_level, "mp3.wID=%d\n",h2->wID);
23626
53cc0856f3fe Fix format strings to match argument type
reimar
parents: 22605
diff changeset
87 mp_msg(MSGT_HEADER, verbose_level, "mp3.fdwFlags=0x%"PRIX32"\n",h2->fdwFlags);
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
88 mp_msg(MSGT_HEADER, verbose_level, "mp3.nBlockSize=%d\n",h2->nBlockSize);
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
89 mp_msg(MSGT_HEADER, verbose_level, "mp3.nFramesPerBlock=%d\n",h2->nFramesPerBlock);
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
90 mp_msg(MSGT_HEADER, verbose_level, "mp3.nCodecDelay=%d\n",h2->nCodecDelay);
5688
ad7d3044bea4 show extended mp3 info
arpi
parents: 2555
diff changeset
91 }
30667
6ca16928b1cc Get the proper codec id when a WAVE_FORMAT_EXTENSIBLE extension exists in a
tack
parents: 30633
diff changeset
92 else if (h->wFormatTag == 0xfffe && h->cbSize >= 22) {
6ca16928b1cc Get the proper codec id when a WAVE_FORMAT_EXTENSIBLE extension exists in a
tack
parents: 30633
diff changeset
93 WAVEFORMATEXTENSIBLE *h2 = (WAVEFORMATEXTENSIBLE *)h;
6ca16928b1cc Get the proper codec id when a WAVE_FORMAT_EXTENSIBLE extension exists in a
tack
parents: 30633
diff changeset
94 mp_msg(MSGT_HEADER, verbose_level, "ex.wValidBitsPerSample=%d\n", h2->wValidBitsPerSample);
6ca16928b1cc Get the proper codec id when a WAVE_FORMAT_EXTENSIBLE extension exists in a
tack
parents: 30633
diff changeset
95 mp_msg(MSGT_HEADER, verbose_level, "ex.dwChannelMask=0x%X\n", h2->dwChannelMask);
6ca16928b1cc Get the proper codec id when a WAVE_FORMAT_EXTENSIBLE extension exists in a
tack
parents: 30633
diff changeset
96 mp_msg(MSGT_HEADER, verbose_level, "ex.SubFormat=%d (0x%X)\n", h2->SubFormat, h2->SubFormat);
6ca16928b1cc Get the proper codec id when a WAVE_FORMAT_EXTENSIBLE extension exists in a
tack
parents: 30633
diff changeset
97 }
5758
3b836c55666c dumping unknown extradata too
alex
parents: 5711
diff changeset
98 else if (h->cbSize > 0)
3b836c55666c dumping unknown extradata too
alex
parents: 5711
diff changeset
99 {
3b836c55666c dumping unknown extradata too
alex
parents: 5711
diff changeset
100 int i;
28190
321b70afabe1 Code simplification
reimar
parents: 23626
diff changeset
101 uint8_t* p = (uint8_t*)(h + 1);
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
102 mp_msg(MSGT_HEADER, verbose_level, "Unknown extra header dump: ");
5758
3b836c55666c dumping unknown extradata too
alex
parents: 5711
diff changeset
103 for (i = 0; i < h->cbSize; i++)
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
104 mp_msg(MSGT_HEADER, verbose_level, "[%x] ", p[i]);
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
105 mp_msg(MSGT_HEADER, verbose_level, "\n");
5758
3b836c55666c dumping unknown extradata too
alex
parents: 5711
diff changeset
106 }
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
107 mp_msg(MSGT_HEADER, verbose_level, "==========================================================================\n");
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
108 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
109
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
110
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
111 void print_video_header(BITMAPINFOHEADER *h, int verbose_level){
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
112 mp_msg(MSGT_HEADER, verbose_level, "======= VIDEO Format ======\n");
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
113 mp_msg(MSGT_HEADER, verbose_level, " biSize %d\n", h->biSize);
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
114 mp_msg(MSGT_HEADER, verbose_level, " biWidth %d\n", h->biWidth);
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
115 mp_msg(MSGT_HEADER, verbose_level, " biHeight %d\n", h->biHeight);
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
116 mp_msg(MSGT_HEADER, verbose_level, " biPlanes %d\n", h->biPlanes);
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
117 mp_msg(MSGT_HEADER, verbose_level, " biBitCount %d\n", h->biBitCount);
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
118 mp_msg(MSGT_HEADER, verbose_level, " biCompression %d='%.4s'\n", h->biCompression, (char *)&h->biCompression);
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
119 mp_msg(MSGT_HEADER, verbose_level, " biSizeImage %d\n", h->biSizeImage);
32111
7c8d240d37a6 Replace sizeof(type)
reimar
parents: 30667
diff changeset
120 if (h->biSize > sizeof(*h))
10484
105077598ef3 dump extra bytes of bitmapinfoheader in verbose mode and make outputs consistent
alex
parents: 8123
diff changeset
121 {
105077598ef3 dump extra bytes of bitmapinfoheader in verbose mode and make outputs consistent
alex
parents: 8123
diff changeset
122 int i;
28190
321b70afabe1 Code simplification
reimar
parents: 23626
diff changeset
123 uint8_t* p = (uint8_t*)(h + 1);
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
124 mp_msg(MSGT_HEADER, verbose_level, "Unknown extra header dump: ");
32111
7c8d240d37a6 Replace sizeof(type)
reimar
parents: 30667
diff changeset
125 for (i = 0; i < h->biSize-sizeof(*h); i++)
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
126 mp_msg(MSGT_HEADER, verbose_level, "[%x] ", *(p+i));
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
127 mp_msg(MSGT_HEADER, verbose_level, "\n");
10484
105077598ef3 dump extra bytes of bitmapinfoheader in verbose mode and make outputs consistent
alex
parents: 8123
diff changeset
128 }
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
129 mp_msg(MSGT_HEADER, verbose_level, "===========================\n");
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
130 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
131
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
132 void print_vprp(VideoPropHeader *vprp, int verbose_level){
12036
846ed866f86c OpenDML read/write support
ranma
parents: 10484
diff changeset
133 int i;
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
134 mp_msg(MSGT_HEADER, verbose_level, "======= Video Properties Header =======\n");
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
135 mp_msg(MSGT_HEADER, verbose_level, "Format: %d VideoStandard: %d\n",
12036
846ed866f86c OpenDML read/write support
ranma
parents: 10484
diff changeset
136 vprp->VideoFormatToken,vprp->VideoStandard);
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
137 mp_msg(MSGT_HEADER, verbose_level, "VRefresh: %d HTotal: %d VTotal: %d\n",
12036
846ed866f86c OpenDML read/write support
ranma
parents: 10484
diff changeset
138 vprp->dwVerticalRefreshRate, vprp->dwHTotalInT, vprp->dwVTotalInLines);
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
139 mp_msg(MSGT_HEADER, verbose_level, "FrameAspect: %d:%d Framewidth: %d Frameheight: %d\n",
12036
846ed866f86c OpenDML read/write support
ranma
parents: 10484
diff changeset
140 vprp->dwFrameAspectRatio >> 16, vprp->dwFrameAspectRatio & 0xffff,
846ed866f86c OpenDML read/write support
ranma
parents: 10484
diff changeset
141 vprp->dwFrameWidthInPixels, vprp->dwFrameHeightInLines);
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
142 mp_msg(MSGT_HEADER, verbose_level, "Fields: %d\n", vprp->nbFieldPerFrame);
12036
846ed866f86c OpenDML read/write support
ranma
parents: 10484
diff changeset
143 for (i=0; i<vprp->nbFieldPerFrame; i++) {
846ed866f86c OpenDML read/write support
ranma
parents: 10484
diff changeset
144 VIDEO_FIELD_DESC *vfd = &vprp->FieldInfo[i];
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
145 mp_msg(MSGT_HEADER, verbose_level, " == Field %d description ==\n", i);
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
146 mp_msg(MSGT_HEADER, verbose_level, " CompressedBMHeight: %d CompressedBMWidth: %d\n",
12036
846ed866f86c OpenDML read/write support
ranma
parents: 10484
diff changeset
147 vfd->CompressedBMHeight, vfd->CompressedBMWidth);
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
148 mp_msg(MSGT_HEADER, verbose_level, " ValidBMHeight: %d ValidBMWidth: %d\n",
12036
846ed866f86c OpenDML read/write support
ranma
parents: 10484
diff changeset
149 vfd->ValidBMHeight, vfd->ValidBMWidth);
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
150 mp_msg(MSGT_HEADER, verbose_level, " ValidBMXOffset: %d ValidBMYOffset: %d\n",
12036
846ed866f86c OpenDML read/write support
ranma
parents: 10484
diff changeset
151 vfd->ValidBMXOffset, vfd->ValidBMYOffset);
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
152 mp_msg(MSGT_HEADER, verbose_level, " VideoXOffsetInT: %d VideoYValidStartLine: %d\n",
12036
846ed866f86c OpenDML read/write support
ranma
parents: 10484
diff changeset
153 vfd->VideoXOffsetInT, vfd->VideoYValidStartLine);
846ed866f86c OpenDML read/write support
ranma
parents: 10484
diff changeset
154 }
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
155 mp_msg(MSGT_HEADER, verbose_level, "=======================================\n");
12036
846ed866f86c OpenDML read/write support
ranma
parents: 10484
diff changeset
156 }
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
157
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
158 void print_index(AVIINDEXENTRY *idx, int idx_size, int verbose_level){
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
159 int i;
1485
b895f95e7657 AVI demuxer cleanups, fileformat-dependent stuff moved to priv_t
arpi
parents: 1456
diff changeset
160 unsigned int pos[256];
b895f95e7657 AVI demuxer cleanups, fileformat-dependent stuff moved to priv_t
arpi
parents: 1456
diff changeset
161 unsigned int num[256];
28190
321b70afabe1 Code simplification
reimar
parents: 23626
diff changeset
162 memset(pos, 0, sizeof(pos));
321b70afabe1 Code simplification
reimar
parents: 23626
diff changeset
163 memset(num, 0, sizeof(num));
587
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
164 for(i=0;i<idx_size;i++){
1485
b895f95e7657 AVI demuxer cleanups, fileformat-dependent stuff moved to priv_t
arpi
parents: 1456
diff changeset
165 int id=avi_stream_id(idx[i].ckid);
b895f95e7657 AVI demuxer cleanups, fileformat-dependent stuff moved to priv_t
arpi
parents: 1456
diff changeset
166 if(id<0 || id>255) id=255;
23626
53cc0856f3fe Fix format strings to match argument type
reimar
parents: 22605
diff changeset
167 mp_msg(MSGT_HEADER, verbose_level, "%5d: %.4s %4X %016"PRIX64" len:%6"PRId32" pos:%7d->%7.3f %7d->%7.3f\n",i,
602
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
168 (char *)&idx[i].ckid,
12036
846ed866f86c OpenDML read/write support
ranma
parents: 10484
diff changeset
169 (unsigned int)idx[i].dwFlags&0xffff,
846ed866f86c OpenDML read/write support
ranma
parents: 10484
diff changeset
170 (uint64_t)AVI_IDX_OFFSET(&idx[i]),
587
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
171 // idx[i].dwChunkOffset+demuxer->movi_start,
1485
b895f95e7657 AVI demuxer cleanups, fileformat-dependent stuff moved to priv_t
arpi
parents: 1456
diff changeset
172 idx[i].dwChunkLength,
b895f95e7657 AVI demuxer cleanups, fileformat-dependent stuff moved to priv_t
arpi
parents: 1456
diff changeset
173 pos[id],(float)pos[id]/18747.0f,
b895f95e7657 AVI demuxer cleanups, fileformat-dependent stuff moved to priv_t
arpi
parents: 1456
diff changeset
174 num[id],(float)num[id]/23.976f
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
175 );
1485
b895f95e7657 AVI demuxer cleanups, fileformat-dependent stuff moved to priv_t
arpi
parents: 1456
diff changeset
176 pos[id]+=idx[i].dwChunkLength;
b895f95e7657 AVI demuxer cleanups, fileformat-dependent stuff moved to priv_t
arpi
parents: 1456
diff changeset
177 ++num[id];
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
178 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
179 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
180
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
181 void print_avistdindex_chunk(avistdindex_chunk *h, int verbose_level){
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
182 mp_msg (MSGT_HEADER, verbose_level, "====== AVI Standard Index Header ========\n");
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
183 mp_msg (MSGT_HEADER, verbose_level, " FCC (%.4s) dwSize (%d) wLongsPerEntry(%d)\n", h->fcc, h->dwSize, h->wLongsPerEntry);
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
184 mp_msg (MSGT_HEADER, verbose_level, " bIndexSubType (%d) bIndexType (%d)\n", h->bIndexSubType, h->bIndexType);
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
185 mp_msg (MSGT_HEADER, verbose_level, " nEntriesInUse (%d) dwChunkId (%.4s)\n", h->nEntriesInUse, h->dwChunkId);
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
186 mp_msg (MSGT_HEADER, verbose_level, " qwBaseOffset (0x%"PRIX64") dwReserved3 (%d)\n", h->qwBaseOffset, h->dwReserved3);
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
187 mp_msg (MSGT_HEADER, verbose_level, "===========================\n");
12036
846ed866f86c OpenDML read/write support
ranma
parents: 10484
diff changeset
188 }
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
189 void print_avisuperindex_chunk(avisuperindex_chunk *h, int verbose_level){
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
190 mp_msg (MSGT_HEADER, verbose_level, "====== AVI Super Index Header ========\n");
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
191 mp_msg (MSGT_HEADER, verbose_level, " FCC (%.4s) dwSize (%d) wLongsPerEntry(%d)\n", h->fcc, h->dwSize, h->wLongsPerEntry);
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
192 mp_msg (MSGT_HEADER, verbose_level, " bIndexSubType (%d) bIndexType (%d)\n", h->bIndexSubType, h->bIndexType);
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
193 mp_msg (MSGT_HEADER, verbose_level, " nEntriesInUse (%d) dwChunkId (%.4s)\n", h->nEntriesInUse, h->dwChunkId);
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 29238
diff changeset
194 mp_msg (MSGT_HEADER, verbose_level, " dwReserved[0] (%d) dwReserved[1] (%d) dwReserved[2] (%d)\n",
12036
846ed866f86c OpenDML read/write support
ranma
parents: 10484
diff changeset
195 h->dwReserved[0], h->dwReserved[1], h->dwReserved[2]);
17977
f70772d02eaa Convert printfs in aviprint.c to mp_msg and give the information printing
diego
parents: 16750
diff changeset
196 mp_msg (MSGT_HEADER, verbose_level, "===========================\n");
12036
846ed866f86c OpenDML read/write support
ranma
parents: 10484
diff changeset
197 }