Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 368783 | Differences between
and this patch

Collapse All | Expand All

(-)opal-3.6.8/plugins/configure.ac (-3 / +3 lines)
Lines 237-245 PKG_CHECK_MODULES([LIBAVCODEC], Link Here
237
                                         HAVE_H264_DECODER=yes
237
                                         HAVE_H264_DECODER=yes
238
                                         ;;
238
                                         ;;
239
                                     * ) 
239
                                     * ) 
240
                                         AC_CHECK_LIB(avcodec, h263p_encoder, [HAVE_H263P=yes], [HAVE_H263P=no])
240
                                         OPAL_CODEC_CHECK(HAVE_H263P, encoder, CODEC_ID_H263P)
241
                                         AC_CHECK_LIB(avcodec, mpeg4_encoder, [HAVE_MPEG4=yes], [HAVE_MPEG4=no])
241
                                         OPAL_CODEC_CHECK(HAVE_MPEG4, encoder, CODEC_ID_MPEG4)
242
                                         AC_CHECK_LIB(avcodec, h264_decoder, [HAVE_H264_DECODER=yes], [HAVE_H264_DECODER=no])
242
                                         OPAL_CODEC_CHECK(HAVE_H264_DECODER, decoder, CODEC_ID_H264)
243
                                         ;;
243
                                         ;;
244
                   esac
244
                   esac
245
                   AC_SUBST(HAVE_H263P)
245
                   AC_SUBST(HAVE_H263P)
(-)opal-3.6.8/plugins/video/common/dyna.cxx (-50 / +7 lines)
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) {
(-)opal-3.6.8/plugins/video/common/dyna.h (-7 / +1 lines)
Lines 187-200 class FFMPEGLibrary Link Here
187
    char _codecString [32];
187
    char _codecString [32];
188
188
189
    void (*Favcodec_init)(void);
189
    void (*Favcodec_init)(void);
190
    AVCodec *Favcodec_h263_encoder;
191
    AVCodec *Favcodec_h263p_encoder;
192
    AVCodec *Favcodec_h263_decoder;
193
    AVCodec *Favcodec_h264_decoder;
194
    AVCodec *mpeg4_encoder;
195
    AVCodec *mpeg4_decoder;
196
190
197
    void (*Favcodec_register)(AVCodec *format);
191
    void (*Favcodec_register_all)(void);
198
    AVCodec *(*Favcodec_find_encoder)(enum CodecID id);
192
    AVCodec *(*Favcodec_find_encoder)(enum CodecID id);
199
    AVCodec *(*Favcodec_find_decoder)(enum CodecID id);
193
    AVCodec *(*Favcodec_find_decoder)(enum CodecID id);
200
    AVCodecContext *(*Favcodec_alloc_context)(void);
194
    AVCodecContext *(*Favcodec_alloc_context)(void);
(-)opal-3.6.8/opal.m4 (+23 lines)
Lines 1055-1057 AC_DEFUN([OPAL_DETERMINE_ILBC], Link Here
1055
					OPAL_MSG_CHECK([System iLBC], [$has_ilbc])
1055
					OPAL_MSG_CHECK([System iLBC], [$has_ilbc])
1056
				fi
1056
				fi
1057
      ])
1057
      ])
1058
1059
dnl OPAL_CODEC_CHECK
1060
dnl check for a codec presence in ffmpeg
1061
dnl Arguments: $1 name of configure option
1062
dnl 	       $2 'encode' or 'decode'
1063
dnl 	       $3 name of codec to check for (define in ffmpeg)
1064
AC_DEFUN([OPAL_CODEC_CHECK],
1065
	 [
1066
	  AC_MSG_CHECKING(checking for codec $3 in libavcodec)
1067
	  AC_LANG([C])
1068
	  LIBS=-lavcodec
1069
	  AC_RUN_IFELSE(
1070
	    [AC_LANG_PROGRAM([[
1071
				#include <libavcodec/avcodec.h>
1072
			     ]],
1073
			     [[
1074
			       avcodec_init();
1075
			       avcodec_register_all();
1076
			       return avcodec_find_$2($3) == NULL;
1077
			     ]]
1078
	    )], [$1=yes], [$1=no], [$1=no])
1079
	  AC_MSG_RESULT($$1)
1080
	  ])

Return to bug 368783