libs: display: remove unnecessary legacy code since gobjectification

https://bugzilla.gnome.org/show_bug.cgi?id=796470
This commit is contained in:
Hyunjun Ko 2018-05-22 21:13:08 +09:00 committed by Víctor Manuel Jáquez Leal
parent 3056f06e02
commit aa77862b62
2 changed files with 5 additions and 33 deletions

View file

@ -52,11 +52,6 @@ GST_DEBUG_CATEGORY (gst_debug_vaapi_display);
G_DEFINE_TYPE_WITH_CODE (GstVaapiDisplay, gst_vaapi_display, GST_TYPE_OBJECT,
_do_init);
/* Ensure those symbols are actually defined in the resulting libraries */
#undef gst_vaapi_display_ref
#undef gst_vaapi_display_unref
#undef gst_vaapi_display_replace
typedef struct _GstVaapiConfig GstVaapiConfig;
struct _GstVaapiConfig
{
@ -1159,7 +1154,7 @@ gst_vaapi_display_new (GstVaapiDisplay * display,
/* ERRORS */
error:
{
gst_vaapi_display_unref_internal (display);
gst_vaapi_display_unref (display);
return NULL;
}
}
@ -1195,7 +1190,7 @@ gst_vaapi_display_new_with_display (VADisplay va_display)
GstVaapiDisplay *
gst_vaapi_display_ref (GstVaapiDisplay * display)
{
return gst_vaapi_display_ref_internal (display);
return gst_object_ref (display);
}
/**
@ -1208,7 +1203,7 @@ gst_vaapi_display_ref (GstVaapiDisplay * display)
void
gst_vaapi_display_unref (GstVaapiDisplay * display)
{
gst_vaapi_display_unref_internal (display);
gst_object_unref (display);
}
/**
@ -1224,7 +1219,8 @@ void
gst_vaapi_display_replace (GstVaapiDisplay ** old_display_ptr,
GstVaapiDisplay * new_display)
{
gst_vaapi_display_replace_internal (old_display_ptr, new_display);
gst_object_replace ((GstObject **) old_display_ptr,
(GstObject *) new_display);
}
/**

View file

@ -203,30 +203,6 @@ GstVaapiDisplay *
gst_vaapi_display_new (GstVaapiDisplay * display,
GstVaapiDisplayInitType init_type, gpointer init_value);
/* Inline reference counting for core libgstvaapi library */
#ifdef IN_LIBGSTVAAPI_CORE
#define gst_vaapi_display_ref_internal(display) \
((gpointer) gst_object_ref (GST_OBJECT (display)))
#define gst_vaapi_display_unref_internal(display) \
gst_object_unref (GST_OBJECT (display))
#define gst_vaapi_display_replace_internal(old_display_ptr, new_display) \
gst_object_replace ((GstObject **)(old_display_ptr), GST_OBJECT (new_display))
#undef gst_vaapi_display_ref
#define gst_vaapi_display_ref(display) \
gst_vaapi_display_ref_internal ((display))
#undef gst_vaapi_display_unref
#define gst_vaapi_display_unref(display) \
gst_vaapi_display_unref_internal ((display))
#undef gst_vaapi_display_replace
#define gst_vaapi_display_replace(old_display_ptr, new_display) \
gst_vaapi_display_replace_internal ((old_display_ptr), (new_display))
#endif
G_END_DECLS
#endif /* GST_VAAPI_DISPLAY_PRIV_H */