diff options
author | Edward Hervey <edward@centricular.com> | 2021-07-14 07:58:01 +0200 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2021-07-21 14:33:19 +0000 |
commit | 8817b08d5e36b4f2a4c12eaf74db0f6d6725a81b (patch) | |
tree | 24bb5706a2b8f3b283954040f177bdea4f60c1d8 /gst | |
parent | f502ef9053c5de5b6e24d6eb0dee912fe163f763 (diff) | |
download | gstreamer-plugins-bad-8817b08d5e36b4f2a4c12eaf74db0f6d6725a81b.tar.gz |
mxfaes-bwf: Handle new custom-constant-sized variant
Defined by Amendment 2:2013 to SMPTE ST 382:2007
Also define a new "UNKNOWN" wrapping type to make the difference with known
wrapping types
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
Diffstat (limited to 'gst')
-rw-r--r-- | gst/mxf/mxfaes-bwf.c | 15 | ||||
-rw-r--r-- | gst/mxf/mxfessence.h | 3 |
2 files changed, 13 insertions, 5 deletions
diff --git a/gst/mxf/mxfaes-bwf.c b/gst/mxf/mxfaes-bwf.c index d128ab270..f0cd37c1e 100644 --- a/gst/mxf/mxfaes-bwf.c +++ b/gst/mxf/mxfaes-bwf.c @@ -1122,7 +1122,8 @@ mxf_is_aes_bwf_essence_track (const MXFMetadataTimelineTrack * track) (key->u[14] == 0x01 || key->u[14] == 0x02 || key->u[14] == 0x03 || - key->u[14] == 0x04 || key->u[14] == 0x08 || key->u[14] == 0x09)) + key->u[14] == 0x04 || key->u[14] == 0x08 || key->u[14] == 0x09 || + key->u[14] == 0x0a || key->u[14] == 0x0b)) return TRUE; } @@ -1160,8 +1161,12 @@ mxf_aes_bwf_get_track_wrapping (const MXFMetadataTimelineTrack * track) break; case 0x08: case 0x09: - default: + case 0x0a: + case 0x0b: return MXF_ESSENCE_WRAPPING_CUSTOM_WRAPPING; + default: + GST_WARNING ("Unknown frame wrapping"); + return MXF_ESSENCE_WRAPPING_UNKNOWN_WRAPPING; break; } } @@ -1437,7 +1442,8 @@ mxf_aes_bwf_create_caps (MXFMetadataTimelineTrack * track, GstTagList ** tags, descriptor[i]) && (track->parent.descriptor[i]->essence_container.u[14] == 0x01 || track->parent.descriptor[i]->essence_container.u[14] == 0x02 - || track->parent.descriptor[i]->essence_container.u[14] == 0x08)) { + || track->parent.descriptor[i]->essence_container.u[14] == 0x08 + || track->parent.descriptor[i]->essence_container.u[14] == 0x0a)) { s = (MXFMetadataGenericSoundEssenceDescriptor *) track->parent. descriptor[i]; bwf = TRUE; @@ -1447,7 +1453,8 @@ mxf_aes_bwf_create_caps (MXFMetadataTimelineTrack * track, GstTagList ** tags, descriptor[i]) && (track->parent.descriptor[i]->essence_container.u[14] == 0x03 || track->parent.descriptor[i]->essence_container.u[14] == 0x04 - || track->parent.descriptor[i]->essence_container.u[14] == 0x09)) { + || track->parent.descriptor[i]->essence_container.u[14] == 0x09 + || track->parent.descriptor[i]->essence_container.u[14] == 0x0b)) { s = (MXFMetadataGenericSoundEssenceDescriptor *) track->parent. descriptor[i]; diff --git a/gst/mxf/mxfessence.h b/gst/mxf/mxfessence.h index 57a57a3b2..e32515165 100644 --- a/gst/mxf/mxfessence.h +++ b/gst/mxf/mxfessence.h @@ -29,7 +29,8 @@ typedef enum { MXF_ESSENCE_WRAPPING_FRAME_WRAPPING, MXF_ESSENCE_WRAPPING_CLIP_WRAPPING, - MXF_ESSENCE_WRAPPING_CUSTOM_WRAPPING + MXF_ESSENCE_WRAPPING_CUSTOM_WRAPPING, + MXF_ESSENCE_WRAPPING_UNKNOWN_WRAPPING } MXFEssenceWrapping; typedef GstFlowReturn (*MXFEssenceElementHandleFunc) (const MXFUL *key, GstBuffer *buffer, GstCaps *caps, MXFMetadataTimelineTrack *track, gpointer mapping_data, GstBuffer **outbuf); |