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: |