summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-04-16 22:14:15 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-04-16 22:14:15 +0200
commit7a30947913c215baabaa0ae1b93b9582f82d3cd5 (patch)
tree61190764d2556cdd2911849ab217c77a1c8a9c1a
parenta32e180155f2d60f939432950f316558eee62796 (diff)
downloadgst-plugins-bad-7a30947913c215baabaa0ae1b93b9582f82d3cd5.tar.gz
gst-plugins-bad-7a30947913c215baabaa0ae1b93b9582f82d3cd5.tar.bz2
gst-plugins-bad-7a30947913c215baabaa0ae1b93b9582f82d3cd5.zip
mxf: Properly handle the new interlaced support from libgstvideo for (de)muxing
-rw-r--r--gst/mxf/mxfmetadata.c10
1 files changed, 9 insertions, 1 deletions
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;