annotate aviprint.c @ 584:9bdb59e8887d

find_sub() moved out from mplayer.c
author arpi_esp
date Mon, 23 Apr 2001 03:34:47 +0000
parents 8cbc038b0547
children 8511095c5283
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1 void print_avih(MainAVIHeader *h){
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2 printf("======= AVI Header =======\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
3 printf("us/frame: %d (fps=%5.3f)\n",h->dwMicroSecPerFrame,1000000.0f/(float)h->dwMicroSecPerFrame);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
4 printf("max bytes/sec: %d\n",h->dwMaxBytesPerSec);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
5 printf("padding: %d\n",h->dwPaddingGranularity);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
6 printf("flags: (%d)%s%s%s%s%s%s\n",h->dwFlags,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
7 (h->dwFlags&AVIF_HASINDEX)?" HAS_INDEX":"",
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
8 (h->dwFlags&AVIF_MUSTUSEINDEX)?" MUST_USE_INDEX":"",
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
9 (h->dwFlags&AVIF_ISINTERLEAVED)?" IS_INTERLEAVED":"",
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
10 (h->dwFlags&AVIF_TRUSTCKTYPE)?" TRUST_CKTYPE":"",
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
11 (h->dwFlags&AVIF_WASCAPTUREFILE)?" WAS_CAPTUREFILE":"",
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
12 (h->dwFlags&AVIF_COPYRIGHTED)?" COPYRIGHTED":""
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
13 );
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
14 printf("frames total: %d initial: %d\n",h->dwTotalFrames,h->dwInitialFrames);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
15 printf("streams: %d\n",h->dwStreams);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
16 printf("Suggested BufferSize: %d\n",h->dwSuggestedBufferSize);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
17 printf("Size: %d x %d\n",h->dwWidth,h->dwHeight);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
19
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
20 void print_strh(AVIStreamHeader *h){
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
21 printf("======= STREAM Header =======\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
22 printf("Type: %.4s FCC: %.4s (%X)\n",&h->fccType,&h->fccHandler,h->fccHandler);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23 printf("Flags: %d\n",h->dwFlags);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24 printf("Priority: %d Language: %d\n",h->wPriority,h->wLanguage);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
25 printf("InitialFrames: %d\n",h->dwInitialFrames);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26 printf("Rate: %d/%d = %5.3f\n",h->dwRate,h->dwScale,(float)h->dwRate/(float)h->dwScale);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27 printf("Start: %d Len: %d\n",h->dwStart,h->dwLength);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
28 printf("Suggested BufferSize: %d\n",h->dwSuggestedBufferSize);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
29 printf("Quality %d\n",h->dwQuality);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
30 printf("Sample size: %d\n",h->dwSampleSize);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
31 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
32
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
33 void print_wave_header(WAVEFORMATEX *h){
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
34
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
35 printf("======= WAVE Format =======\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36 printf("Format Tag: %d (0x%X)\n",h->wFormatTag,h->wFormatTag);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
37 printf("Channels: %d\n",h->nChannels);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38 printf("Samplerate: %d\n",h->nSamplesPerSec);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
39 printf("avg byte/sec: %d\n",h->nAvgBytesPerSec);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
40 printf("Block align: %d\n",h->nBlockAlign);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41 printf("bits/sample: %d\n",h->wBitsPerSample);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
42 printf("cbSize: %d\n",h->cbSize);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
44
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
46 void print_video_header(BITMAPINFOHEADER *h){
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
47 printf("======= VIDEO Format ======\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
48 printf(" biSize %d\n", h->biSize);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49 printf(" biWidth %d\n", h->biWidth);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50 printf(" biHeight %d\n", h->biHeight);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51 printf(" biPlanes %d\n", h->biPlanes);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52 printf(" biBitCount %d\n", h->biBitCount);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53 printf(" biCompression %d='%.4s'\n", h->biCompression, &h->biCompression);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
54 printf(" biSizeImage %d\n", h->biSizeImage);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
55 printf("===========================\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
56 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
57
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
58
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
59 void print_index(){
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
60 int i;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
61 for(i=0;i<avi_header.idx_size;i++){
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
62 printf("%5d: %.4s %4X %08X (%08X) %d\n",i,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
63 &avi_header.idx[i].ckid,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
64 avi_header.idx[i].dwFlags,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
65 avi_header.idx[i].dwChunkOffset,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
66 avi_header.idx[i].dwChunkOffset+avi_header.movi_start,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
67 avi_header.idx[i].dwChunkLength
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
68 );
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
69 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
70 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
71
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
72