mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
libs: videopool: remove unneeded code
The removed code comes frome the bad practice of copy&paste. Better move it as internal function. https://bugzilla.gnome.org/show_bug.cgi?id=797139
This commit is contained in:
parent
4505acc522
commit
0e16691b09
4 changed files with 7 additions and 34 deletions
|
@ -106,7 +106,7 @@ gst_vaapi_coded_buffer_proxy_new_from_pool (GstVaapiCodedBufferPool * pool)
|
|||
|
||||
proxy->destroy_func = NULL;
|
||||
proxy->user_data_destroy = NULL;
|
||||
proxy->pool = gst_vaapi_video_pool_ref (pool);
|
||||
proxy->pool = gst_vaapi_video_pool_ref (GST_VAAPI_VIDEO_POOL (pool));
|
||||
proxy->buffer = gst_vaapi_video_pool_get_object (proxy->pool);
|
||||
#if USE_H264_FEI_ENCODER
|
||||
proxy->mv = NULL;
|
||||
|
|
|
@ -164,7 +164,7 @@ gst_vaapi_surface_proxy_new_from_pool (GstVaapiSurfacePool * pool)
|
|||
|
||||
proxy->parent = NULL;
|
||||
proxy->destroy_func = NULL;
|
||||
proxy->pool = gst_vaapi_video_pool_ref (pool);
|
||||
proxy->pool = gst_vaapi_video_pool_ref (GST_VAAPI_VIDEO_POOL (pool));
|
||||
proxy->surface = gst_vaapi_video_pool_get_object (proxy->pool);
|
||||
if (!proxy->surface)
|
||||
goto error;
|
||||
|
|
|
@ -35,11 +35,6 @@
|
|||
#define DEBUG 1
|
||||
#include "gstvaapidebug.h"
|
||||
|
||||
/* Ensure those symbols are actually defined in the resulting libraries */
|
||||
#undef gst_vaapi_video_pool_ref
|
||||
#undef gst_vaapi_video_pool_unref
|
||||
#undef gst_vaapi_video_pool_replace
|
||||
|
||||
#define GST_VAAPI_VIDEO_POOL_GET_CLASS(obj) \
|
||||
gst_vaapi_video_pool_get_class (GST_VAAPI_VIDEO_POOL (obj))
|
||||
|
||||
|
@ -90,7 +85,8 @@ gst_vaapi_video_pool_finalize (GstVaapiVideoPool * pool)
|
|||
GstVaapiVideoPool *
|
||||
gst_vaapi_video_pool_ref (GstVaapiVideoPool * pool)
|
||||
{
|
||||
return gst_vaapi_video_pool_ref_internal (pool);
|
||||
return (GstVaapiVideoPool *)
|
||||
gst_vaapi_mini_object_ref (GST_VAAPI_MINI_OBJECT (pool));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -103,7 +99,7 @@ gst_vaapi_video_pool_ref (GstVaapiVideoPool * pool)
|
|||
void
|
||||
gst_vaapi_video_pool_unref (GstVaapiVideoPool * pool)
|
||||
{
|
||||
gst_vaapi_video_pool_unref_internal (pool);
|
||||
gst_vaapi_mini_object_unref (GST_VAAPI_MINI_OBJECT (pool));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -119,7 +115,8 @@ void
|
|||
gst_vaapi_video_pool_replace (GstVaapiVideoPool ** old_pool_ptr,
|
||||
GstVaapiVideoPool * new_pool)
|
||||
{
|
||||
gst_vaapi_video_pool_replace_internal (old_pool_ptr, new_pool);
|
||||
gst_vaapi_mini_object_replace ((GstVaapiMiniObject **) (old_pool_ptr),
|
||||
GST_VAAPI_MINI_OBJECT (new_pool));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -79,30 +79,6 @@ G_GNUC_INTERNAL
|
|||
void
|
||||
gst_vaapi_video_pool_finalize (GstVaapiVideoPool * pool);
|
||||
|
||||
/* Internal aliases */
|
||||
|
||||
#define gst_vaapi_video_pool_ref_internal(pool) \
|
||||
((gpointer)gst_vaapi_mini_object_ref (GST_VAAPI_MINI_OBJECT (pool)))
|
||||
|
||||
#define gst_vaapi_video_pool_unref_internal(pool) \
|
||||
gst_vaapi_mini_object_unref (GST_VAAPI_MINI_OBJECT (pool))
|
||||
|
||||
#define gst_vaapi_video_pool_replace_internal(old_pool_ptr, new_pool) \
|
||||
gst_vaapi_mini_object_replace ((GstVaapiMiniObject **)(old_pool_ptr), \
|
||||
GST_VAAPI_MINI_OBJECT (new_pool))
|
||||
|
||||
#undef gst_vaapi_video_pool_ref
|
||||
#define gst_vaapi_video_pool_ref(pool) \
|
||||
gst_vaapi_video_pool_ref_internal ((pool))
|
||||
|
||||
#undef gst_vaapi_video_pool_unref
|
||||
#define gst_vaapi_video_pool_unref(pool) \
|
||||
gst_vaapi_video_pool_unref_internal ((pool))
|
||||
|
||||
#undef gst_vaapi_video_pool_replace
|
||||
#define gst_vaapi_video_pool_replace(old_pool_ptr, new_pool) \
|
||||
gst_vaapi_video_pool_replace_internal ((old_pool_ptr), (new_pool))
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* GST_VAAPI_VIDEO_POOL_PRIV_H */
|
||||
|
|
Loading…
Reference in a new issue