diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2019-09-23 19:52:20 +0200 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2019-09-23 19:52:20 +0200 |
commit | 7fb17b1a34da42b7f55e35a4827b5b6729c66761 (patch) | |
tree | 9610db334c89f7f2b88911dfcd0ec8f561bb0bcc | |
parent | ea35de991444fa17899502298ece7102328e8096 (diff) |
libs: encoder: remove gst_vaapi_encoder_{ref,unref}()
Since GstVaapiEncoder is a descendant of of GstObject, there is no
need to keep a custom ref()/unref() methods. This patch deletes them.
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapiencoder.c | 27 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapiencoder.h | 6 | ||||
-rw-r--r-- | tests/simple-encoder.c | 2 | ||||
-rw-r--r-- | tests/test-fei-enc-in.c | 2 |
4 files changed, 2 insertions, 35 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder.c b/gst-libs/gst/vaapi/gstvaapiencoder.c index ef157e5b..815660b5 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder.c @@ -223,33 +223,6 @@ gst_vaapi_encoder_ensure_param_roi_regions (GstVaapiEncoder * encoder, } /** - * gst_vaapi_encoder_ref: - * @encoder: a #GstVaapiEncoder - * - * Atomically increases the reference count of the given @encoder by one. - * - * Returns: The same @encoder argument - */ -GstVaapiEncoder * -gst_vaapi_encoder_ref (GstVaapiEncoder * encoder) -{ - return gst_object_ref (encoder); -} - -/** - * gst_vaapi_encoder_unref: - * @encoder: a #GstVaapiEncoder - * - * Atomically decreases the reference count of the @encoder by one. If - * the reference count reaches zero, the encoder will be free'd. - */ -void -gst_vaapi_encoder_unref (GstVaapiEncoder * encoder) -{ - gst_object_unref (encoder); -} - -/** * gst_vaapi_encoder_replace: * @old_encoder_ptr: a pointer to a #GstVaapiEncoder * @new_encoder: a #GstVaapiEncoder diff --git a/gst-libs/gst/vaapi/gstvaapiencoder.h b/gst-libs/gst/vaapi/gstvaapiencoder.h index 910fb01f..ab4de262 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder.h +++ b/gst-libs/gst/vaapi/gstvaapiencoder.h @@ -131,12 +131,6 @@ gst_vaapi_encoder_tune_get_type (void) G_GNUC_CONST; GType gst_vaapi_encoder_mbbrc_get_type (void) G_GNUC_CONST; -GstVaapiEncoder * -gst_vaapi_encoder_ref (GstVaapiEncoder * encoder); - -void -gst_vaapi_encoder_unref (GstVaapiEncoder * encoder); - void gst_vaapi_encoder_replace (GstVaapiEncoder ** old_encoder_ptr, GstVaapiEncoder * new_encoder); diff --git a/tests/simple-encoder.c b/tests/simple-encoder.c index c94f3b5f..97857731 100644 --- a/tests/simple-encoder.c +++ b/tests/simple-encoder.c @@ -299,7 +299,7 @@ app_free (App * app) if (app->encoder) { gst_vaapi_encoder_flush (app->encoder); - gst_vaapi_encoder_unref (app->encoder); + gst_object_unref (app->encoder); } if (app->display) diff --git a/tests/test-fei-enc-in.c b/tests/test-fei-enc-in.c index d64a9468..9f79c166 100644 --- a/tests/test-fei-enc-in.c +++ b/tests/test-fei-enc-in.c @@ -343,7 +343,7 @@ app_free (App * app) if (app->encoder) { gst_vaapi_encoder_flush (app->encoder); - gst_vaapi_encoder_unref (app->encoder); + gst_object_unref (app->encoder); } if (app->display) |