annotate aviprint.c @ 1036:537875fdcf16

*** empty log message ***
author gabucino
date Tue, 05 Jun 2001 16:15:39 +0000
parents 1d71e691c059
children 1728d249c783
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
587
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
1
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
2 #include <stdio.h>
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
3 #include <stdlib.h>
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
4
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
5 //extern int verbose; // defined in mplayer.c
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
6
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
7 #include "stream.h"
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
8 #include "demuxer.h"
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
9
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
10 #include "wine/mmreg.h"
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
11 #include "wine/avifmt.h"
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
12 #include "wine/vfw.h"
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
13
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
14 //#include "codec-cfg.h"
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
15 //#include "stheader.h"
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
16
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
17
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18 void print_avih(MainAVIHeader *h){
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
19 printf("======= AVI Header =======\n");
602
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
20 printf("us/frame: %ld (fps=%5.3f)\n",h->dwMicroSecPerFrame,1000000.0f/(float)h->dwMicroSecPerFrame);
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
21 printf("max bytes/sec: %ld\n",h->dwMaxBytesPerSec);
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
22 printf("padding: %ld\n",h->dwPaddingGranularity);
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
23 printf("flags: (%ld)%s%s%s%s%s%s\n",h->dwFlags,
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24 (h->dwFlags&AVIF_HASINDEX)?" HAS_INDEX":"",
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
25 (h->dwFlags&AVIF_MUSTUSEINDEX)?" MUST_USE_INDEX":"",
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26 (h->dwFlags&AVIF_ISINTERLEAVED)?" IS_INTERLEAVED":"",
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27 (h->dwFlags&AVIF_TRUSTCKTYPE)?" TRUST_CKTYPE":"",
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
28 (h->dwFlags&AVIF_WASCAPTUREFILE)?" WAS_CAPTUREFILE":"",
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
29 (h->dwFlags&AVIF_COPYRIGHTED)?" COPYRIGHTED":""
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
30 );
602
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
31 printf("frames total: %ld initial: %ld\n",h->dwTotalFrames,h->dwInitialFrames);
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
32 printf("streams: %ld\n",h->dwStreams);
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
33 printf("Suggested BufferSize: %ld\n",h->dwSuggestedBufferSize);
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
34 printf("Size: %ld x %ld\n",h->dwWidth,h->dwHeight);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
35 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
37 void print_strh(AVIStreamHeader *h){
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38 printf("======= STREAM Header =======\n");
602
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
39 printf("Type: %.4s FCC: %.4s (%X)\n",(char *)&h->fccType,(char *)&h->fccHandler,(unsigned int)h->fccHandler);
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
40 printf("Flags: %ld\n",h->dwFlags);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41 printf("Priority: %d Language: %d\n",h->wPriority,h->wLanguage);
602
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
42 printf("InitialFrames: %ld\n",h->dwInitialFrames);
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
43 printf("Rate: %ld/%ld = %5.3f\n",h->dwRate,h->dwScale,(float)h->dwRate/(float)h->dwScale);
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
44 printf("Start: %ld Len: %ld\n",h->dwStart,h->dwLength);
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
45 printf("Suggested BufferSize: %ld\n",h->dwSuggestedBufferSize);
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
46 printf("Quality %ld\n",h->dwQuality);
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
47 printf("Sample size: %ld\n",h->dwSampleSize);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
48 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50 void print_wave_header(WAVEFORMATEX *h){
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52 printf("======= WAVE Format =======\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53 printf("Format Tag: %d (0x%X)\n",h->wFormatTag,h->wFormatTag);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
54 printf("Channels: %d\n",h->nChannels);
602
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
55 printf("Samplerate: %ld\n",h->nSamplesPerSec);
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
56 printf("avg byte/sec: %ld\n",h->nAvgBytesPerSec);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
57 printf("Block align: %d\n",h->nBlockAlign);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
58 printf("bits/sample: %d\n",h->wBitsPerSample);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
59 printf("cbSize: %d\n",h->cbSize);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
60 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
61
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
62
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
63 void print_video_header(BITMAPINFOHEADER *h){
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
64 printf("======= VIDEO Format ======\n");
602
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
65 printf(" biSize %ld\n", h->biSize);
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
66 printf(" biWidth %ld\n", h->biWidth);
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
67 printf(" biHeight %ld\n", h->biHeight);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
68 printf(" biPlanes %d\n", h->biPlanes);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
69 printf(" biBitCount %d\n", h->biBitCount);
602
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
70 printf(" biCompression %ld='%.4s'\n", h->biCompression, (char *)&h->biCompression);
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
71 printf(" biSizeImage %ld\n", h->biSizeImage);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
72 printf("===========================\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
73 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
74
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
75
587
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
76 void print_index(AVIINDEXENTRY *idx,int idx_size){
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
77 int i;
587
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
78 for(i=0;i<idx_size;i++){
602
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
79 printf("%5d: %.4s %4X %08X %ld\n",i,
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
80 (char *)&idx[i].ckid,
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
81 (unsigned int)idx[i].dwFlags,
1d71e691c059 warnings killed
szabii
parents: 587
diff changeset
82 (unsigned int)idx[i].dwChunkOffset,
587
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
83 // idx[i].dwChunkOffset+demuxer->movi_start,
8511095c5283 stage#1 completed: c files no more included from mplayer.c
arpi_esp
parents: 353
diff changeset
84 idx[i].dwChunkLength
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
85 );
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
86 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
87 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
88
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
89