mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-18 20:25:25 +00:00
msdk: Update for g_type_class_add_private() deprecation in recent GLib
Untested.
This commit is contained in:
parent
86c1a7b4ad
commit
65c5b9a4f6
2 changed files with 14 additions and 24 deletions
|
@ -40,16 +40,6 @@
|
||||||
GST_DEBUG_CATEGORY_STATIC (gst_debug_msdkbufferpool);
|
GST_DEBUG_CATEGORY_STATIC (gst_debug_msdkbufferpool);
|
||||||
#define GST_CAT_DEFAULT gst_debug_msdkbufferpool
|
#define GST_CAT_DEFAULT gst_debug_msdkbufferpool
|
||||||
|
|
||||||
#define GST_MSDK_BUFFER_POOL_GET_PRIVATE(obj) \
|
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_MSDK_BUFFER_POOL, \
|
|
||||||
GstMsdkBufferPoolPrivate))
|
|
||||||
|
|
||||||
#define gst_msdk_buffer_pool_parent_class parent_class
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GstMsdkBufferPool, gst_msdk_buffer_pool,
|
|
||||||
GST_TYPE_VIDEO_BUFFER_POOL,
|
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_debug_msdkbufferpool, "msdkbufferpool", 0,
|
|
||||||
"MSDK Buffer Pool"));
|
|
||||||
|
|
||||||
typedef enum _GstMsdkMemoryType
|
typedef enum _GstMsdkMemoryType
|
||||||
{
|
{
|
||||||
GST_MSDK_MEMORY_TYPE_SYSTEM,
|
GST_MSDK_MEMORY_TYPE_SYSTEM,
|
||||||
|
@ -66,6 +56,12 @@ struct _GstMsdkBufferPoolPrivate
|
||||||
gboolean add_videometa;
|
gboolean add_videometa;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define gst_msdk_buffer_pool_parent_class parent_class
|
||||||
|
G_DEFINE_TYPE_WITH_CODE (GstMsdkBufferPool, gst_msdk_buffer_pool,
|
||||||
|
GST_TYPE_VIDEO_BUFFER_POOL, G_ADD_PRIVATE (GstMsdkBufferPool)
|
||||||
|
GST_DEBUG_CATEGORY_INIT (gst_debug_msdkbufferpool, "msdkbufferpool", 0,
|
||||||
|
"MSDK Buffer Pool"));
|
||||||
|
|
||||||
static const gchar **
|
static const gchar **
|
||||||
gst_msdk_buffer_pool_get_options (GstBufferPool * pool)
|
gst_msdk_buffer_pool_get_options (GstBufferPool * pool)
|
||||||
{
|
{
|
||||||
|
@ -351,7 +347,7 @@ gst_msdk_buffer_pool_finalize (GObject * object)
|
||||||
static void
|
static void
|
||||||
gst_msdk_buffer_pool_init (GstMsdkBufferPool * pool)
|
gst_msdk_buffer_pool_init (GstMsdkBufferPool * pool)
|
||||||
{
|
{
|
||||||
pool->priv = GST_MSDK_BUFFER_POOL_GET_PRIVATE (pool);
|
pool->priv = gst_msdk_buffer_pool_get_instance_private (pool);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -360,8 +356,6 @@ gst_msdk_buffer_pool_class_init (GstMsdkBufferPoolClass * klass)
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
GstBufferPoolClass *pool_class = GST_BUFFER_POOL_CLASS (klass);
|
GstBufferPoolClass *pool_class = GST_BUFFER_POOL_CLASS (klass);
|
||||||
|
|
||||||
g_type_class_add_private (klass, sizeof (GstMsdkBufferPoolPrivate));
|
|
||||||
|
|
||||||
object_class->finalize = gst_msdk_buffer_pool_finalize;
|
object_class->finalize = gst_msdk_buffer_pool_finalize;
|
||||||
|
|
||||||
pool_class->get_options = gst_msdk_buffer_pool_get_options;
|
pool_class->get_options = gst_msdk_buffer_pool_get_options;
|
||||||
|
|
|
@ -41,15 +41,6 @@
|
||||||
GST_DEBUG_CATEGORY_STATIC (gst_debug_msdkcontext);
|
GST_DEBUG_CATEGORY_STATIC (gst_debug_msdkcontext);
|
||||||
#define GST_CAT_DEFAULT gst_debug_msdkcontext
|
#define GST_CAT_DEFAULT gst_debug_msdkcontext
|
||||||
|
|
||||||
#define GST_MSDK_CONTEXT_GET_PRIVATE(obj) \
|
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_MSDK_CONTEXT, \
|
|
||||||
GstMsdkContextPrivate))
|
|
||||||
|
|
||||||
#define gst_msdk_context_parent_class parent_class
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GstMsdkContext, gst_msdk_context, GST_TYPE_OBJECT,
|
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_debug_msdkcontext, "msdkcontext", 0,
|
|
||||||
"MSDK Context"));
|
|
||||||
|
|
||||||
struct _GstMsdkContextPrivate
|
struct _GstMsdkContextPrivate
|
||||||
{
|
{
|
||||||
mfxSession session;
|
mfxSession session;
|
||||||
|
@ -66,6 +57,12 @@ struct _GstMsdkContextPrivate
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define gst_msdk_context_parent_class parent_class
|
||||||
|
G_DEFINE_TYPE_WITH_CODE (GstMsdkContext, gst_msdk_context, GST_TYPE_OBJECT,
|
||||||
|
G_ADD_PRIVATE (GstMsdkContext)
|
||||||
|
GST_DEBUG_CATEGORY_INIT (gst_debug_msdkcontext, "msdkcontext", 0,
|
||||||
|
"MSDK Context"));
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
|
@ -208,7 +205,7 @@ failed:
|
||||||
static void
|
static void
|
||||||
gst_msdk_context_init (GstMsdkContext * context)
|
gst_msdk_context_init (GstMsdkContext * context)
|
||||||
{
|
{
|
||||||
GstMsdkContextPrivate *priv = GST_MSDK_CONTEXT_GET_PRIVATE (context);
|
GstMsdkContextPrivate *priv = gst_msdk_context_get_instance_private (context);
|
||||||
|
|
||||||
context->priv = priv;
|
context->priv = priv;
|
||||||
|
|
||||||
|
@ -257,7 +254,6 @@ static void
|
||||||
gst_msdk_context_class_init (GstMsdkContextClass * klass)
|
gst_msdk_context_class_init (GstMsdkContextClass * klass)
|
||||||
{
|
{
|
||||||
GObjectClass *const g_object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *const g_object_class = G_OBJECT_CLASS (klass);
|
||||||
g_type_class_add_private (klass, sizeof (GstMsdkContextPrivate));
|
|
||||||
|
|
||||||
g_object_class->finalize = gst_msdk_context_finalize;
|
g_object_class->finalize = gst_msdk_context_finalize;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue