mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
mxf: Properly handle the new interlaced support from libgstvideo for (de)muxing
This commit is contained in:
parent
a32e180155
commit
7a30947913
1 changed files with 9 additions and 1 deletions
|
@ -4929,8 +4929,10 @@ void mxf_metadata_generic_picture_essence_descriptor_set_caps
|
||||||
* See SMPTE 377M E2.2 and E1.2
|
* See SMPTE 377M E2.2 and E1.2
|
||||||
*/
|
*/
|
||||||
if (self->frame_layout == 1 || self->frame_layout == 2
|
if (self->frame_layout == 1 || self->frame_layout == 2
|
||||||
|| self->frame_layout == 4)
|
|| self->frame_layout == 4) {
|
||||||
height *= 2;
|
height *= 2;
|
||||||
|
gst_caps_set_simple (caps, "interlaced", G_TYPE_BOOLEAN, TRUE, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
if (width == 0 || height == 0) {
|
if (width == 0 || height == 0) {
|
||||||
GST_ERROR ("Invalid width/height");
|
GST_ERROR ("Invalid width/height");
|
||||||
|
@ -4973,6 +4975,7 @@ gboolean
|
||||||
gint fps_n, fps_d;
|
gint fps_n, fps_d;
|
||||||
MXFMetadataFileDescriptor *f = (MXFMetadataFileDescriptor *) self;
|
MXFMetadataFileDescriptor *f = (MXFMetadataFileDescriptor *) self;
|
||||||
GstStructure *s;
|
GstStructure *s;
|
||||||
|
gboolean interlaced;
|
||||||
|
|
||||||
g_return_val_if_fail (MXF_IS_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR
|
g_return_val_if_fail (MXF_IS_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR
|
||||||
(self), FALSE);
|
(self), FALSE);
|
||||||
|
@ -4980,6 +4983,11 @@ gboolean
|
||||||
|
|
||||||
s = gst_caps_get_structure (caps, 0);
|
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)) {
|
if (!gst_structure_get_fraction (s, "framerate", &fps_n, &fps_d)) {
|
||||||
GST_ERROR ("Invalid framerate");
|
GST_ERROR ("Invalid framerate");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in a new issue