diff options
author | Mansoor Chishtie <mchishtie@blackberry.com> | 2014-05-27 19:35:12 -0500 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-06-02 20:49:50 +0200 |
commit | 5e5a99fa374d4b83e548ada8c76fa191a27e4b51 (patch) | |
tree | 9ed2144ddc001fbbb7ca1964772b78bae015a61e /src/core/chromium_gpu_helper.h | |
parent | 65bf1a1334acce38983896241d3b211e1fa4659a (diff) |
Support EGLStream video streaming on QNX platform
On QNX platform, we implement video streaming via OpenGL
EGLStream streams. Changes were added to StreamVideo class
to support EGLStream objects. For non-QNX platforms, we
kept the StreamVideoNode class unchanged - assuming other
platforms will continue to support streaming via EGLImage
objects.
On QNX, cc::StreamVideoDrawQuad contains an
external OES texture that is associated with an
EGLStream. Before we draw with that texture, an
'acquire' is performed to grab latest video frame.
See EGL_KHR_stream specs from Khronos.
Change-Id: Ia3fe25e9047f475594a55591e3e11caa0eab1e6a
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'src/core/chromium_gpu_helper.h')
-rw-r--r-- | src/core/chromium_gpu_helper.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/chromium_gpu_helper.h b/src/core/chromium_gpu_helper.h index 285554cc9..00ed5f295 100644 --- a/src/core/chromium_gpu_helper.h +++ b/src/core/chromium_gpu_helper.h @@ -42,6 +42,8 @@ #ifndef CHROMIUM_GPU_HELPER_H #define CHROMIUM_GPU_HELPER_H +#include <QtGlobal> // We need this for the Q_OS_QNX define. + #include "base/callback.h" namespace base { @@ -100,4 +102,18 @@ void AddSyncPointCallbackOnGpuThread(base::MessageLoop *gpuMessageLoop, content: gpu::gles2::Texture* ConsumeTexture(gpu::gles2::MailboxManager *mailboxManager, unsigned target, const gpu::gles2::MailboxName& name); unsigned int service_id(gpu::gles2::Texture *tex); +#ifdef Q_OS_QNX +typedef void* EGLDisplay; +typedef void* EGLStreamKHR; + +struct EGLStreamData { + EGLDisplay egl_display; + EGLStreamKHR egl_str_handle; + + EGLStreamData(): egl_display(NULL), egl_str_handle(NULL) {} +}; + +EGLStreamData eglstream_connect_consumer(gpu::gles2::Texture *tex); +#endif + #endif // CHROMIUM_GPU_HELPER_H |