summaryrefslogtreecommitdiff
path: root/gst-libs/gst/vaapi/gstvaapiencoder.c
diff options
context:
space:
mode:
authorHe Junyan <junyan.he@hotmail.com>2019-09-24 01:01:22 +0800
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2019-12-20 05:01:07 +0000
commita6289308ee6f992fe6530cae3c6592a7a0b12ba3 (patch)
treea0aee68c7882fd1c85d037f18a9d1fee4c925425 /gst-libs/gst/vaapi/gstvaapiencoder.c
parent61de88e58030e245b596fd10af422615c08cb9a3 (diff)
libs: context: port to a plain C structure
The GstVaapiMiniObject is obsolete and we need to replace it. This patch turns GstVaapiContext into a plain C structure with its own reference counting mechanism. Also this patch removes unused overlays attributes. Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Diffstat (limited to 'gst-libs/gst/vaapi/gstvaapiencoder.c')
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder.c b/gst-libs/gst/vaapi/gstvaapiencoder.c
index 815660b5..2d29d04d 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder.c
@@ -1345,7 +1345,8 @@ gst_vaapi_encoder_finalize (GObject * object)
{
GstVaapiEncoder *encoder = GST_VAAPI_ENCODER (object);
- gst_vaapi_object_replace (&encoder->context, NULL);
+ gst_vaapi_context_unref (encoder->context);
+ encoder->context = NULL;
gst_vaapi_display_replace (&encoder->display, NULL);
encoder->va_display = NULL;
@@ -1485,7 +1486,7 @@ create_test_context_config (GstVaapiEncoder * encoder, GstVaapiProfile profile)
GstVaapiContext *ctxt;
if (encoder->context)
- return gst_vaapi_object_ref (encoder->context);
+ return gst_vaapi_context_ref (encoder->context);
/* if there is no profile, let's figure out one */
if (profile == GST_VAAPI_PROFILE_UNKNOWN)
@@ -1506,7 +1507,7 @@ get_profile_surface_formats (GstVaapiEncoder * encoder, GstVaapiProfile profile)
if (!ctxt)
return NULL;
formats = gst_vaapi_context_get_surface_formats (ctxt);
- gst_vaapi_object_unref (ctxt);
+ gst_vaapi_context_unref (ctxt);
return formats;
}