[GStreamer] share GL context in pipeline, part 2
authorvjaquez@igalia.com <vjaquez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Mar 2015 10:31:00 +0000 (10:31 +0000)
committervjaquez@igalia.com <vjaquez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Mar 2015 10:31:00 +0000 (10:31 +0000)
commitb23f044b57e7f762f92548ab2669521b92a38f26
tree588126e1ea1e7436216159150c5f1d93e27423a0
parentcf1c555ba5e34b2214b079527c7d176f002d779e
[GStreamer] share GL context in pipeline, part 2
https://bugs.webkit.org/show_bug.cgi?id=143049

Reviewed by Carlos Garcia Campos.

.:

* Source/cmake/OptionsGTK.cmake: USE_GSTREAMER_GL is set only if
OpenGL/ES2 is found and GLX/EGL is found too.

Source/WebCore:

This patch, instead of cluttering the GstGL attributes creation in
::handleSyncMessage(), creates a new method ::ensureGstGLContext(),
where those attributes are defined. This method is guarded by
USE(GSTREAMER_GL)

::handlSyncMessage() shall return nothing, according to GStreamer
documentation, not a boolean.

The GstGL attributes are now GRefPtr<> to avoid memory leaks.

The GstGLAPI and GstGLPlatform are now set given by the pre-processor
directives, and the code in ::ensureGstGLContext() is simpler.

No new tests because this is platform specific and it depends in the
run-time availability and configurations of GstGL elements.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
Don't initialise the GstGL attributes since are GRefPtr<>
(WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage): Changed the
signature to use void instead of gboolean.
(WebCore::MediaPlayerPrivateGStreamer::ensureGstGLContext): New method.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
Source/cmake/OptionsGTK.cmake