mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
applemedia: add support for MPEG-2 decoding
This commit is contained in:
parent
5e09d61638
commit
9645d1df2d
2 changed files with 5 additions and 0 deletions
|
@ -50,6 +50,7 @@ enum _VTStatus
|
||||||
enum _VTFormat
|
enum _VTFormat
|
||||||
{
|
{
|
||||||
kVTFormatH264 = 'avc1',
|
kVTFormatH264 = 'avc1',
|
||||||
|
kVTFormatMPEG2 = 'mp2v',
|
||||||
kVTFormatJPEG = 'jpeg'
|
kVTFormatJPEG = 'jpeg'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -96,6 +96,9 @@ gst_vtdec_base_init (GstVTDecClass * klass)
|
||||||
if (codec_details->format_id == kVTFormatH264) {
|
if (codec_details->format_id == kVTFormatH264) {
|
||||||
gst_structure_set (gst_caps_get_structure (sink_caps, 0),
|
gst_structure_set (gst_caps_get_structure (sink_caps, 0),
|
||||||
"stream-format", G_TYPE_STRING, "avc", NULL);
|
"stream-format", G_TYPE_STRING, "avc", NULL);
|
||||||
|
} else if (codec_details->format_id == kVTFormatMPEG2) {
|
||||||
|
gst_structure_set (gst_caps_get_structure (sink_caps, 0),
|
||||||
|
"mpegversion", G_TYPE_INT, 2, NULL);
|
||||||
}
|
}
|
||||||
sink_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
|
sink_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
|
||||||
sink_caps);
|
sink_caps);
|
||||||
|
@ -587,6 +590,7 @@ gst_vtdec_register (GstPlugin * plugin,
|
||||||
|
|
||||||
static const GstVTDecoderDetails gst_vtdec_codecs[] = {
|
static const GstVTDecoderDetails gst_vtdec_codecs[] = {
|
||||||
{"H.264", "h264", "video/x-h264", kVTFormatH264},
|
{"H.264", "h264", "video/x-h264", kVTFormatH264},
|
||||||
|
{"MPEG-2", "mpeg2", "video/mpeg", kVTFormatMPEG2},
|
||||||
{"JPEG", "jpeg", "image/jpeg", kVTFormatJPEG}
|
{"JPEG", "jpeg", "image/jpeg", kVTFormatJPEG}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue