Commit 76b2cefd authored by Matthieu Bouron's avatar Matthieu Bouron Committed by Sebastian Dröge

glcolorconvert: Keep colorimetry and chroma-site fields if passthrough

https://bugzilla.gnome.org/show_bug.cgi?id=748141
parent 699452ef
......@@ -48,6 +48,8 @@ gst_gl_color_convert_element_prepare_output_buffer (GstBaseTransform * bt,
GstBuffer * inbuf, GstBuffer ** outbuf);
static GstFlowReturn gst_gl_color_convert_element_transform (GstBaseTransform *
bt, GstBuffer * inbuf, GstBuffer * outbuf);
static GstCaps *gst_gl_color_convert_element_fixate_caps (GstBaseTransform *
bt, GstPadDirection direction, GstCaps * caps, GstCaps * othercaps);
static GstStaticPadTemplate gst_gl_color_convert_element_src_pad_template =
GST_STATIC_PAD_TEMPLATE ("src",
......@@ -93,6 +95,7 @@ gst_gl_color_convert_element_class_init (GstGLColorConvertElementClass * klass)
gst_gl_color_convert_element_prepare_output_buffer;
bt_class->transform = gst_gl_color_convert_element_transform;
bt_class->stop = gst_gl_color_convert_element_stop;
bt_class->fixate_caps = gst_gl_color_convert_element_fixate_caps;
bt_class->passthrough_on_same_caps = TRUE;
......@@ -211,3 +214,25 @@ gst_gl_color_convert_element_transform (GstBaseTransform * bt,
{
return GST_FLOW_OK;
}
static GstCaps *
gst_gl_color_convert_element_fixate_caps (GstBaseTransform *
bt, GstPadDirection direction, GstCaps * caps, GstCaps * othercaps)
{
GstCaps *ret;
ret =
GST_BASE_TRANSFORM_CLASS
(gst_gl_color_convert_element_parent_class)->fixate_caps (bt, direction,
caps, othercaps);
if (direction == GST_PAD_SINK) {
GstStructure *in_structure = gst_caps_get_structure (caps, 0);
if (gst_caps_is_subset (caps, ret)) {
gst_caps_replace (&ret, caps);
}
}
return ret;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment