Diffstat (limited to 'noncore/multimedia/camera/jpegtoavi/avifmt.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/camera/jpegtoavi/avifmt.h | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/noncore/multimedia/camera/jpegtoavi/avifmt.h b/noncore/multimedia/camera/jpegtoavi/avifmt.h new file mode 100644 index 0000000..53ce60d --- a/dev/null +++ b/noncore/multimedia/camera/jpegtoavi/avifmt.h | |||
@@ -0,0 +1,116 @@ | |||
1 | #ifndef _AVIFMT_HH_ | ||
2 | #define _AVIFMT_HH_ | ||
3 | |||
4 | /* 4 bytes */ | ||
5 | typedef int WORD; | ||
6 | typedef unsigned int DWORD; | ||
7 | /* 1 byte */ | ||
8 | typedef char BYTE; | ||
9 | |||
10 | |||
11 | /* flags for use in flags in AVI_avih */ | ||
12 | const DWORD AVIF_HASINDEX=0x00000010;/* index at end of file */ | ||
13 | const DWORD AVIF_MUSTUSEINDEX=0x00000020; | ||
14 | const DWORD AVIF_ISINTERLEAVED=0x00000100; | ||
15 | const DWORD AVIF_TRUSTCKTYPE=0x00000800; | ||
16 | const DWORD AVIF_WASCAPTUREFILE=0x00010000; | ||
17 | const DWORD AVIF_COPYRIGHTED=0x00020000; | ||
18 | |||
19 | |||
20 | struct AVI_avih { | ||
21 | DWORD us_per_frame;// frame display rate (or 0L) | ||
22 | DWORD max_bytes_per_sec;// max. transfer rate | ||
23 | DWORD padding;// pad to multiples of this size; | ||
24 | // normally 2K. | ||
25 | DWORD flags; | ||
26 | DWORD tot_frames; // # frames in file | ||
27 | DWORD init_frames; | ||
28 | DWORD streams; | ||
29 | DWORD buff_sz; | ||
30 | DWORD width; | ||
31 | DWORD height; | ||
32 | DWORD reserved[4]; | ||
33 | }; | ||
34 | |||
35 | |||
36 | struct AVI_strh { | ||
37 | unsigned char type[4]; /* stream type */ | ||
38 | unsigned char handler[4]; | ||
39 | DWORD flags; | ||
40 | DWORD priority; | ||
41 | DWORD init_frames; /* initial frames (???) */ | ||
42 | DWORD scale; | ||
43 | DWORD rate; | ||
44 | DWORD start; | ||
45 | DWORD length; | ||
46 | DWORD buff_sz; /* suggested buffer size */ | ||
47 | DWORD quality; | ||
48 | DWORD sample_sz; | ||
49 | /* | ||
50 | DWORD frame[4]; | ||
51 | XXX 16 bytes ? */ | ||
52 | }; | ||
53 | |||
54 | |||
55 | struct AVI_strf { /* == BitMapInfoHeader */ | ||
56 | DWORD sz; | ||
57 | DWORD width; | ||
58 | DWORD height; | ||
59 | DWORD planes_bit_cnt; | ||
60 | unsigned char compression[4]; | ||
61 | DWORD image_sz; | ||
62 | DWORD xpels_meter; | ||
63 | DWORD ypels_meter; | ||
64 | DWORD num_colors; /* used colors */ | ||
65 | DWORD imp_colors; /* important colors */ | ||
66 | /* may be more for some codecs */ | ||
67 | }; | ||
68 | |||
69 | |||
70 | struct AVI_list_hdr { | ||
71 | unsigned char id[4]; | ||
72 | DWORD sz; | ||
73 | unsigned char type[4]; | ||
74 | }; | ||
75 | |||
76 | |||
77 | struct AVI_list_odml { | ||
78 | struct AVI_list_hdr list_hdr; | ||
79 | |||
80 | unsigned char id[4]; | ||
81 | DWORD sz; | ||
82 | DWORD frames; | ||
83 | }; | ||
84 | |||
85 | |||
86 | struct AVI_list_strl { | ||
87 | struct AVI_list_hdr list_hdr; | ||
88 | |||
89 | /* chunk strh */ | ||
90 | unsigned char strh_id[4]; | ||
91 | DWORD strh_sz; | ||
92 | struct AVI_strh strh; | ||
93 | |||
94 | /* chunk strf */ | ||
95 | unsigned char strf_id[4]; | ||
96 | DWORD strf_sz; | ||
97 | struct AVI_strf strf; | ||
98 | |||
99 | /* list odml */ | ||
100 | struct AVI_list_odml list_odml; | ||
101 | }; | ||
102 | |||
103 | |||
104 | struct AVI_list_hdrl { | ||
105 | struct AVI_list_hdr list_hdr; | ||
106 | |||
107 | /* chunk avih */ | ||
108 | unsigned char avih_id[4]; | ||
109 | DWORD avih_sz; | ||
110 | struct AVI_avih avih; | ||
111 | |||
112 | /* list strl */ | ||
113 | struct AVI_list_strl strl; | ||
114 | }; | ||
115 | |||
116 | #endif | ||