From 7a30947913c215baabaa0ae1b93b9582f82d3cd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 16 Apr 2009 22:14:15 +0200 Subject: mxf: Properly handle the new interlaced support from libgstvideo for (de)muxing --- gst/mxf/mxfmetadata.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gst/mxf/mxfmetadata.c b/gst/mxf/mxfmetadata.c index 057a99d9..2237bc60 100644 --- a/gst/mxf/mxfmetadata.c +++ b/gst/mxf/mxfmetadata.c @@ -4929,8 +4929,10 @@ void mxf_metadata_generic_picture_essence_descriptor_set_caps * See SMPTE 377M E2.2 and E1.2 */ if (self->frame_layout == 1 || self->frame_layout == 2 - || self->frame_layout == 4) + || self->frame_layout == 4) { height *= 2; + gst_caps_set_simple (caps, "interlaced", G_TYPE_BOOLEAN, TRUE, NULL); + } if (width == 0 || height == 0) { GST_ERROR ("Invalid width/height"); @@ -4973,6 +4975,7 @@ gboolean gint fps_n, fps_d; MXFMetadataFileDescriptor *f = (MXFMetadataFileDescriptor *) self; GstStructure *s; + gboolean interlaced; g_return_val_if_fail (MXF_IS_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (self), FALSE); @@ -4980,6 +4983,11 @@ gboolean s = gst_caps_get_structure (caps, 0); + if (!gst_structure_get_boolean (s, "interlaced", &interlaced) || !interlaced) + self->frame_layout = 1; + else + self->frame_layout = 3; + if (!gst_structure_get_fraction (s, "framerate", &fps_n, &fps_d)) { GST_ERROR ("Invalid framerate"); return FALSE; -- cgit v1.2.1