diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2008-12-22 20:56:10 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2008-12-22 20:56:10 +0000 |
commit | 9488ef376435486d8e9bcaceb3046cb302396b3a (patch) | |
tree | fa259b6cf5a4064e1979514855fca3142887e7b1 /gst | |
parent | 2169215a12b9fb7bb13d9d66141e140b97115515 (diff) | |
download | gst-plugins-bad-9488ef376435486d8e9bcaceb3046cb302396b3a.tar.gz gst-plugins-bad-9488ef376435486d8e9bcaceb3046cb302396b3a.tar.bz2 gst-plugins-bad-9488ef376435486d8e9bcaceb3046cb302396b3a.zip |
gst/mxf/mxfmpeg.c: Add initial support for h.264 video (SMPTE RP2008).
Original commit message from CVS:
* gst/mxf/mxfmpeg.c: (mxf_mpeg_es_create_caps),
(mxf_mpeg_create_caps):
Add initial support for h.264 video (SMPTE RP2008).
Diffstat (limited to 'gst')
-rw-r--r-- | gst/mxf/mxfmpeg.c | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/gst/mxf/mxfmpeg.c b/gst/mxf/mxfmpeg.c index c8ac23ca..a836d7d0 100644 --- a/gst/mxf/mxfmpeg.c +++ b/gst/mxf/mxfmpeg.c @@ -386,6 +386,12 @@ mxf_mpeg_es_create_caps (MXFMetadataTimelineTrack * track, GstTagList ** tags, gst_buffer_unref (codec_data); } codec_name = "MPEG-4 Video"; + } else if ((p->picture_essence_coding.u[13] >> 4) == 0x03) { + /* RP 2008 */ + + /* TODO: What about codec_data for AVC1 streams? */ + caps = gst_caps_new_simple ("video/x-h264", NULL); + codec_name = "h.264 Video"; } else { GST_ERROR ("Unsupported MPEG picture essence coding 0x%02x", p->picture_essence_coding.u[13]); @@ -472,17 +478,17 @@ mxf_mpeg_create_caps (MXFMetadataTimelineTrack * track, GstTagList ** tags, if (!track->parent.descriptor[i]) continue; - if (MXF_IS_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (track->parent. - descriptor[i])) { + if (MXF_IS_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (track-> + parent.descriptor[i])) { f = track->parent.descriptor[i]; - p = (MXFMetadataGenericPictureEssenceDescriptor *) track-> - parent.descriptor[i]; + p = (MXFMetadataGenericPictureEssenceDescriptor *) track->parent. + descriptor[i]; break; - } else if (MXF_IS_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR (track->parent. - descriptor[i])) { + } else if (MXF_IS_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR (track-> + parent.descriptor[i])) { f = track->parent.descriptor[i]; - s = (MXFMetadataGenericSoundEssenceDescriptor *) track-> - parent.descriptor[i]; + s = (MXFMetadataGenericSoundEssenceDescriptor *) track->parent. + descriptor[i]; break; } } @@ -518,9 +524,28 @@ mxf_mpeg_create_caps (MXFMetadataTimelineTrack * track, GstTagList ** tags, *tags = gst_tag_list_new (); gst_tag_list_add (*tags, GST_TAG_MERGE_APPEND, GST_TAG_VIDEO_CODEC, "MPEG TS", NULL); + } else if (f->essence_container.u[13] == 0x0f) { + GST_DEBUG ("Found h264 NAL unit stream"); + /* RP 2008 */ + /* TODO: What about codec_data? */ + caps = gst_caps_new_simple ("video/x-h264", NULL); + + if (!*tags) + *tags = gst_tag_list_new (); + gst_tag_list_add (*tags, GST_TAG_MERGE_APPEND, GST_TAG_VIDEO_CODEC, + "h.264 Video", NULL); + } else if (f->essence_container.u[13] == 0x10) { + GST_DEBUG ("Found h264 byte stream stream"); + /* RP 2008 */ + caps = gst_caps_new_simple ("video/x-h264", NULL); + + if (!*tags) + *tags = gst_tag_list_new (); + gst_tag_list_add (*tags, GST_TAG_MERGE_APPEND, GST_TAG_VIDEO_CODEC, + "h.264 Video", NULL); } - if (p) + if (p && caps) mxf_metadata_generic_picture_essence_descriptor_set_caps (p, caps); return caps; |