summaryrefslogtreecommitdiff
path: root/gst-libs/gst/vaapi/gstvaapisubpicture.h
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/vaapi/gstvaapisubpicture.h')
-rw-r--r--gst-libs/gst/vaapi/gstvaapisubpicture.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapisubpicture.h b/gst-libs/gst/vaapi/gstvaapisubpicture.h
index 7bfef36e..8c241b29 100644
--- a/gst-libs/gst/vaapi/gstvaapisubpicture.h
+++ b/gst-libs/gst/vaapi/gstvaapisubpicture.h
@@ -52,6 +52,26 @@ typedef enum {
GST_VAAPI_SUBPICTURE_FLAG_GLOBAL_ALPHA = (1 << 1),
} GstVaapiSubpictureFlags;
+#define GST_TYPE_VAAPI_SUBPICTURE (gst_vaapi_subpicture_get_type ())
+
+#define GST_VAAPI_SUBPICTURE_ID(subpicture) (gst_vaapi_subpicture_get_id (subpicture))
+
+GType
+gst_vaapi_subpicture_get_type (void) G_GNUC_CONST;
+
+/**
+ * gst_vaapi_subpicture_unref: (skip)
+ * @subpicture: (transfer full): a #GstVaapiSubpicture.
+ *
+ * Decreases the refcount of the subpicture. If the refcount reaches 0, the
+ * subpicture will be freed.
+ */
+static inline void
+gst_vaapi_subpicture_unref (GstVaapiSubpicture *subpicture)
+{
+ gst_mini_object_unref (GST_MINI_OBJECT_CAST (subpicture));
+}
+
GstVaapiSubpicture *
gst_vaapi_subpicture_new(GstVaapiImage *image, guint flags);
@@ -81,6 +101,8 @@ gboolean
gst_vaapi_subpicture_set_global_alpha(GstVaapiSubpicture *subpicture,
gfloat global_alpha);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVaapiSubpicture, gst_vaapi_subpicture_unref)
+
G_END_DECLS
#endif /* GST_VAAPI_SUBPICTURE_H */