Lines 240-282
bool FFMPEGLibrary::Load(int ver)
Link Here
|
240 |
return false; |
240 |
return false; |
241 |
} |
241 |
} |
242 |
|
242 |
|
243 |
if (_codec==CODEC_ID_H264) { |
243 |
if (!libAvcodec.GetFunction("avcodec_register_all", (DynaLink::Function &)Favcodec_register_all)) { |
244 |
if (!libAvcodec.GetFunction("h264_decoder", (DynaLink::Function &)Favcodec_h264_decoder)) { |
|
|
245 |
TRACE (1, _codecString << "\tDYNA\tFailed to load h264_decoder"); |
246 |
return false; |
247 |
} |
248 |
} |
249 |
|
250 |
if (_codec==CODEC_ID_H263P) { |
251 |
if (!libAvcodec.GetFunction("h263_encoder", (DynaLink::Function &)Favcodec_h263_encoder)) { |
252 |
TRACE (1, _codecString << "\tDYNA\tFailed to load h263_encoder" ); |
253 |
return false; |
254 |
} |
255 |
|
256 |
if (!libAvcodec.GetFunction("h263p_encoder", (DynaLink::Function &)Favcodec_h263p_encoder)) { |
257 |
TRACE (1, _codecString << "\tDYNA\tFailed to load h263p_encoder" ); |
258 |
return false; |
259 |
} |
260 |
|
261 |
if (!libAvcodec.GetFunction("h263_decoder", (DynaLink::Function &)Favcodec_h263_decoder)) { |
262 |
TRACE (1, _codecString << "\tDYNA\tFailed to load h263_decoder" ); |
263 |
return false; |
264 |
} |
265 |
} |
266 |
|
267 |
if (_codec==CODEC_ID_MPEG4) { |
268 |
if (!libAvcodec.GetFunction("mpeg4_encoder", (DynaLink::Function &)mpeg4_encoder)) { |
269 |
TRACE (1, _codecString << "\tDYNA\tFailed to load mpeg4_encoder"); |
270 |
return false; |
271 |
} |
272 |
|
273 |
if (!libAvcodec.GetFunction("mpeg4_decoder", (DynaLink::Function &)mpeg4_decoder)) { |
274 |
TRACE (1, _codecString << "\tDYNA\tFailed to load mpeg4_decoder"); |
275 |
return false; |
276 |
} |
277 |
} |
278 |
|
279 |
if (!libAvcodec.GetFunction("register_avcodec", (DynaLink::Function &)Favcodec_register)) { |
280 |
TRACE (1, _codecString << "\tDYNA\tFailed to load register_avcodec"); |
244 |
TRACE (1, _codecString << "\tDYNA\tFailed to load register_avcodec"); |
281 |
return false; |
245 |
return false; |
282 |
} |
246 |
} |
Lines 370-389
bool FFMPEGLibrary::Load(int ver)
Link Here
|
370 |
} |
334 |
} |
371 |
|
335 |
|
372 |
Favcodec_init(); |
336 |
Favcodec_init(); |
|
|
337 |
Favcodec_register_all(); |
373 |
|
338 |
|
374 |
// register only the codecs needed (to have smaller code) |
339 |
/* check for the codec */ |
375 |
if (_codec==CODEC_ID_H264) |
340 |
if (Favcodec_find_decoder(_codec) == NULL && |
376 |
Favcodec_register(Favcodec_h264_decoder); |
341 |
Favcodec_find_encoder(_codec) == NULL) { |
377 |
|
342 |
TRACE (1, _codecString << "\tDYNA\tFailed to load codec"); |
378 |
if (_codec==CODEC_ID_H263P) { |
343 |
return false; |
379 |
Favcodec_register(Favcodec_h263_encoder); |
|
|
380 |
Favcodec_register(Favcodec_h263p_encoder); |
381 |
Favcodec_register(Favcodec_h263_decoder); |
382 |
} |
383 |
|
384 |
if (_codec==CODEC_ID_MPEG4) { |
385 |
Favcodec_register(mpeg4_encoder); |
386 |
Favcodec_register(mpeg4_decoder); |
387 |
} |
344 |
} |
388 |
|
345 |
|
389 |
if (FFCheckAlignment() != 0) { |
346 |
if (FFCheckAlignment() != 0) { |