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