1
|
1 //#define ANGELPOTION
|
175
|
2 //#define USE_DIRECTSHOW
|
|
3
|
190
|
4 static GUID wmv1_clsid={0x4facbba1, 0xffd8, 0x4cd7,
|
|
5 {0x82, 0x28, 0x61, 0xe2, 0xf6, 0x5c, 0xb1, 0xae}};
|
|
6 static GUID wmv2_clsid={0x521fb373, 0x7654, 0x49f2,
|
|
7 {0xbd, 0xb1, 0x0c, 0x6e, 0x66, 0x60, 0x71, 0x4f}};
|
|
8 static GUID CLSID_MorganMjpeg={0x6988b440, 0x8352, 0x11d3,
|
|
9 {0x9b, 0xda, 0xca, 0x86, 0x73, 0x7c, 0x71, 0x68}};
|
|
10 static GUID CLSID_Acelp={0x4009f700, 0xaeba, 0x11d1,
|
|
11 {0x83, 0x44, 0x00, 0xc0, 0x4f, 0xb9, 0x2e, 0xb7}};
|
|
12 static GUID CLSID_Voxware={0x73f7a062, 0x8829, 0x11d1,
|
|
13 {0xb5, 0x50, 0x00, 0x60, 0x97, 0x24, 0x2d, 0x8d}};
|
|
14 static GUID CLSID_DivxDecompressorCF={0x82CCd3E0, 0xF71A, 0x11D0,
|
175
|
15 { 0x9f, 0xe5, 0x00, 0x60, 0x97, 0x78, 0xaa, 0xaa}};
|
190
|
16 static GUID CLSID_IV50_Decoder={0x30355649, 0x0000, 0x0010,
|
|
17 {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
|
|
18 static GUID dvsd_clsid={0xB1B77C00, 0xC3E4, 0x11CF,
|
|
19 {0xAF, 0x79, 0x00, 0xAA, 0x00, 0xB6, 0x7A, 0x42}};
|
|
20
|
1
|
21
|
|
22 char* get_vids_codec_name(){
|
|
23 // unsigned long fccHandler=avi_header.video.fccHandler;
|
|
24 unsigned long fccHandler=avi_header.bih.biCompression;
|
|
25 avi_header.yuv_supported=0;
|
|
26 avi_header.yuv_hack_needed=0;
|
|
27 avi_header.flipped=0;
|
175
|
28 avi_header.vids_guid=NULL;
|
|
29
|
1
|
30 switch(fccHandler){
|
|
31 case mmioFOURCC('M', 'P', 'G', '4'):
|
|
32 case mmioFOURCC('m', 'p', 'g', '4'):
|
|
33 case mmioFOURCC('M', 'P', '4', '2'):
|
|
34 case mmioFOURCC('m', 'p', '4', '2'):
|
|
35 // case mmioFOURCC('M', 'P', '4', '3'):
|
|
36 // case mmioFOURCC('m', 'p', '4', '3'):
|
|
37 printf("Video in Microsoft MPEG-4 format\n");
|
|
38 avi_header.yuv_supported=1;
|
|
39 avi_header.yuv_hack_needed=1;
|
|
40 #ifdef ANGELPOTION
|
|
41 return "APmpg4v1.dll";
|
|
42 #endif
|
|
43 return "mpg4c32.dll";
|
125
|
44
|
1
|
45 case mmioFOURCC('M', 'P', '4', '3'):
|
|
46 case mmioFOURCC('m', 'p', '4', '3'):
|
|
47 printf("Video in MPEG-4 v3 (really DivX) format\n");
|
|
48 avi_header.bih.biCompression=mmioFOURCC('d', 'i', 'v', '3'); // hack
|
|
49 avi_header.yuv_supported=1;
|
192
|
50 #ifdef USE_DIRECTSHOW
|
|
51 avi_header.vids_guid=&CLSID_DivxDecompressorCF;
|
|
52 return "divx_c32.ax";
|
|
53 #else
|
1
|
54 avi_header.yuv_hack_needed=1;
|
|
55 #ifdef ANGELPOTION
|
|
56 return "APmpg4v1.dll";
|
192
|
57 #else
|
|
58 return "divxc32.dll";
|
1
|
59 #endif
|
192
|
60 #endif
|
1
|
61
|
|
62 case mmioFOURCC('D', 'I', 'V', 'X'):
|
|
63 case mmioFOURCC('d', 'i', 'v', 'x'):
|
|
64 return "DivX.dll";
|
|
65
|
125
|
66 case mmioFOURCC('D', 'I', 'V', '5'):
|
|
67 case mmioFOURCC('d', 'i', 'v', '5'):
|
|
68 case mmioFOURCC('D', 'I', 'V', '6'):
|
|
69 case mmioFOURCC('d', 'i', 'v', '6'):
|
|
70 avi_header.bih.biCompression-=0x02000000; // div5->div3, div6->div4
|
1
|
71 case mmioFOURCC('D', 'I', 'V', '3'):
|
|
72 case mmioFOURCC('d', 'i', 'v', '3'):
|
|
73 case mmioFOURCC('D', 'I', 'V', '4'):
|
|
74 case mmioFOURCC('d', 'i', 'v', '4'):
|
|
75 case mmioFOURCC('M', 'P', '4', '1'):
|
|
76 case mmioFOURCC('m', 'p', '4', '1'):
|
|
77 printf("Video in DivX ;-) format\n");
|
|
78 avi_header.yuv_supported=1;
|
175
|
79 #ifdef USE_DIRECTSHOW
|
|
80 avi_header.vids_guid=&CLSID_DivxDecompressorCF;
|
|
81 return "divx_c32.ax";
|
|
82 #else
|
1
|
83 avi_header.yuv_hack_needed=1;
|
|
84 #ifdef ANGELPOTION
|
|
85 return "APmpg4v1.dll";
|
175
|
86 #else
|
|
87 return "divxc32.dll";
|
1
|
88 #endif
|
175
|
89 #endif
|
1
|
90
|
|
91 case mmioFOURCC('I', 'V', '5', '0'):
|
|
92 case mmioFOURCC('i', 'v', '5', '0'):
|
|
93 printf("Video in Indeo Video 5 format\n");
|
|
94 avi_header.yuv_supported=1; // YUV pic is upside-down :(
|
|
95 return "ir50_32.dll";
|
|
96
|
|
97 case mmioFOURCC('I', 'V', '4', '1'):
|
|
98 case mmioFOURCC('i', 'v', '4', '1'):
|
|
99 printf("Video in Indeo Video 4.1 format\n");
|
|
100 avi_header.flipped=1;
|
|
101 avi_header.no_32bpp_support=1;
|
|
102 return "ir41_32.dll";
|
|
103
|
|
104 case mmioFOURCC('I', 'V', '3', '2'):
|
|
105 case mmioFOURCC('i', 'v', '3', '2'):
|
|
106 printf("Video in Indeo Video 3.2 format\n");
|
|
107 avi_header.flipped=1;
|
|
108 avi_header.no_32bpp_support=1;
|
|
109 return "ir32_32.dll";
|
|
110
|
|
111 case mmioFOURCC('c', 'v', 'i', 'd'):
|
|
112 printf("Video in Cinepak format\n");
|
|
113 avi_header.yuv_supported=1;
|
|
114 return "iccvid.dll";
|
|
115
|
124
|
116 case mmioFOURCC('c', 'r', 'a', 'm'):
|
|
117 case mmioFOURCC('C', 'R', 'A', 'M'):
|
|
118 printf("Video in CRAM format\n");
|
|
119 avi_header.no_32bpp_support=1;
|
|
120 //avi_header.yuv_supported=1;
|
|
121 return "msvidc32.dll";
|
|
122
|
1
|
123 //*** Only 16bit .DLL available (can't load under linux) ***
|
|
124 // case mmioFOURCC('V', 'C', 'R', '1'):
|
|
125 // printf("Video in ATI VCR1 format\n");
|
|
126 // return "ativcr1.dll";
|
|
127
|
|
128 case mmioFOURCC('V', 'C', 'R', '2'):
|
|
129 printf("Video in ATI VCR2 format\n");
|
|
130 avi_header.yuv_supported=1;
|
|
131 return "ativcr2.dll";
|
|
132
|
|
133 case mmioFOURCC('A', 'S', 'V', '1'):
|
|
134 printf("Asus ASV-1 format\n");
|
|
135 // avi_header.yuv_supported=1;
|
|
136 return "asusasvd.dll";
|
|
137
|
|
138 case mmioFOURCC('A', 'S', 'V', '2'):
|
|
139 printf("Asus ASV-2 format\n");
|
|
140 // avi_header.yuv_supported=1;
|
|
141 avi_header.flipped=1;
|
|
142 // avi_header.bih.biCompression=mmioFOURCC('A', 'S', 'V', '1');
|
|
143 // return "asusasvd.dll";
|
|
144 return "asusasv2.dll";
|
|
145
|
|
146 case mmioFOURCC('I', '2', '6', '3'):
|
|
147 case mmioFOURCC('i', '2', '6', '3'):
|
|
148 printf("Video in I263 format\n");
|
|
149 return "i263_32.drv";
|
|
150
|
|
151 case mmioFOURCC('M', 'J', 'P', 'G'):
|
|
152 printf("Video in MJPEG format\n");
|
|
153 avi_header.yuv_supported=1;
|
129
|
154 // return "M3JPEG32.dll";
|
|
155 return "mcmjpg32.dll";
|
1
|
156 // return "m3jpeg32.dll";
|
|
157 // return "libavi_mjpeg.so";
|
190
|
158
|
|
159 case mmioFOURCC('W', 'M', 'V', '1'):
|
|
160 printf("Video in Windows Media Video 1 format\n");
|
|
161 avi_header.yuv_supported=1;
|
|
162 avi_header.vids_guid=&wmv1_clsid;
|
|
163 return "wmvds32.ax";
|
|
164
|
|
165
|
1
|
166 }
|
|
167 printf("UNKNOWN video codec: %.4s (0x%0X)\n",&fccHandler,fccHandler);
|
|
168 printf("If you know this video format and codec, you can edit codecs.c in the source!\n");
|
|
169 printf("Please contact the author, send this movie to be supported by future version.\n");
|
|
170 return NULL;
|
|
171 }
|
|
172
|
|
173 char* get_auds_codec_name(){
|
|
174 int id=((WAVEFORMATEX*)avi_header.wf_ext)->wFormatTag;
|
175
|
175 avi_header.auds_guid=NULL;
|
1
|
176 switch (id){
|
|
177 case 0x161://DivX audio
|
|
178 // ((WAVEFORMATEX*)avi_header.wf_ext)->wFormatTag=0x160; //hack
|
|
179 case 0x160://DivX audio
|
|
180 avi_header.audio_seekable=0;
|
|
181 return "divxa32.acm"; // tested, OK.
|
|
182 case 0x2://MS ADPCM
|
|
183 avi_header.audio_seekable=0;
|
|
184 return "msadp32.acm"; // tested, OK.
|
|
185 case 0x55://MPEG l3
|
|
186 avi_header.audio_seekable=1;
|
|
187 return "l3codeca.acm"; // tested, OK. faster than mp3lib on intel
|
|
188 case 0x11://IMA ADPCM
|
|
189 return "imaadp32.acm"; // segfault :(
|
|
190 case 0x31://MS GSM
|
|
191 case 0x32://MS GSM
|
|
192 return "msgsm32.acm"; // segfault :( - not req. has internal now!
|
|
193 case 0x75://VoxWare
|
190
|
194 avi_header.auds_guid=&CLSID_Voxware;
|
|
195 return "voxmsdec.ax";
|
1
|
196 // case 0x06://???
|
|
197 // return "lhacm.acm";
|
|
198 // return "msg711.acm";
|
|
199 // return "tssoft32.acm";
|
|
200 }
|
|
201 printf("UNKNOWN audio codec: 0x%0X\n",id);
|
|
202 printf("If you know this audio format and codec, you can edit codecs.c in the source!\n");
|
|
203 printf("Please contact the author, send this movie to be supported by future version.\n");
|
|
204 return NULL;
|
|
205 }
|
|
206
|