mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 03:29:50 +00:00
glcolorconvert: Keep colorimetry and chroma-site fields if passthrough
https://bugzilla.gnome.org/show_bug.cgi?id=748141
This commit is contained in:
parent
5fbc9bd5e0
commit
4e05044734
1 changed files with 25 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue