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

Collapse All | Expand All

(-)gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegcfg.c (+7 lines)
Lines 272-278 gst_ffmpeg_flags_get_type (void) Link Here
272
      {CODEC_FLAG_GRAY, "Only decode/encode grayscale", "gray"},
272
      {CODEC_FLAG_GRAY, "Only decode/encode grayscale", "gray"},
273
      {CODEC_FLAG_NORMALIZE_AQP,
273
      {CODEC_FLAG_NORMALIZE_AQP,
274
          "Normalize Adaptive Quantization (masking, etc)", "aqp"},
274
          "Normalize Adaptive Quantization (masking, etc)", "aqp"},
275
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
275
      {CODEC_FLAG_TRELLIS_QUANT, "Trellis Quantization", "trellis"},
276
      {CODEC_FLAG_TRELLIS_QUANT, "Trellis Quantization", "trellis"},
277
#endif
276
      {CODEC_FLAG_GLOBAL_HEADER,
278
      {CODEC_FLAG_GLOBAL_HEADER,
277
            "Global headers in extradata instead of every keyframe",
279
            "Global headers in extradata instead of every keyframe",
278
          "global-headers"},
280
          "global-headers"},
Lines 669-674 gst_ffmpeg_cfg_init () Link Here
669
      "Prediction Method",
671
      "Prediction Method",
670
      GST_TYPE_FFMPEG_PRED_METHOD, FF_PRED_LEFT, G_PARAM_READWRITE);
672
      GST_TYPE_FFMPEG_PRED_METHOD, FF_PRED_LEFT, G_PARAM_READWRITE);
671
  gst_ffmpeg_add_pspec (pspec, config.prediction_method, FALSE, huffyuv, NULL);
673
  gst_ffmpeg_add_pspec (pspec, config.prediction_method, FALSE, huffyuv, NULL);
674
#if LIBAVCODEC_VERSION_INT >= ((52<<16)+(0<<8)+0)
675
  pspec = g_param_spec_int ("trellis", "Trellis Quantization",
676
      "Trellis RD quantization", 0, 1, 1, G_PARAM_READWRITE);
677
  gst_ffmpeg_add_pspec (pspec, config.trellis, FALSE, mpeg, NULL);
678
#endif
672
}
679
}
673
680
674
/* ==== END CONFIGURATION SECTION ==== */
681
/* ==== END CONFIGURATION SECTION ==== */
(-)gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegcodecmap.c (+40 lines)
Lines 332-338 gst_ffmpeg_codecid_to_caps (enum CodecID Link Here
332
          NULL);
332
          NULL);
333
      if (context) {
333
      if (context) {
334
        gst_caps_set_simple (caps,
334
        gst_caps_set_simple (caps,
335
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
335
            "depth", G_TYPE_INT, context->bits_per_sample, NULL);
336
            "depth", G_TYPE_INT, context->bits_per_sample, NULL);
337
#else
338
            "depth", G_TYPE_INT, context->bits_per_coded_sample, NULL);
339
#endif
336
      }
340
      }
337
      break;
341
      break;
338
342
Lines 511-517 gst_ffmpeg_codecid_to_caps (enum CodecID Link Here
511
      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-huffyuv", NULL);
515
      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-huffyuv", NULL);
512
      if (context) {
516
      if (context) {
513
        gst_caps_set_simple (caps,
517
        gst_caps_set_simple (caps,
518
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
514
            "bpp", G_TYPE_INT, context->bits_per_sample, NULL);
519
            "bpp", G_TYPE_INT, context->bits_per_sample, NULL);
520
#else
521
            "bpp", G_TYPE_INT, context->bits_per_coded_sample, NULL);
522
#endif
515
      }
523
      }
516
      break;
524
      break;
517
525
Lines 627-633 gst_ffmpeg_codecid_to_caps (enum CodecID Link Here
627
          "layout", G_TYPE_STRING, "microsoft", NULL);
635
          "layout", G_TYPE_STRING, "microsoft", NULL);
628
      if (context) {
636
      if (context) {
629
        gst_caps_set_simple (caps,
637
        gst_caps_set_simple (caps,
638
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
630
            "depth", G_TYPE_INT, (gint) context->bits_per_sample, NULL);
639
            "depth", G_TYPE_INT, (gint) context->bits_per_sample, NULL);
640
#else
641
            "depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
642
#endif
631
      } else {
643
      } else {
632
        gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 1, 64, NULL);
644
        gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 1, 64, NULL);
633
      }
645
      }
Lines 638-644 gst_ffmpeg_codecid_to_caps (enum CodecID Link Here
638
          "layout", G_TYPE_STRING, "quicktime", NULL);
650
          "layout", G_TYPE_STRING, "quicktime", NULL);
639
      if (context) {
651
      if (context) {
640
        gst_caps_set_simple (caps,
652
        gst_caps_set_simple (caps,
653
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
641
            "depth", G_TYPE_INT, (gint) context->bits_per_sample, NULL);
654
            "depth", G_TYPE_INT, (gint) context->bits_per_sample, NULL);
655
#else
656
            "depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
657
#endif
642
      } else {
658
      } else {
643
        gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 1, 64, NULL);
659
        gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 1, 64, NULL);
644
      }
660
      }
Lines 688-694 gst_ffmpeg_codecid_to_caps (enum CodecID Link Here
688
      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-camtasia", NULL);
704
      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-camtasia", NULL);
689
      if (context) {
705
      if (context) {
690
        gst_caps_set_simple (caps,
706
        gst_caps_set_simple (caps,
707
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
691
            "depth", G_TYPE_INT, (gint) context->bits_per_sample, NULL);
708
            "depth", G_TYPE_INT, (gint) context->bits_per_sample, NULL);
709
#else
710
            "depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
711
#endif
692
      } else {
712
      } else {
693
        gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 8, 32, NULL);
713
        gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 8, 32, NULL);
694
      }
714
      }
Lines 1026-1032 gst_ffmpeg_codecid_to_caps (enum CodecID Link Here
1026
      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-alac", NULL);
1046
      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-alac", NULL);
1027
      if (context) {
1047
      if (context) {
1028
        gst_caps_set_simple (caps,
1048
        gst_caps_set_simple (caps,
1049
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
1029
            "samplesize", G_TYPE_INT, context->bits_per_sample, NULL);
1050
            "samplesize", G_TYPE_INT, context->bits_per_sample, NULL);
1051
#else
1052
            "samplesize", G_TYPE_INT, context->bits_per_coded_sample, NULL);
1053
#endif
1030
      }
1054
      }
1031
      break;
1055
      break;
1032
1056
Lines 1049-1055 gst_ffmpeg_codecid_to_caps (enum CodecID Link Here
1049
      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-tta", NULL);
1073
      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-tta", NULL);
1050
      if (context) {
1074
      if (context) {
1051
        gst_caps_set_simple (caps,
1075
        gst_caps_set_simple (caps,
1076
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
1052
            "samplesize", G_TYPE_INT, context->bits_per_sample, NULL);
1077
            "samplesize", G_TYPE_INT, context->bits_per_sample, NULL);
1078
#else
1079
            "samplesize", G_TYPE_INT, context->bits_per_coded_sample, NULL);
1080
#endif
1053
      }
1081
      }
1054
      break;
1082
      break;
1055
    case CODEC_ID_VORBIS:
1083
    case CODEC_ID_VORBIS:
