mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
glviewconvert: expose the element on gles2 platforms
We can do everything with gles3 however gles2 restricts us not allowing separated or frame-by-frame multiview modes due to multiple draw buffers.
This commit is contained in:
parent
89122224eb
commit
cfb0d7e9f3
2 changed files with 16 additions and 5 deletions
|
@ -199,6 +199,11 @@ plugin_init (GstPlugin * plugin)
|
|||
GST_RANK_NONE, GST_TYPE_GL_FILTER_APP)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!gst_element_register (plugin, "glviewconvert",
|
||||
GST_RANK_NONE, GST_TYPE_GL_VIEW_CONVERT_ELEMENT)) {
|
||||
return FALSE;
|
||||
}
|
||||
#if HAVE_JPEG
|
||||
#if HAVE_PNG
|
||||
if (!gst_element_register (plugin, "gloverlay",
|
||||
|
@ -228,11 +233,6 @@ plugin_init (GstPlugin * plugin)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (!gst_element_register (plugin, "glviewconvert",
|
||||
GST_RANK_NONE, GST_TYPE_GL_VIEW_CONVERT_ELEMENT)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!gst_element_register (plugin, "glmosaic",
|
||||
GST_RANK_NONE, GST_TYPE_GL_MOSAIC)) {
|
||||
return FALSE;
|
||||
|
|
|
@ -1449,6 +1449,17 @@ _init_view_convert (GstGLViewConvert * viewconvert)
|
|||
"Cannot perform multiview conversion without OpenGL shaders");
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (out_mode == GST_VIDEO_MULTIVIEW_MODE_SEPARATED
|
||||
|| out_mode == GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME) {
|
||||
if (!gl->DrawBuffers) {
|
||||
GST_ERROR_OBJECT (viewconvert,
|
||||
"Separate texture output mode requested however the current "
|
||||
"OpenGL API does not support drawing to multiple buffers");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
if ((in_flags & GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST) ==
|
||||
(out_flags & GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST)) {
|
||||
l_index = 0;
|
||||
|
|
Loading…
Reference in a new issue