Mercurial > mplayer.hg
annotate libmpcodecs/ve_qtvideo.c @ 32334:541a774ce8e4
Drop removal of AAC encoder from list of FFmpeg encoders.
The original reason to drop this particular encoder, that it
failed to build on many platforms, should no longer be the case.
author | diego |
---|---|
date | Fri, 01 Oct 2010 16:04:43 +0000 |
parents | c08363dc5320 |
children | e1027d24244b |
rev | line source |
---|---|
28111
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
1 /* |
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
2 * QT video encoder using Win32 libs |
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
3 * |
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
4 * Copyright (C) 2002 Sascha Sommer |
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
5 * |
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
6 * This file is part of MPlayer. |
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
7 * |
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
8 * MPlayer is free software; you can redistribute it and/or modify |
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
9 * it under the terms of the GNU General Public License as published by |
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
10 * the Free Software Foundation; either version 2 of the License, or |
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
11 * (at your option) any later version. |
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
12 * |
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
13 * MPlayer is distributed in the hope that it will be useful, |
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
16 * GNU General Public License for more details. |
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
17 * |
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
18 * You should have received a copy of the GNU General Public License along |
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
19 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
9920b9c138f6
Replace informal GPL notices by standard GPL headers.
diego
parents:
26754
diff
changeset
|
21 */ |
8471 | 22 |
23 #define MAX_IDSIZE 0x6F | |
24 | |
25 #include <stdio.h> | |
26 #include <stdlib.h> | |
27 #include <string.h> | |
28 | |
17012 | 29 #include "config.h" |
30 #include "mp_msg.h" | |
21507
fa99b3d31d13
Hack around libavutil/bswap.h compilation problems due to always_inline undefined.
reimar
parents:
21372
diff
changeset
|
31 #include "mpbswap.h" |
8471 | 32 |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28111
diff
changeset
|
33 #ifdef WIN32_LOADER |
22577
a033e5519802
Include loader/ prefix in #include path everywhere.
diego
parents:
21660
diff
changeset
|
34 #include "loader/ldt_keeper.h" |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28111
diff
changeset
|
35 #endif |
9217
420e2b2f8e5a
compiler warning fixes patch by Dominik Mierzejewski <dominik@rangers.eu.org>
arpi
parents:
9014
diff
changeset
|
36 |
17012 | 37 #include "loader/qtx/qtxsdk/components.h" |
31348
8df8a7c20f46
Replace forward declarations by proper loader/wine/winbase.h #include.
diego
parents:
30812
diff
changeset
|
38 #include "loader/wine/winbase.h" |
22577
a033e5519802
Include loader/ prefix in #include path everywhere.
diego
parents:
21660
diff
changeset
|
39 #include "loader/wine/windef.h" |
8471 | 40 |
41 #include "codec-cfg.h" | |
22600
3c2b4a866c6a
Add explicit location for headers from the stream/ directory.
diego
parents:
22577
diff
changeset
|
42 #include "stream/stream.h" |
22601
ed8f90096c65
Add explicit location for headers from the libmpdemux/ directory.
diego
parents:
22600
diff
changeset
|
43 #include "libmpdemux/demuxer.h" |
ed8f90096c65
Add explicit location for headers from the libmpdemux/ directory.
diego
parents:
22600
diff
changeset
|
44 #include "libmpdemux/stheader.h" |
8471 | 45 |
22600
3c2b4a866c6a
Add explicit location for headers from the stream/ directory.
diego
parents:
22577
diff
changeset
|
46 #include "stream/stream.h" |
22601
ed8f90096c65
Add explicit location for headers from the libmpdemux/ directory.
diego
parents:
22600
diff
changeset
|
47 #include "libmpdemux/muxer.h" |
8471 | 48 |
49 #include "img_format.h" | |
50 #include "mp_image.h" | |
51 #include "vf.h" | |
52 | |
31348
8df8a7c20f46
Replace forward declarations by proper loader/wine/winbase.h #include.
diego
parents:
30812
diff
changeset
|
53 |
14528
860f06087aac
preload quicktime.qts, this allows us to ignore the hardcoded path inside the dlls so that quicktime.qts doesn't need to be in the windows system dir, patch by Gianluigi Tiesi <mplayer at netfarm.it>, comments by myself
faust3
parents:
13188
diff
changeset
|
54 static HINSTANCE qtime_qts; //handle to preloaded quicktime.qts |
8471 | 55 static HMODULE handler; |
56 | |
57 static OSErr (*FindCodec)(CodecType cType, | |
58 CodecComponent specCodec, | |
59 CompressorComponent * compressor, | |
60 DecompressorComponent * decompressor); | |
61 static OSErr (*InitializeQTML)(long flags); | |
62 static PixMapHandle (*GetGWorldPixMap)(GWorldPtr offscreenGWorld); | |
63 static OSErr (*QTNewGWorldFromPtr)(GWorldPtr *gw, | |
64 OSType pixelFormat, | |
65 const Rect *boundsRect, | |
66 CTabHandle cTable, | |
67 /*GDHandle*/void* aGDevice, /*unused anyway*/ | |
68 GWorldFlags flags, | |
69 void *baseAddr, | |
70 long rowBytes); | |
30812 | 71 static Handle (*NewHandleClear)(Size byteCount); |
8471 | 72 static OSErr (*CompressSequenceBegin) ( |
73 ImageSequence *seqID, | |
74 PixMapHandle src, | |
75 PixMapHandle prev, | |
76 const Rect *srcRect, | |
77 const Rect *prevRect, | |
78 short colorDepth, | |
79 CodecType cType, | |
80 CompressorComponent codec, | |
81 CodecQ spatialQuality, | |
82 CodecQ temporalQuality, | |
83 long keyFrameRate, | |
84 CTabHandle ctable, | |
85 CodecFlags flags, | |
86 ImageDescriptionHandle desc ); | |
87 | |
88 static OSErr (*CompressSequenceFrame) ( | |
89 ImageSequence seqID, | |
90 PixMapHandle src, | |
91 const Rect *srcRect, | |
92 CodecFlags flags, | |
93 Ptr data, | |
94 long *dataSize, | |
95 UInt8 *similarity, | |
96 ICMCompletionProcRecordPtr asyncCompletionProc ); | |
97 | |
98 static OSErr (*GetMaxCompressionSize)(PixMapHandle src, | |
99 const Rect *srcRect, | |
100 short colorDepth, | |
101 CodecQ quality, | |
102 CodecType cType, | |
103 CompressorComponent codec, | |
104 long *size ); | |
105 static OSErr (*CDSequenceEnd)( ImageSequence seqID ); | |
106 static Component (*FindNextComponent)(Component prev,ComponentDescription* desc); | |
107 static long (*CountComponents)(ComponentDescription* desc); | |
108 static OSErr (*GetComponentInfo)(Component prev,ComponentDescription* desc,Handle h1,Handle h2,Handle h3); | |
109 | |
110 | |
111 | |
112 //static int format=mmioFOURCC('S','V','Q','1'); | |
113 static int format=mmioFOURCC('S','V','Q','3'); | |
114 | |
115 | |
116 | |
117 //static void *frame_in; //input frame | |
118 static void *frame_prev; //previous frame | |
119 static void *frame_comp; //compressed frame | |
120 static GWorldPtr frame_GWorld_in = NULL;//a GWorld is some kind of description for a drawing environment | |
121 static GWorldPtr frame_GWorld_prev = NULL; | |
122 static Rect FrameRect; | |
123 | |
124 static CompressorComponent compressor; | |
125 static ImageDescriptionHandle desc; | |
126 static ImageSequence seq; | |
127 | |
128 | |
129 | |
130 | |
131 | |
132 struct vf_priv_s { | |
8585 | 133 muxer_stream_t* mux; |
8471 | 134 //dv_encoder_t* enc; |
135 | |
136 }; | |
137 #define mux_v (vf->priv->mux) | |
138 | |
139 //===========================================================================// | |
140 | |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
29263
diff
changeset
|
141 static int config(struct vf_instance *vf, |
8471 | 142 int width, int height, int d_width, int d_height, |
143 unsigned int flags, unsigned int outfmt){ | |
24125 | 144 // OSErr cres; |
8471 | 145 ComponentDescription cdesc; |
146 mux_v->bih->biWidth=width; | |
147 mux_v->bih->biHeight=height; | |
148 mux_v->bih->biSizeImage=width*height*2; | |
12061 | 149 mux_v->aspect = (float)d_width/d_height; |
8471 | 150 |
151 | |
152 | |
15274
d42539110db9
typo, memset 0 was done on desc instead of cdesc, see bug #288
reimar
parents:
15212
diff
changeset
|
153 memset(&cdesc,0,sizeof(cdesc)); |
8471 | 154 cdesc.componentType= (((unsigned char)'i')<<24)| |
155 (((unsigned char)'m')<<16)| | |
156 (((unsigned char)'c')<<8)| | |
157 (((unsigned char)'o')); | |
158 | |
159 cdesc.componentSubType=bswap_32(format); | |
160 cdesc.componentManufacturer=0; | |
161 cdesc.componentFlags=0; | |
162 cdesc.componentFlagsMask=0; | |
163 | |
164 | |
17366 | 165 mp_msg(MSGT_MENCODER,MSGL_DBG2,"Count = %ld\n",CountComponents(&cdesc)); |
8471 | 166 compressor=FindNextComponent(NULL,&cdesc); |
167 if(!compressor){ | |
12195
96b366ed15ad
printf -> mp_msg; print error msg when qtmlClient.dll is missing
faust3
parents:
12061
diff
changeset
|
168 mp_msg(MSGT_MENCODER,MSGL_ERR,"Cannot find requested component\n"); |
26754
63630c09e237
cosmetics: Remove pointless parentheses from return calls.
diego
parents:
26280
diff
changeset
|
169 return 0; |
8471 | 170 } |
17366 | 171 mp_msg(MSGT_MENCODER,MSGL_DBG2,"Found it! ID = %p\n",compressor); |
8471 | 172 |
173 // cres= FindCodec (fourcc,anyCodec,&compressor,&decompressor ); | |
174 // printf("FindCodec returned:%i compressor: 0x%X decompressor: 0x%X\n",cres&0xFFFF,compressor,decompressor); | |
175 | |
176 return 1; | |
177 } | |
178 | |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
29263
diff
changeset
|
179 static int control(struct vf_instance *vf, int request, void* data){ |
8471 | 180 |
181 return CONTROL_UNKNOWN; | |
182 } | |
183 | |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
29263
diff
changeset
|
184 static int query_format(struct vf_instance *vf, unsigned int fmt){ |
15212
05aa13cdf92f
replace VO and VF numeric flags with #defined identifiers
henry
parents:
14878
diff
changeset
|
185 if(fmt==IMGFMT_YUY2) return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW; |
8471 | 186 return 0; |
187 } | |
188 | |
25962 | 189 static int codec_initialized = 0; |
8471 | 190 |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
29263
diff
changeset
|
191 static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ |
8471 | 192 |
193 OSErr cres; | |
194 long framesizemax; | |
8511 | 195 UInt8 similarity=0; |
8471 | 196 long compressedsize; |
13188 | 197 OSType in_format=kYUVSPixelFormat; |
8471 | 198 int width = mpi->width; |
199 int height = mpi->height; | |
200 int stride = width*2; | |
25962 | 201 if(!codec_initialized){ |
8471 | 202 FrameRect.top=0; |
203 FrameRect.left=0; | |
204 FrameRect.right=width; | |
205 FrameRect.bottom=height; | |
206 cres = QTNewGWorldFromPtr( | |
207 &frame_GWorld_in, | |
208 in_format, | |
209 &FrameRect, | |
210 0, | |
211 0, | |
212 0, | |
213 mpi->planes[0], | |
214 stride); | |
12195
96b366ed15ad
printf -> mp_msg; print error msg when qtmlClient.dll is missing
faust3
parents:
12061
diff
changeset
|
215 mp_msg(MSGT_MENCODER,MSGL_DBG2,"NewGWorldFromPtr returned:%i\n",cres&0xFFFF); |
8471 | 216 //dunno what todo about this |
217 frame_prev = malloc(stride * height); | |
218 cres = QTNewGWorldFromPtr( | |
219 &frame_GWorld_prev, | |
220 in_format, | |
221 &FrameRect, | |
222 0, | |
223 0, | |
224 0, | |
225 frame_prev, | |
226 stride); | |
12195
96b366ed15ad
printf -> mp_msg; print error msg when qtmlClient.dll is missing
faust3
parents:
12061
diff
changeset
|
227 mp_msg(MSGT_MENCODER,MSGL_DBG2,"height:%i width:%i stride:%i\n",height,width,stride); |
96b366ed15ad
printf -> mp_msg; print error msg when qtmlClient.dll is missing
faust3
parents:
12061
diff
changeset
|
228 mp_msg(MSGT_MENCODER,MSGL_DBG2,"NewGWorldFromPtr returned:%i\n",cres&0xFFFF); |
8471 | 229 cres= GetMaxCompressionSize ( |
230 GetGWorldPixMap(frame_GWorld_in), | |
231 &FrameRect, | |
232 24, | |
233 codecNormalQuality, | |
234 bswap_32(format), | |
235 compressor, | |
236 &framesizemax ); | |
17366 | 237 mp_msg(MSGT_MENCODER,MSGL_DBG2,"GetMaxCompressionSize returned:%i : MaxSize:%li\n",cres&0xFFFF,framesizemax); |
8471 | 238 frame_comp=malloc(framesizemax); |
8511 | 239 |
8471 | 240 desc = (ImageDescriptionHandle)NewHandleClear(MAX_IDSIZE); //memory where the desc will be stored |
241 (*desc)->idSize=MAX_IDSIZE; | |
242 | |
243 cres= CompressSequenceBegin ( | |
244 &seq, | |
245 GetGWorldPixMap( frame_GWorld_in), | |
246 GetGWorldPixMap( frame_GWorld_prev), | |
247 &FrameRect, | |
248 &FrameRect, | |
249 24, // color depth | |
250 bswap_32(format), // fourcc | |
251 compressor, // codec component | |
252 codecNormalQuality, //codecNormalQuality, | |
253 codecMaxQuality, //codecNormalQuality, | |
8511 | 254 10*30, // keyframe rate |
8471 | 255 0, |
256 0, | |
257 desc); | |
12195
96b366ed15ad
printf -> mp_msg; print error msg when qtmlClient.dll is missing
faust3
parents:
12061
diff
changeset
|
258 mp_msg(MSGT_MENCODER,MSGL_DBG2,"CompressSequenceBegin returned:%i\n",cres&0xFFFF); |
96b366ed15ad
printf -> mp_msg; print error msg when qtmlClient.dll is missing
faust3
parents:
12061
diff
changeset
|
259 mp_msg(MSGT_MENCODER,MSGL_DBG2,"Sequence ID:%i\n",seq); |
8471 | 260 |
261 dump_ImageDescription(*desc); | |
25962 | 262 codec_initialized++; |
8471 | 263 } |
264 cres = CompressSequenceFrame ( | |
265 seq, | |
266 GetGWorldPixMap(frame_GWorld_in), | |
267 &FrameRect, | |
268 0, | |
269 (char*)mux_v->buffer, | |
270 &compressedsize, | |
271 &similarity, | |
272 0); | |
273 | |
12195
96b366ed15ad
printf -> mp_msg; print error msg when qtmlClient.dll is missing
faust3
parents:
12061
diff
changeset
|
274 if(cres&0xFFFF)mp_msg(MSGT_MENCODER,MSGL_DBG2,"CompressSequenceFrame returned:%i\n",cres&0xFFFF); |
8511 | 275 #if 0 |
8471 | 276 printf("Size %i->%i \n",stride*height,compressedsize); |
277 printf("Ratio: %i:1\n",(stride*height)/compressedsize); | |
278 #endif | |
17487
fa17424b4c7b
change muxer_write_chunk() so that pts/dts _could_ be passed from encoder to muxer
michael
parents:
17366
diff
changeset
|
279 muxer_write_chunk(mux_v, compressedsize , similarity?0:0x10, MP_NOPTS_VALUE, MP_NOPTS_VALUE); |
8471 | 280 |
281 if(((*desc)->idSize)>MAX_IDSIZE){ | |
12195
96b366ed15ad
printf -> mp_msg; print error msg when qtmlClient.dll is missing
faust3
parents:
12061
diff
changeset
|
282 mp_msg(MSGT_MENCODER,MSGL_ERR,"FATAL! idSize=%d too big, increase MAX_IDSIZE in ve_qtvideo.c!\n",((*desc)->idSize)); |
8471 | 283 } else { |
284 // according to QT docs, imagedescription may be changed while encoding | |
285 // a frame (even its size may (and does!) change!) | |
286 memcpy(mux_v->bih+1,*desc,(*desc)->idSize); | |
287 } | |
288 | |
289 return 1; | |
290 } | |
291 | |
292 //===========================================================================// | |
293 | |
294 static int vf_open(vf_instance_t *vf, char* args){ | |
295 OSErr cres = 1; | |
296 vf->config=config; | |
14878 | 297 vf->default_caps=VFCAP_CONSTANT; |
8471 | 298 vf->control=control; |
299 vf->query_format=query_format; | |
300 vf->put_image=put_image; | |
301 vf->priv=malloc(sizeof(struct vf_priv_s)); | |
302 memset(vf->priv,0,sizeof(struct vf_priv_s)); | |
8585 | 303 vf->priv->mux=(muxer_stream_t*)args; |
8471 | 304 |
32105 | 305 mux_v->bih=calloc(1, sizeof(*mux_v->bih)+MAX_IDSIZE); |
306 mux_v->bih->biSize=sizeof(*mux_v->bih)+MAX_IDSIZE; | |
8471 | 307 mux_v->bih->biWidth=0; |
308 mux_v->bih->biHeight=0; | |
309 mux_v->bih->biCompression=format; | |
310 mux_v->bih->biPlanes=1; | |
311 mux_v->bih->biBitCount=24; | |
312 | |
313 | |
9435 | 314 #ifdef WIN32_LOADER |
8471 | 315 Setup_LDT_Keeper(); |
9435 | 316 #endif |
14528
860f06087aac
preload quicktime.qts, this allows us to ignore the hardcoded path inside the dlls so that quicktime.qts doesn't need to be in the windows system dir, patch by Gianluigi Tiesi <mplayer at netfarm.it>, comments by myself
faust3
parents:
13188
diff
changeset
|
317 //preload quicktime.qts to avoid the problems caused by the hardcoded path inside the dll |
860f06087aac
preload quicktime.qts, this allows us to ignore the hardcoded path inside the dlls so that quicktime.qts doesn't need to be in the windows system dir, patch by Gianluigi Tiesi <mplayer at netfarm.it>, comments by myself
faust3
parents:
13188
diff
changeset
|
318 qtime_qts = LoadLibraryA("QuickTime.qts"); |
860f06087aac
preload quicktime.qts, this allows us to ignore the hardcoded path inside the dlls so that quicktime.qts doesn't need to be in the windows system dir, patch by Gianluigi Tiesi <mplayer at netfarm.it>, comments by myself
faust3
parents:
13188
diff
changeset
|
319 if(!qtime_qts){ |
860f06087aac
preload quicktime.qts, this allows us to ignore the hardcoded path inside the dlls so that quicktime.qts doesn't need to be in the windows system dir, patch by Gianluigi Tiesi <mplayer at netfarm.it>, comments by myself
faust3
parents:
13188
diff
changeset
|
320 mp_msg(MSGT_MENCODER,MSGL_ERR,"unable to load QuickTime.qts\n" ); |
860f06087aac
preload quicktime.qts, this allows us to ignore the hardcoded path inside the dlls so that quicktime.qts doesn't need to be in the windows system dir, patch by Gianluigi Tiesi <mplayer at netfarm.it>, comments by myself
faust3
parents:
13188
diff
changeset
|
321 return 0; |
860f06087aac
preload quicktime.qts, this allows us to ignore the hardcoded path inside the dlls so that quicktime.qts doesn't need to be in the windows system dir, patch by Gianluigi Tiesi <mplayer at netfarm.it>, comments by myself
faust3
parents:
13188
diff
changeset
|
322 } |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28111
diff
changeset
|
323 |
8471 | 324 handler = LoadLibraryA("qtmlClient.dll"); |
12195
96b366ed15ad
printf -> mp_msg; print error msg when qtmlClient.dll is missing
faust3
parents:
12061
diff
changeset
|
325 if(!handler){ |
96b366ed15ad
printf -> mp_msg; print error msg when qtmlClient.dll is missing
faust3
parents:
12061
diff
changeset
|
326 mp_msg(MSGT_MENCODER,MSGL_ERR,"unable to load qtmlClient.dll\n"); |
96b366ed15ad
printf -> mp_msg; print error msg when qtmlClient.dll is missing
faust3
parents:
12061
diff
changeset
|
327 return 0; |
96b366ed15ad
printf -> mp_msg; print error msg when qtmlClient.dll is missing
faust3
parents:
12061
diff
changeset
|
328 } |
8733
478561617705
compiler warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
arpi
parents:
8585
diff
changeset
|
329 InitializeQTML = (OSErr (*)(long))GetProcAddress(handler, "InitializeQTML"); |
478561617705
compiler warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
arpi
parents:
8585
diff
changeset
|
330 GetGWorldPixMap = (PixMapHandle (*)(GWorldPtr))GetProcAddress(handler, "GetGWorldPixMap"); |
478561617705
compiler warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
arpi
parents:
8585
diff
changeset
|
331 QTNewGWorldFromPtr = (OSErr(*)(GWorldPtr *,OSType,const Rect *,CTabHandle,void*,GWorldFlags,void *,long))GetProcAddress(handler, "QTNewGWorldFromPtr"); |
478561617705
compiler warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
arpi
parents:
8585
diff
changeset
|
332 NewHandleClear = (OSErr(*)(Size))GetProcAddress(handler, "NewHandleClear"); |
478561617705
compiler warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
arpi
parents:
8585
diff
changeset
|
333 FindCodec = (OSErr (*)(CodecType,CodecComponent,CompressorComponent *,DecompressorComponent *))GetProcAddress(handler,"FindCodec"); |
478561617705
compiler warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
arpi
parents:
8585
diff
changeset
|
334 CompressSequenceBegin = (OSErr(*)(ImageSequence *,PixMapHandle,PixMapHandle,const Rect *,const Rect *,short,CodecType,CompressorComponent,CodecQ,CodecQ,long,CTabHandle,CodecFlags,ImageDescriptionHandle))GetProcAddress(handler,"CompressSequenceBegin"); |
478561617705
compiler warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
arpi
parents:
8585
diff
changeset
|
335 CompressSequenceFrame = (OSErr(*)(ImageSequence,PixMapHandle,const Rect *,CodecFlags,Ptr,long *,UInt8 *,ICMCompletionProcRecordPtr))GetProcAddress(handler,"CompressSequenceFrame"); |
478561617705
compiler warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
arpi
parents:
8585
diff
changeset
|
336 GetMaxCompressionSize = (OSErr(*)(PixMapHandle,const Rect *,short,CodecQ,CodecType,CompressorComponent,long *))GetProcAddress(handler,"GetMaxCompressionSize"); |
478561617705
compiler warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
arpi
parents:
8585
diff
changeset
|
337 CDSequenceEnd = (OSErr (*)(ImageSequence))GetProcAddress(handler,"CDSequenceEnd"); |
478561617705
compiler warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
arpi
parents:
8585
diff
changeset
|
338 FindNextComponent = (Component (*)(Component,ComponentDescription*))GetProcAddress(handler, "FindNextComponent"); |
478561617705
compiler warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
arpi
parents:
8585
diff
changeset
|
339 CountComponents = (long (*)(ComponentDescription*))GetProcAddress(handler, "CountComponents"); |
478561617705
compiler warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
arpi
parents:
8585
diff
changeset
|
340 GetComponentInfo = (OSErr (*)(Component,ComponentDescription*,Handle,Handle,Handle))GetProcAddress(handler, "GetComponentInfo"); |
8471 | 341 if(!InitializeQTML ||!CompressSequenceBegin){ |
12195
96b366ed15ad
printf -> mp_msg; print error msg when qtmlClient.dll is missing
faust3
parents:
12061
diff
changeset
|
342 mp_msg(MSGT_MENCODER,MSGL_ERR,"invalid qt DLL!\n"); |
8471 | 343 return 0; |
344 } | |
345 //printf("%i,%i,%i\n",mmioFOURCC('S','V','Q','1'),'SVQ1',bswap_32(mmioFOURCC('S','V','Q','1'))); | |
346 cres=InitializeQTML(6+16); | |
12195
96b366ed15ad
printf -> mp_msg; print error msg when qtmlClient.dll is missing
faust3
parents:
12061
diff
changeset
|
347 mp_msg(MSGT_MENCODER,MSGL_DBG2,"InitializeQTML returned %i\n",cres); |
8471 | 348 return 1; |
349 } | |
350 | |
32033 | 351 const vf_info_t ve_info_qtvideo = { |
8471 | 352 "Quicktime video encoder using win32 DLLs", |
353 "qtvideo", | |
354 "Sascha Sommer", | |
355 "for internal use by mencoder", | |
356 vf_open | |
357 }; | |
358 | |
359 //===========================================================================// |