mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-13 21:01:14 +00:00
plugins: streamline video buffers.
Add new gst_vaapi_video_buffer_new() helper function that allocates a video buffer from a GstVaapiVideoMeta. Also remove obsolete and useless function gst_vaapi_video_buffer_get_meta().
This commit is contained in:
parent
140fa66be3
commit
e6f0cbadd3
2 changed files with 12 additions and 12 deletions
|
@ -152,6 +152,14 @@ new_vbuffer(GstVaapiVideoMeta *meta)
|
|||
return buffer;
|
||||
}
|
||||
|
||||
GstBuffer *
|
||||
gst_vaapi_video_buffer_new(GstVaapiVideoMeta *meta)
|
||||
{
|
||||
g_return_val_if_fail(meta != NULL, NULL);
|
||||
|
||||
return new_vbuffer(gst_vaapi_video_meta_ref(meta));
|
||||
}
|
||||
|
||||
GstBuffer *
|
||||
gst_vaapi_video_buffer_new_from_pool(GstVaapiVideoPool *pool)
|
||||
{
|
||||
|
@ -183,11 +191,3 @@ gst_vaapi_video_buffer_new_with_surface_proxy(GstVaapiSurfaceProxy *proxy)
|
|||
{
|
||||
return new_vbuffer(gst_vaapi_video_meta_new_with_surface_proxy(proxy));
|
||||
}
|
||||
|
||||
GstVaapiVideoMeta *
|
||||
gst_vaapi_video_buffer_get_meta(GstVaapiVideoBuffer *buffer)
|
||||
{
|
||||
g_return_val_if_fail(GST_VAAPI_IS_VIDEO_BUFFER(buffer), NULL);
|
||||
|
||||
return buffer->meta;
|
||||
}
|
||||
|
|
|
@ -29,6 +29,10 @@ G_BEGIN_DECLS
|
|||
|
||||
typedef struct _GstVaapiVideoBuffer GstVaapiVideoBuffer;
|
||||
|
||||
G_GNUC_INTERNAL
|
||||
GstBuffer *
|
||||
gst_vaapi_video_buffer_new(GstVaapiVideoMeta *meta);
|
||||
|
||||
G_GNUC_INTERNAL
|
||||
GstBuffer *
|
||||
gst_vaapi_video_buffer_new_from_pool(GstVaapiVideoPool *pool);
|
||||
|
@ -49,10 +53,6 @@ G_GNUC_INTERNAL
|
|||
GstBuffer *
|
||||
gst_vaapi_video_buffer_new_with_surface_proxy(GstVaapiSurfaceProxy *proxy);
|
||||
|
||||
G_GNUC_INTERNAL
|
||||
GstVaapiVideoMeta *
|
||||
gst_vaapi_video_buffer_get_meta(GstVaapiVideoBuffer *buffer);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* GST_VAAPI_VIDEO_BUFFER_H */
|
||||
|
|
Loading…
Reference in a new issue