Lines 1416-1422 gst_ffmpeg_caps_to_pixfmt (const GstCaps Link Here
1416
1444
1417
  gst_structure_get_int (structure, "width", &context->width);
1445
  gst_structure_get_int (structure, "width", &context->width);
1418
  gst_structure_get_int (structure, "height", &context->height);
1446
  gst_structure_get_int (structure, "height", &context->height);
1447
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
1419
  gst_structure_get_int (structure, "bpp", &context->bits_per_sample);
1448
  gst_structure_get_int (structure, "bpp", &context->bits_per_sample);
1449
#else
1450
  gst_structure_get_int (structure, "bpp", &context->bits_per_coded_sample);
1451
#endif
1420
1452
1421
  fps = gst_structure_get_value (structure, "framerate");
1453
  fps = gst_structure_get_value (structure, "framerate");
1422
  if (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps)) {
1454
  if (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps)) {
Lines 1647-1653 gst_ffmpeg_caps_with_codecid (enum Codec Link Here
1647
      gint depth;
1679
      gint depth;
1648
1680
1649
      if (gst_structure_get_int (str, "depth", &depth)) {
1681
      if (gst_structure_get_int (str, "depth", &depth)) {
1682
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
1650
        context->bits_per_sample = depth;
1683
        context->bits_per_sample = depth;
1684
#else
1685
        context->bits_per_coded_sample = depth;
1686
#endif
1651
      } else {
1687
      } else {
1652
        GST_WARNING ("No depth field in caps %" GST_PTR_FORMAT, caps);
1688
        GST_WARNING ("No depth field in caps %" GST_PTR_FORMAT, caps);
1653
      }
1689
      }
Lines 1680-1686 gst_ffmpeg_caps_with_codecid (enum Codec Link Here
1680
        context->bit_rate = bitrate;
1716
        context->bit_rate = bitrate;
1681
    }
1717
    }
1682
    case CODEC_ID_ALAC:
1718
    case CODEC_ID_ALAC:
1719
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
1683
      gst_structure_get_int (str, "samplesize", &context->bits_per_sample);
1720
      gst_structure_get_int (str, "samplesize", &context->bits_per_sample);
1721
#else
1722
      gst_structure_get_int (str, "samplesize", &context->bits_per_coded_sample);
1723
#endif
1684
      break;
1724
      break;
1685
1725
1686
    case CODEC_ID_DVVIDEO:
1726
    case CODEC_ID_DVVIDEO:
(-)gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegdec.c (-2 / +6 lines)
Lines 696-702 gst_ffmpegdec_setcaps (GstPad * pad, Gst Link Here
696
696
697
  /* workaround encoder bugs */
697
  /* workaround encoder bugs */
698
  ffmpegdec->context->workaround_bugs |= FF_BUG_AUTODETECT;
698
  ffmpegdec->context->workaround_bugs |= FF_BUG_AUTODETECT;
699
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
699
  ffmpegdec->context->error_resilience = 1;
700
  ffmpegdec->context->error_resilience = 1;
701
#else
702
  ffmpegdec->context->error_recognition = 1;
703
#endif
700
704
701
  /* for slow cpus */
705
  /* for slow cpus */
702
  ffmpegdec->context->lowres = ffmpegdec->lowres;
706
  ffmpegdec->context->lowres = ffmpegdec->lowres;
Lines 2423-2429 gst_ffmpegdec_register (GstPlugin * plug Link Here
2423
  AVCodec *in_plugin;
2427
  AVCodec *in_plugin;
2424
  gint rank;
2428
  gint rank;
2425
2429
2426
  in_plugin = first_avcodec;
2430
  in_plugin = av_codec_next(NULL);
2427
2431
2428
  GST_LOG ("Registering decoders");
2432
  GST_LOG ("Registering decoders");
2429
2433
Lines 2545-2551 gst_ffmpegdec_register (GstPlugin * plug Link Here
2545
      gst_caps_unref (sinkcaps);
2549
      gst_caps_unref (sinkcaps);
2546
    if (srccaps)
2550
    if (srccaps)
2547
      gst_caps_unref (srccaps);
2551
      gst_caps_unref (srccaps);
2548
    in_plugin = in_plugin->next;
2552
    in_plugin = av_codec_next(in_plugin);
2549
  }
2553
  }
2550
2554
2551
  GST_LOG ("Finished Registering decoders");
2555
  GST_LOG ("Finished Registering decoders");
(-)gst-ffmpeg-0.10.4/ext/ffmpeg/gstffmpegenc.c (-4 / +6 lines)
Lines 306-313 gst_ffmpegenc_getcaps (GstPad * pad) Link Here
306
  /* set some default properties */
306
  /* set some default properties */
307
  ctx->width = DEFAULT_WIDTH;
307
  ctx->width = DEFAULT_WIDTH;
308
  ctx->height = DEFAULT_HEIGHT;
308
  ctx->height = DEFAULT_HEIGHT;
309
  ctx->time_base.num = DEFAULT_FRAME_RATE_BASE;
309
  ctx->time_base.num = 1;
310
  ctx->time_base.den = 25 * DEFAULT_FRAME_RATE_BASE;
310
  ctx->time_base.den = 25;
311
  ctx->bit_rate = DEFAULT_VIDEO_BITRATE;
311
  ctx->bit_rate = DEFAULT_VIDEO_BITRATE;
312
  /* makes it silent */
312
  /* makes it silent */
313
  ctx->strict_std_compliance = -1;
313
  ctx->strict_std_compliance = -1;
Lines 391-397 gst_ffmpegenc_setcaps (GstPad * pad, Gst Link Here
391
391
392
  /* RTP payload used for GOB production (for Asterisk) */
392
  /* RTP payload used for GOB production (for Asterisk) */
393
  if (ffmpegenc->rtp_payload_size) {
393
  if (ffmpegenc->rtp_payload_size) {
394
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
394
    ffmpegenc->context->rtp_mode = 1;
395
    ffmpegenc->context->rtp_mode = 1;
396
#endif
395
    ffmpegenc->context->rtp_payload_size = ffmpegenc->rtp_payload_size;
397
    ffmpegenc->context->rtp_payload_size = ffmpegenc->rtp_payload_size;
396
  }
398
  }
397
399
Lines 944-956 gst_ffmpegenc_register (GstPlugin * plug Link Here
944
  GType type;
946
  GType type;
945
  AVCodec *in_plugin;
947
  AVCodec *in_plugin;
946
948
947
  in_plugin = first_avcodec;
948
949
949
  GST_LOG ("Registering encoders");
950
  GST_LOG ("Registering encoders");
950
951
951
  /* build global ffmpeg param/property info */
952
  /* build global ffmpeg param/property info */
952
  gst_ffmpeg_cfg_init ();
953
  gst_ffmpeg_cfg_init ();
953
954
955
  in_plugin = av_codec_next(NULL);
954
  while (in_plugin) {
956
  while (in_plugin) {
955
    gchar *type_name;
957
    gchar *type_name;
956
    GstCaps *srccaps = NULL, *sinkcaps = NULL;
958
    GstCaps *srccaps = NULL, *sinkcaps = NULL;
Lines 1027-1033 gst_ffmpegenc_register (GstPlugin * plug Link Here
1027
      gst_caps_unref (sinkcaps);
1029
      gst_caps_unref (sinkcaps);
1028
    if (srccaps)
1030
    if (srccaps)
1029
      gst_caps_unref (srccaps);
1031
      gst_caps_unref (srccaps);
1030
    in_plugin = in_plugin->next;
1032
    in_plugin = av_codec_next(in_plugin);
1031
  }
1033
  }
1032
1034
1033
  GST_LOG ("Finished registering encoders");
1035
  GST_LOG ("Finished registering encoders");

Return to bug 241938