2 * Copyright (C) 2021 Collabora Ltd.
3 * Author: Nicolas Dufresne <nicolas.dufresne@collabora.com>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef __GST_VIDEO_CODEC_ALPHA_META_H__
22 #define __GST_VIDEO_CODEC_ALPHA_META_H__
25 #include <gst/video/video.h>
30 * GST_VIDEO_CODEC_ALPHA_META_API_TYPE:
34 #define GST_VIDEO_CODEC_ALPHA_META_API_TYPE (gst_video_codec_alpha_meta_api_get_type())
37 * GST_VIDEO_CODEC_ALPHA_META_INFO:
41 #define GST_VIDEO_CODEC_ALPHA_META_INFO (gst_video_codec_alpha_meta_get_info())
43 typedef struct _GstVideoCodecAlphaMeta GstVideoCodecAlphaMeta;
46 * GstVideoCodecAlphaMeta:
47 * @meta: parent #GstMeta
48 * @buffer: the encoded alpha frame
50 * Encapsulate an extra frame containing the encoded alpha channel for the
51 * currently negotiated CODEC. The streams must be of the same dimention as
56 struct _GstVideoCodecAlphaMeta
64 GType gst_video_codec_alpha_meta_api_get_type (void);
67 const GstMetaInfo *gst_video_codec_alpha_meta_get_info (void);
70 * gst_buffer_get_video_codec_alpha_meta:
71 * @b: A #GstBuffer pointer, must be writable.
73 * Helper macro to get #GstVideoCodecAlphaMeta from an existing #GstBuffer.
75 * Returns: (nullable): the #GstVideoCodecAlphaMeta pointer, or %NULL if none.
79 #define gst_buffer_get_video_codec_alpha_meta(b) \
80 ((GstVideoCodecAlphaMeta *)gst_buffer_get_meta((b),GST_VIDEO_CODEC_ALPHA_META_API_TYPE))
83 GstVideoCodecAlphaMeta *gst_buffer_add_video_codec_alpha_meta (GstBuffer * buffer,
84 GstBuffer * alpha_buffer);
88 #endif /* __GST_VIDEO_CODEC_ALPHA_META_H__ */