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:
Gwenole Beauchesne 2013-03-26 18:45:53 +01:00
parent 140fa66be3
commit e6f0cbadd3
2 changed files with 12 additions and 12 deletions

View file

@ -152,6 +152,14 @@ new_vbuffer(GstVaapiVideoMeta *meta)
return buffer; 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 * GstBuffer *
gst_vaapi_video_buffer_new_from_pool(GstVaapiVideoPool *pool) 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)); 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;
}

View file

@ -29,6 +29,10 @@ G_BEGIN_DECLS
typedef struct _GstVaapiVideoBuffer GstVaapiVideoBuffer; typedef struct _GstVaapiVideoBuffer GstVaapiVideoBuffer;
G_GNUC_INTERNAL
GstBuffer *
gst_vaapi_video_buffer_new(GstVaapiVideoMeta *meta);
G_GNUC_INTERNAL G_GNUC_INTERNAL
GstBuffer * GstBuffer *
gst_vaapi_video_buffer_new_from_pool(GstVaapiVideoPool *pool); gst_vaapi_video_buffer_new_from_pool(GstVaapiVideoPool *pool);
@ -49,10 +53,6 @@ G_GNUC_INTERNAL
GstBuffer * GstBuffer *
gst_vaapi_video_buffer_new_with_surface_proxy(GstVaapiSurfaceProxy *proxy); 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 G_END_DECLS
#endif /* GST_VAAPI_VIDEO_BUFFER_H */ #endif /* GST_VAAPI_VIDEO_BUFFER_H */