mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
glupload: fallback to upload if contexts cannot share GL resources
Fixes pipelines of the form gleffects ! tee ! glimagesink as tee does not pass on the allocation query.
This commit is contained in:
parent
14630fac38
commit
ccf8f014f0
1 changed files with 6 additions and 0 deletions
|
@ -252,6 +252,11 @@ gst_gl_upload_perform_with_buffer (GstGLUpload * upload, GstBuffer * buffer,
|
|||
mem = gst_buffer_peek_memory (buffer, 0);
|
||||
|
||||
if (gst_is_gl_memory (mem)) {
|
||||
GstGLMemory *gl_mem = (GstGLMemory *) gst_buffer_peek_memory (buffer, 0);
|
||||
|
||||
if (!gst_gl_context_can_share (upload->context, gl_mem->context))
|
||||
goto raw_data_upload;
|
||||
|
||||
if (GST_VIDEO_INFO_FORMAT (&upload->in_info) == GST_VIDEO_FORMAT_RGBA) {
|
||||
GstMapInfo map_info;
|
||||
|
||||
|
@ -312,6 +317,7 @@ gst_gl_upload_perform_with_buffer (GstGLUpload * upload, GstBuffer * buffer,
|
|||
}
|
||||
}
|
||||
|
||||
raw_data_upload:
|
||||
GST_LOG_OBJECT (upload, "Attempting upload with raw data");
|
||||
/* GstVideoMeta map */
|
||||
if (!gst_video_frame_map (&upload->priv->frame, &upload->in_info, buffer,
|
||||
|
|
Loading…
Reference in a new issue