mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 12:32:29 +00:00
plugins: add COPY_OUTPUT_FRAME flag
This patch add the member copy_output_frame and set it TRUE when when downstream didn't request GstVideoMeta API, the caps are raw and the internal allocator is the VA-API one. https://bugzilla.gnome.org/show_bug.cgi?id=785054
This commit is contained in:
parent
f0fd2aeb04
commit
5842e9cf87
2 changed files with 10 additions and 0 deletions
|
@ -1015,6 +1015,12 @@ gst_vaapi_plugin_base_decide_allocation (GstVaapiPluginBase * plugin,
|
|||
|
||||
g_clear_object (&plugin->srcpad_buffer_pool);
|
||||
plugin->srcpad_buffer_pool = pool;
|
||||
|
||||
/* if downstream doesn't support GstVideoMeta, and the negotiated
|
||||
* caps are raw video, and the used allocator is the VA-API one, we
|
||||
* should copy the VA-API frame into a dumb buffer */
|
||||
plugin->copy_output_frame = gst_vaapi_video_buffer_pool_copy_buffer (pool);
|
||||
|
||||
return TRUE;
|
||||
|
||||
/* ERRORS */
|
||||
|
|
|
@ -85,6 +85,8 @@ typedef struct _GstVaapiPluginBaseClass GstVaapiPluginBaseClass;
|
|||
(&GST_VAAPI_PLUGIN_BASE(plugin)->srcpad_info)
|
||||
#define GST_VAAPI_PLUGIN_BASE_SRC_PAD_CAN_DMABUF(plugin) \
|
||||
(GST_VAAPI_PLUGIN_BASE(plugin)->srcpad_can_dmabuf)
|
||||
#define GST_VAAPI_PLUGIN_BASE_COPY_OUTPUT_FRAME(plugin) \
|
||||
(GST_VAAPI_PLUGIN_BASE(plugin)->copy_output_frame)
|
||||
|
||||
#define GST_VAAPI_PLUGIN_BASE_DISPLAY(plugin) \
|
||||
(GST_VAAPI_PLUGIN_BASE(plugin)->display)
|
||||
|
@ -147,8 +149,10 @@ struct _GstVaapiPluginBase
|
|||
gboolean srcpad_can_dmabuf;
|
||||
|
||||
gboolean enable_direct_rendering;
|
||||
|
||||
GstAllocator *other_srcpad_allocator;
|
||||
GstAllocationParams other_allocator_params;
|
||||
gboolean copy_output_frame;
|
||||
};
|
||||
|
||||
struct _GstVaapiPluginBaseClass
|
||||
|
|
Loading…
Reference in a new issue