summaryrefslogtreecommitdiffstats
path: root/gst/mxf/mxfvc3.c
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-02-07 10:38:26 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-02-07 10:38:26 +0100
commit8dc9f2ea4d01ebefa87b77b879d577b5bed115eb (patch)
tree0b299de8ef4e525d221d5ef8c708ccdc1d5991c7 /gst/mxf/mxfvc3.c
parent3c3dff6869a3f3ffdf327e004977fa39594dd2c2 (diff)
downloadgst-plugins-bad-8dc9f2ea4d01ebefa87b77b879d577b5bed115eb.tar.gz
gst-plugins-bad-8dc9f2ea4d01ebefa87b77b879d577b5bed115eb.tar.bz2
gst-plugins-bad-8dc9f2ea4d01ebefa87b77b879d577b5bed115eb.zip
mxfdemux: Add support for non-standard Avid MXF files containing DNxHD essence
Avid uses a custom essence container UL and custom essence element keys that are fortunately compatible with the generic container essence elements. Partially fixes bug #561922.
Diffstat (limited to 'gst/mxf/mxfvc3.c')
-rw-r--r--gst/mxf/mxfvc3.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/gst/mxf/mxfvc3.c b/gst/mxf/mxfvc3.c
index 497355ef..e0f9b804 100644
--- a/gst/mxf/mxfvc3.c
+++ b/gst/mxf/mxfvc3.c
@@ -33,6 +33,11 @@
GST_DEBUG_CATEGORY_EXTERN (mxf_debug);
#define GST_CAT_DEFAULT mxf_debug
+static const guint8 picture_essence_coding_vc3_avid[] = {
+ 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01, 0x0e, 0x04, 0x02, 0x01, 0x02,
+ 0x04, 0x01, 0x00
+};
+
static gboolean
mxf_is_vc3_essence_track (const MXFMetadataTimelineTrack * track)
{
@@ -54,8 +59,19 @@ mxf_is_vc3_essence_track (const MXFMetadataTimelineTrack * track)
/* SMPTE S2019-4 7 */
if (mxf_is_generic_container_essence_container_label (key) &&
key->u[12] == 0x02 && key->u[13] == 0x11 &&
- (key->u[14] == 0x01 || key->u[14] == 0x02))
+ (key->u[14] == 0x01 || key->u[14] == 0x02)) {
return TRUE;
+ } else if (mxf_is_avid_essence_container_label (key)) {
+ MXFMetadataGenericPictureEssenceDescriptor *p;
+
+ if (!MXF_IS_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (d))
+ return FALSE;
+ p = MXF_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (d);
+
+ key = &p->picture_essence_coding;
+ if (memcmp (key, picture_essence_coding_vc3_avid, 16) == 0)
+ return TRUE;
+ }
}
return FALSE;