mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 15:18:21 +00:00
jpegparse: pass colorimetry in caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
This commit is contained in:
parent
20b636ee9a
commit
03d51244c0
2 changed files with 10 additions and 0 deletions
|
@ -244,6 +244,9 @@ gst_jpeg_parse_set_sink_caps (GstBaseParse * bparse, GstCaps * caps)
|
|||
parse->field_order = gst_video_field_order_from_string (field_order);
|
||||
}
|
||||
|
||||
g_clear_pointer (&parse->colorimetry, g_free);
|
||||
parse->colorimetry = g_strdup (gst_structure_get_string (s, "colorimetry"));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -723,6 +726,11 @@ gst_jpeg_parse_set_new_caps (GstJpegParse * parse)
|
|||
sampling_to_string (parse->sampling), NULL);
|
||||
}
|
||||
|
||||
if (parse->colorimetry) {
|
||||
gst_caps_set_simple (caps, "colorimetry", G_TYPE_STRING, parse->colorimetry,
|
||||
NULL);
|
||||
}
|
||||
|
||||
gst_caps_set_simple (caps, "interlace-mode", G_TYPE_STRING,
|
||||
gst_video_interlace_mode_to_string (parse->interlace_mode), NULL);
|
||||
|
||||
|
@ -994,6 +1002,7 @@ gst_jpeg_parse_stop (GstBaseParse * bparse)
|
|||
}
|
||||
gst_clear_buffer (&parse->codec_data);
|
||||
gst_clear_caps (&parse->prev_caps);
|
||||
g_clear_pointer (&parse->colorimetry, g_free);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -63,6 +63,7 @@ struct _GstJpegParse {
|
|||
gint orig_width, orig_height;
|
||||
|
||||
GstBuffer *codec_data;
|
||||
char *colorimetry;
|
||||
GstVideoInterlaceMode interlace_mode;
|
||||
GstVideoFieldOrder field_order;
|
||||
guint field;
|
||||
|
|
Loading…
Reference in a new issue