diff options
author | Jakub Adam <jakub.adam@collabora.com> | 2021-05-25 21:15:53 +0200 |
---|---|---|
committer | Nicolas Dufresne <nicolas@ndufresne.ca> | 2021-08-17 14:54:06 +0000 |
commit | b3c7b9be49f713c348b5b0b70d55fbb256ecd68e (patch) | |
tree | 1114af5c8b4b430e862445e00e1e25f977cd7c8f | |
parent | a14f4f48c42cf679f7e96a690c393528b20ab4ec (diff) | |
download | gstreamer-plugins-base-b3c7b9be49f713c348b5b0b70d55fbb256ecd68e.tar.gz |
videoutils: add HDR metadata fields to GstVideoCodecState
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1175>
-rw-r--r-- | gst-libs/gst/video/gstvideoutils.c | 4 | ||||
-rw-r--r-- | gst-libs/gst/video/gstvideoutils.h | 24 |
2 files changed, 27 insertions, 1 deletions
diff --git a/gst-libs/gst/video/gstvideoutils.c b/gst-libs/gst/video/gstvideoutils.c index 7e543db35..03dffcd8f 100644 --- a/gst-libs/gst/video/gstvideoutils.c +++ b/gst-libs/gst/video/gstvideoutils.c @@ -171,6 +171,10 @@ _gst_video_codec_state_free (GstVideoCodecState * state) gst_caps_unref (state->allocation_caps); if (state->codec_data) gst_buffer_unref (state->codec_data); + if (state->mastering_display_info) + g_slice_free (GstVideoMasteringDisplayInfo, state->mastering_display_info); + if (state->content_light_level) + g_slice_free (GstVideoContentLightLevel, state->content_light_level); g_slice_free (GstVideoCodecState, state); } diff --git a/gst-libs/gst/video/gstvideoutils.h b/gst-libs/gst/video/gstvideoutils.h index 63338ce45..cbe19f0e6 100644 --- a/gst-libs/gst/video/gstvideoutils.h +++ b/gst-libs/gst/video/gstvideoutils.h @@ -28,6 +28,7 @@ #include <gst/gst.h> #include <gst/video/video-prelude.h> +#include <gst/video/video-hdr.h> G_BEGIN_DECLS #define GST_TYPE_VIDEO_CODEC_STATE \ @@ -47,6 +48,10 @@ typedef struct _GstVideoCodecFrame GstVideoCodecFrame; * 'codec_data' field of a stream, or NULL. * @allocation_caps: The #GstCaps for allocation query and pool * negotiation. Since: 1.10 + * @mastering_display_info: Mastering display color volume information + * (HDR metadata) for the stream. Since: 1.20 + * @content_light_level: Content light level information for the stream. + * Since: 1.20 * * Structure representing the state of an incoming or outgoing video * stream for encoders and decoders. @@ -58,6 +63,20 @@ typedef struct _GstVideoCodecFrame GstVideoCodecFrame; * gst_video_decoder_set_output_state() or * gst_video_encoder_set_output_state() methods. */ +/** + * GstVideoCodecState.mastering_display_info: + * + * Mastering display color volume information (HDR metadata) for the stream. + * + * Since: 1.20 + */ +/** + * GstVideoCodecState.content_light_level: + * + * Content light level information for the stream. + * + * Since: 1.20 + */ struct _GstVideoCodecState { /*< private >*/ @@ -72,8 +91,11 @@ struct _GstVideoCodecState GstCaps *allocation_caps; + GstVideoMasteringDisplayInfo *mastering_display_info; + GstVideoContentLightLevel *content_light_level; + /*< private >*/ - gpointer padding[GST_PADDING_LARGE - 1]; + gpointer padding[GST_PADDING_LARGE - 3]; }; /** |