1
|
1 //#define ANGELPOTION
|
|
2
|
|
3 char* get_vids_codec_name(){
|
|
4 // unsigned long fccHandler=avi_header.video.fccHandler;
|
|
5 unsigned long fccHandler=avi_header.bih.biCompression;
|
|
6 avi_header.yuv_supported=0;
|
|
7 avi_header.yuv_hack_needed=0;
|
|
8 avi_header.flipped=0;
|
|
9 switch(fccHandler){
|
|
10 case mmioFOURCC('M', 'P', 'G', '4'):
|
|
11 case mmioFOURCC('m', 'p', 'g', '4'):
|
|
12 case mmioFOURCC('M', 'P', '4', '2'):
|
|
13 case mmioFOURCC('m', 'p', '4', '2'):
|
|
14 // case mmioFOURCC('M', 'P', '4', '3'):
|
|
15 // case mmioFOURCC('m', 'p', '4', '3'):
|
|
16 printf("Video in Microsoft MPEG-4 format\n");
|
|
17 avi_header.yuv_supported=1;
|
|
18 avi_header.yuv_hack_needed=1;
|
|
19 #ifdef ANGELPOTION
|
|
20 return "APmpg4v1.dll";
|
|
21 #endif
|
|
22 return "mpg4c32.dll";
|
|
23 case mmioFOURCC('M', 'P', '4', '3'):
|
|
24 case mmioFOURCC('m', 'p', '4', '3'):
|
|
25 printf("Video in MPEG-4 v3 (really DivX) format\n");
|
|
26 avi_header.bih.biCompression=mmioFOURCC('d', 'i', 'v', '3'); // hack
|
|
27 avi_header.yuv_supported=1;
|
|
28 avi_header.yuv_hack_needed=1;
|
|
29 #ifdef ANGELPOTION
|
|
30 return "APmpg4v1.dll";
|
|
31 #endif
|
|
32 return "divxc32.dll";
|
|
33
|
|
34 case mmioFOURCC('D', 'I', 'V', 'X'):
|
|
35 case mmioFOURCC('d', 'i', 'v', 'x'):
|
|
36 return "DivX.dll";
|
|
37
|
|
38 case mmioFOURCC('D', 'I', 'V', '3'):
|
|
39 case mmioFOURCC('d', 'i', 'v', '3'):
|
|
40 case mmioFOURCC('D', 'I', 'V', '4'):
|
|
41 case mmioFOURCC('d', 'i', 'v', '4'):
|
|
42 case mmioFOURCC('M', 'P', '4', '1'):
|
|
43 case mmioFOURCC('m', 'p', '4', '1'):
|
|
44 printf("Video in DivX ;-) format\n");
|
|
45 avi_header.yuv_supported=1;
|
|
46 avi_header.yuv_hack_needed=1;
|
|
47 #ifdef ANGELPOTION
|
|
48 return "APmpg4v1.dll";
|
|
49 #endif
|
|
50 return "divxc32.dll";
|
|
51
|
|
52 case mmioFOURCC('I', 'V', '5', '0'):
|
|
53 case mmioFOURCC('i', 'v', '5', '0'):
|
|
54 printf("Video in Indeo Video 5 format\n");
|
|
55 avi_header.yuv_supported=1; // YUV pic is upside-down :(
|
|
56 return "ir50_32.dll";
|
|
57
|
|
58 case mmioFOURCC('I', 'V', '4', '1'):
|
|
59 case mmioFOURCC('i', 'v', '4', '1'):
|
|
60 printf("Video in Indeo Video 4.1 format\n");
|
|
61 avi_header.flipped=1;
|
|
62 avi_header.no_32bpp_support=1;
|
|
63 return "ir41_32.dll";
|
|
64
|
|
65 case mmioFOURCC('I', 'V', '3', '2'):
|
|
66 case mmioFOURCC('i', 'v', '3', '2'):
|
|
67 printf("Video in Indeo Video 3.2 format\n");
|
|
68 avi_header.flipped=1;
|
|
69 avi_header.no_32bpp_support=1;
|
|
70 return "ir32_32.dll";
|
|
71
|
|
72 case mmioFOURCC('c', 'v', 'i', 'd'):
|
|
73 printf("Video in Cinepak format\n");
|
|
74 avi_header.yuv_supported=1;
|
|
75 return "iccvid.dll";
|
|
76
|
|
77 //*** Only 16bit .DLL available (can't load under linux) ***
|
|
78 // case mmioFOURCC('V', 'C', 'R', '1'):
|
|
79 // printf("Video in ATI VCR1 format\n");
|
|
80 // return "ativcr1.dll";
|
|
81
|
|
82 case mmioFOURCC('V', 'C', 'R', '2'):
|
|
83 printf("Video in ATI VCR2 format\n");
|
|
84 avi_header.yuv_supported=1;
|
|
85 return "ativcr2.dll";
|
|
86
|
|
87 case mmioFOURCC('A', 'S', 'V', '1'):
|
|
88 printf("Asus ASV-1 format\n");
|
|
89 // avi_header.yuv_supported=1;
|
|
90 return "asusasvd.dll";
|
|
91
|
|
92 case mmioFOURCC('A', 'S', 'V', '2'):
|
|
93 printf("Asus ASV-2 format\n");
|
|
94 // avi_header.yuv_supported=1;
|
|
95 avi_header.flipped=1;
|
|
96 // avi_header.bih.biCompression=mmioFOURCC('A', 'S', 'V', '1');
|
|
97 // return "asusasvd.dll";
|
|
98 return "asusasv2.dll";
|
|
99
|
|
100 case mmioFOURCC('I', '2', '6', '3'):
|
|
101 case mmioFOURCC('i', '2', '6', '3'):
|
|
102 printf("Video in I263 format\n");
|
|
103 return "i263_32.drv";
|
|
104
|
|
105 case mmioFOURCC('M', 'J', 'P', 'G'):
|
|
106 printf("Video in MJPEG format\n");
|
|
107 avi_header.yuv_supported=1;
|
|
108 return "M3JPEG32.dll";
|
|
109 // return "mcmjpg32.dll";
|
|
110 // return "m3jpeg32.dll";
|
|
111 // return "libavi_mjpeg.so";
|
|
112 }
|
|
113 printf("UNKNOWN video codec: %.4s (0x%0X)\n",&fccHandler,fccHandler);
|
|
114 printf("If you know this video format and codec, you can edit codecs.c in the source!\n");
|
|
115 printf("Please contact the author, send this movie to be supported by future version.\n");
|
|
116 return NULL;
|
|
117 }
|
|
118
|
|
119 char* get_auds_codec_name(){
|
|
120 int id=((WAVEFORMATEX*)avi_header.wf_ext)->wFormatTag;
|
|
121 switch (id){
|
|
122 case 0x161://DivX audio
|
|
123 // ((WAVEFORMATEX*)avi_header.wf_ext)->wFormatTag=0x160; //hack
|
|
124 case 0x160://DivX audio
|
|
125 avi_header.audio_seekable=0;
|
|
126 return "divxa32.acm"; // tested, OK.
|
|
127 case 0x2://MS ADPCM
|
|
128 avi_header.audio_seekable=0;
|
|
129 return "msadp32.acm"; // tested, OK.
|
|
130 case 0x55://MPEG l3
|
|
131 avi_header.audio_seekable=1;
|
|
132 return "l3codeca.acm"; // tested, OK. faster than mp3lib on intel
|
|
133 case 0x11://IMA ADPCM
|
|
134 return "imaadp32.acm"; // segfault :(
|
|
135 case 0x31://MS GSM
|
|
136 case 0x32://MS GSM
|
|
137 return "msgsm32.acm"; // segfault :( - not req. has internal now!
|
|
138 case 0x75://VoxWare
|
|
139 return "voxmsdec.ax"; // directshow, not yet supported just a try
|
|
140 // case 0x06://???
|
|
141 // return "lhacm.acm";
|
|
142 // return "msg711.acm";
|
|
143 // return "tssoft32.acm";
|
|
144 }
|
|
145 printf("UNKNOWN audio codec: 0x%0X\n",id);
|
|
146 printf("If you know this audio format and codec, you can edit codecs.c in the source!\n");
|
|
147 printf("Please contact the author, send this movie to be supported by future version.\n");
|
|
148 return NULL;
|
|
149 }
|
|
150
|