mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
plugins: only dmabuf on srcpad if downstream
Set if source pad can handle dmabuf only if the GstGL context comes from downstream. It is possible to know that at two moments: 1\ In the case of GstGLTextureUpload caps feature is negotiated and downstream pool reports back gst.gl.GstGLContext. 2\ When GstGLContext is found as GstContext from dowstream. https://bugzilla.gnome.org/show_bug.cgi?id=788503
This commit is contained in:
parent
1135e8bd31
commit
0a36a707ba
2 changed files with 3 additions and 1 deletions
|
@ -931,6 +931,7 @@ gst_vaapi_plugin_base_decide_allocation (GstVaapiPluginBase * plugin,
|
|||
if (gst_structure_get (params, "gst.gl.GstGLContext", GST_TYPE_GL_CONTEXT,
|
||||
&gl_context, NULL) && gl_context) {
|
||||
gst_vaapi_plugin_base_set_gl_context (plugin, gl_context);
|
||||
gst_vaapi_plugin_base_set_srcpad_can_dmabuf (plugin, gl_context);
|
||||
gst_object_unref (gl_context);
|
||||
}
|
||||
}
|
||||
|
@ -1182,7 +1183,6 @@ gst_vaapi_plugin_base_set_gl_context (GstVaapiPluginBase * plugin,
|
|||
break;
|
||||
#endif
|
||||
case GST_GL_PLATFORM_EGL:
|
||||
gst_vaapi_plugin_base_set_srcpad_can_dmabuf (plugin, object);
|
||||
#if USE_EGL
|
||||
display_type = GST_VAAPI_DISPLAY_TYPE_EGL;
|
||||
break;
|
||||
|
|
|
@ -263,6 +263,8 @@ gst_vaapi_find_gl_context (GstElement * element)
|
|||
|
||||
if (gl_context) {
|
||||
gst_vaapi_plugin_base_set_gl_context (plugin, gl_context);
|
||||
if (direction == GST_PAD_SRC)
|
||||
gst_vaapi_plugin_base_set_srcpad_can_dmabuf (plugin, gl_context);
|
||||
gst_object_unref (gl_context);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue