libs: display: remove gst_vaapi_display_ref()

Replace it with gst_object_ref()

https://bugzilla.gnome.org/show_bug.cgi?id=796470
This commit is contained in:
Víctor Manuel Jáquez Leal 2018-06-13 18:00:18 +02:00
parent fb1c4c52cc
commit 6ccd5d6fb2
10 changed files with 8 additions and 25 deletions

View file

@ -500,7 +500,7 @@ gst_vaapi_decoder_init (GstVaapiDecoder * decoder, GstVaapiDisplay * display,
gst_video_info_init (&codec_state->info);
decoder->user_data = NULL;
decoder->display = gst_vaapi_display_ref (display);
decoder->display = gst_object_ref (display);
decoder->va_display = GST_VAAPI_DISPLAY_VADISPLAY (display);
decoder->context = NULL;
decoder->va_context = VA_INVALID_ID;

View file

@ -1194,20 +1194,6 @@ gst_vaapi_display_new_with_display (VADisplay va_display)
GST_VAAPI_DISPLAY_INIT_FROM_VA_DISPLAY, &info);
}
/**
* gst_vaapi_display_ref:
* @display: a #GstVaapiDisplay
*
* Atomically increases the reference count of the given @display by one.
*
* Returns: The same @display argument
*/
GstVaapiDisplay *
gst_vaapi_display_ref (GstVaapiDisplay * display)
{
return gst_object_ref (display);
}
/**
* gst_vaapi_display_replace:
* @old_display_ptr: a pointer to a #GstVaapiDisplay

View file

@ -151,9 +151,6 @@ struct _GstVaapiDisplayInfo
GstVaapiDisplay *
gst_vaapi_display_new_with_display (VADisplay va_display);
GstVaapiDisplay *
gst_vaapi_display_ref (GstVaapiDisplay * display);
void
gst_vaapi_display_replace (GstVaapiDisplay ** old_display_ptr,
GstVaapiDisplay * new_display);

View file

@ -1401,7 +1401,7 @@ gst_vaapi_encoder_init (GstVaapiEncoder * encoder, GstVaapiDisplay * display)
#undef CHECK_VTABLE_HOOK
encoder->display = gst_vaapi_display_ref (display);
encoder->display = gst_object_ref (display);
encoder->va_display = gst_vaapi_display_get_display (display);
encoder->va_context = VA_INVALID_ID;

View file

@ -1030,7 +1030,7 @@ gst_vaapi_filter_init (GstVaapiFilter * filter, GstVaapiDisplay * display)
{
VAStatus va_status;
filter->display = gst_vaapi_display_ref (display);
filter->display = gst_object_ref (display);
filter->va_display = GST_VAAPI_DISPLAY_VADISPLAY (display);
filter->va_config = VA_INVALID_ID;
filter->va_context = VA_INVALID_ID;

View file

@ -91,7 +91,7 @@ gst_vaapi_object_new (const GstVaapiObjectClass * klass,
if (!object)
return NULL;
object->display = gst_vaapi_display_ref (display);
object->display = gst_object_ref (display);
object->object_id = VA_INVALID_ID;
sub_size = object_class->size - sizeof (*object);

View file

@ -60,7 +60,7 @@ gst_vaapi_video_pool_init (GstVaapiVideoPool * pool, GstVaapiDisplay * display,
GstVaapiVideoPoolObjectType object_type)
{
pool->object_type = object_type;
pool->display = gst_vaapi_display_ref (display);
pool->display = gst_object_ref (display);
pool->used_objects = NULL;
pool->used_count = 0;
pool->capacity = 0;

View file

@ -1269,7 +1269,7 @@ ensure_allowed_raw_caps (GstVaapiPluginBase * plugin)
out_formats = formats = NULL;
surface = NULL;
display = gst_vaapi_display_ref (plugin->display);
display = gst_object_ref (plugin->display);
formats = gst_vaapi_display_get_image_formats (display);
if (!formats)
goto bail;

View file

@ -226,7 +226,7 @@ gst_vaapi_video_meta_copy (GstVaapiVideoMeta * meta)
copy->buffer = NULL;
copy->ref_count = 1;
copy->display = gst_vaapi_display_ref (meta->display);
copy->display = gst_object_ref (meta->display);
copy->image_pool = NULL;
copy->image = meta->image ? gst_vaapi_object_ref (meta->image) : NULL;
copy->proxy = meta->proxy ? gst_vaapi_surface_proxy_copy (meta->proxy) : NULL;

View file

@ -79,7 +79,7 @@ main (int argc, char *argv[])
if (CHECK_DISPLAY_CACHE)
display2 = video_output_create_display (NULL);
else
display2 = gst_vaapi_display_ref (display);
display2 = gst_object_ref (display);
if (!display2)
g_error ("could not create second VA display");