platform/upstream/gst-plugins-good.git
6 years agoqt: the defines for QT_OPENGL_ES_2 have moved
Matthew Waters [Thu, 31 Aug 2017 04:40:44 +0000 (14:40 +1000)]
qt: the defines for QT_OPENGL_ES_2 have moved

Update the includes to account for that

6 years agoqt: ensure GL_DRAW_FRAMEBUFFER
Jochen Henneberg [Wed, 26 Apr 2017 11:50:41 +0000 (13:50 +0200)]
qt: ensure GL_DRAW_FRAMEBUFFER

6 years agoqt: fix broken build due to commit 2fd84a6c for gstgl
Julien Isorce [Tue, 22 Aug 2017 11:39:43 +0000 (12:39 +0100)]
qt: fix broken build due to commit 2fd84a6c for gstgl

https://bugzilla.gnome.org/show_bug.cgi?id=784779

6 years agoqmlglsink: Add itemInitialized signal to QML item
Carlos Rafael Giani [Sun, 21 May 2017 14:01:14 +0000 (16:01 +0200)]
qmlglsink: Add itemInitialized signal to QML item

This is useful for autoplay for example. With autoplay, it is necessary to
wait until the scene graph is fully set up. This signal is emitted once the
QML item node is ready. So, inside a connected slot, the pipeline's state
can be set to PLAYING to automatically start playback as soon as the QML
script is loaded.

https://bugzilla.gnome.org/show_bug.cgi?id=786246

6 years agoqt: Use a proxy object for access to the QML widget
Jan Schmidt [Wed, 12 Jul 2017 05:29:32 +0000 (15:29 +1000)]
qt: Use a proxy object for access to the QML widget

QML can destroy the video widget at any time, leaving
us with a dangling pointer. Use a lock and a proxy
object to cope with that, and block in the widget
destructor if there are ongoing calls into the widget.

7 years agoqmlsink example: Add CMakeLists.txt
Jan Schmidt [Wed, 21 Jun 2017 15:01:40 +0000 (01:01 +1000)]
qmlsink example: Add CMakeLists.txt

Make it possible to build using cmake instead of qmake

7 years agoqt: Remove misleading reference to GTK in qtitem.cc
Jan Schmidt [Wed, 21 Jun 2017 15:01:40 +0000 (01:01 +1000)]
qt: Remove misleading reference to GTK in qtitem.cc

7 years agoglframebuffer: check frame buffer status need use specific fbo target
Haihua Hu [Thu, 25 May 2017 02:09:04 +0000 (10:09 +0800)]
glframebuffer: check frame buffer status need use specific fbo target

https://bugzilla.gnome.org/show_bug.cgi?id=783065

7 years agoqmlglsink: Add dummy texture that is shown as placeholder for NULL buffers
Carlos Rafael Giani [Sun, 21 May 2017 13:26:12 +0000 (15:26 +0200)]
qmlglsink: Add dummy texture that is shown as placeholder for NULL buffers

https://bugzilla.gnome.org/show_bug.cgi?id=782917

7 years agoqt: Use GST_GL_HAVE_PLATFORM_CGL instead of GST_GL_HAVE_PLATFORM_COCOA
Simon Himmelbauer [Thu, 18 May 2017 12:23:14 +0000 (15:23 +0300)]
qt: Use GST_GL_HAVE_PLATFORM_CGL instead of GST_GL_HAVE_PLATFORM_COCOA

The latter is not used/available anymore since years. Also fix a typo
in the include path for the Cocoa GL display header.

7 years agoqml: Add EGL platform support for x11 backend
Haihua Hu [Wed, 17 May 2017 02:58:05 +0000 (10:58 +0800)]
qml: Add EGL platform support for x11 backend

Add support for EGL platform when x11 is available. This can work
e.g. on imx6 platform.

https://bugzilla.gnome.org/show_bug.cgi?id=782718

7 years agoRemove plugin specific static build option
Nicolas Dufresne [Tue, 16 May 2017 18:05:52 +0000 (14:05 -0400)]
Remove plugin specific static build option

Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.

7 years agoqmlgl: Make the plugin name match the pugin file name
Nicolas Dufresne [Tue, 9 May 2017 13:47:10 +0000 (09:47 -0400)]
qmlgl: Make the plugin name match the pugin file name

7 years agogl/format: use our own GL format enum's instead of gstvideo's
Matthew Waters [Mon, 13 Mar 2017 03:28:47 +0000 (14:28 +1100)]
gl/format: use our own GL format enum's instead of gstvideo's

They can describe in more detail (such as component sizes) the requested format.

7 years agoqml: Add support for Vivante EGL FS windowing system
Sebastian Dröge [Fri, 17 Feb 2017 12:37:08 +0000 (14:37 +0200)]
qml: Add support for Vivante EGL FS windowing system

https://bugzilla.gnome.org/show_bug.cgi?id=778825

7 years agoqt: The code requires at least C++11
Sebastian Dröge [Wed, 25 Jan 2017 17:21:03 +0000 (19:21 +0200)]
qt: The code requires at least C++11

... and clang requires this to be specified on the commandline while gcc
nowadays defaults to C++11 or even newer.

7 years agogl/utils: also take care of the local GL context in query functions
Matthew Waters [Thu, 12 Jan 2017 10:35:25 +0000 (21:35 +1100)]
gl/utils: also take care of the local GL context in query functions

Simplifies a deduplicates a lot of code in elements retrieving/setting
the local OpenGL context.

7 years agoqmlglsrc: use glBlitFramebuffer to copy texture for GLES3.0
Haihua Hu [Tue, 10 Jan 2017 08:54:48 +0000 (16:54 +0800)]
qmlglsrc: use glBlitFramebuffer to copy texture for GLES3.0

If support glBlitFrameBuffer, use it for texture copy instead
of glCopyTexImage2D

https://bugzilla.gnome.org/show_bug.cgi?id=777078

7 years agoqt: improve element and property descriptions a bit
Tim-Philipp Müller [Sat, 17 Dec 2016 13:42:34 +0000 (13:42 +0000)]
qt: improve element and property descriptions a bit

7 years agoqml: Fix egl being deinitialized on display cleanup
Sergey Borovkov [Thu, 8 Dec 2016 09:37:25 +0000 (12:37 +0300)]
qml: Fix egl being deinitialized on display cleanup

Use the with_egl_display() variant in order to not destroy the
EGLDisplay on destruction.

https://bugzilla.gnome.org/show_bug.cgi?id=775793

7 years agoqml/item: also unref the display on destruction
Matthew Waters [Wed, 7 Dec 2016 11:55:46 +0000 (22:55 +1100)]
qml/item: also unref the display on destruction

Leaking objects (and a thread!) is never a good idea.

https://bugzilla.gnome.org/show_bug.cgi?id=775746

7 years agotests/examples/qmlsink: scope QApplication/Engine
Matthew Waters [Wed, 7 Dec 2016 11:58:29 +0000 (22:58 +1100)]
tests/examples/qmlsink: scope QApplication/Engine

So they are destroyed before gst_deinit() is run and the leaks tracer
doesn't show false-positives.

https://bugzilla.gnome.org/show_bug.cgi?id=775746

7 years agoqmlglsrc: some enhancements for qmlglsrc
Haihua Hu [Mon, 7 Nov 2016 06:47:22 +0000 (14:47 +0800)]
qmlglsrc: some enhancements for qmlglsrc

1. Need set use-default-fbo to qquickwindow during set property
   to support change render target on the fly.
2. Calculate qmlglsrc refresh frame rate in qtglwindow

https://bugzilla.gnome.org/show_bug.cgi?id=774035

7 years agogl: GST_GL_TYPE -> GST_TYPE_GL
Matthew Waters [Wed, 5 Oct 2016 01:19:12 +0000 (12:19 +1100)]
gl: GST_GL_TYPE -> GST_TYPE_GL

Some deprecated symbols are kept for backwards compatibility

7 years agoqt: Fix failing build on RPI
Sergey Borovkov [Sun, 16 Oct 2016 10:40:22 +0000 (12:40 +0200)]
qt: Fix failing build on RPI

https://bugzilla.gnome.org/show_bug.cgi?id=773026

7 years agoqmlglsink: check qt_context_ first in GstQSGTexture::bind()
Haihua Hu [Tue, 6 Sep 2016 05:13:39 +0000 (13:13 +0800)]
qmlglsink: check qt_context_ first in GstQSGTexture::bind()

When start qmlglsink app, it will set NULL buffer to GstQSGTexture
in which case that qt_context_ will be a random value and cause
gst_gl_context_activate() fail.

https://bugzilla.gnome.org/show_bug.cgi?id=770925

7 years agoqt: Use wglShareLists() workaround unconditionally.
Jan Schmidt [Mon, 15 Aug 2016 14:40:53 +0000 (00:40 +1000)]
qt: Use wglShareLists() workaround unconditionally.

Sometimes wglCreateContextAttribsARB() exists, but
isn't functional (some Intel drivers), so it's
easiest to do the workaround unconditionally.

7 years agoqt: Move debug statement to after the category init
Jan Schmidt [Mon, 8 Aug 2016 03:41:14 +0000 (13:41 +1000)]
qt: Move debug statement to after the category init

Don't output debug to an uninitialised debug category.

7 years agoqmlglsrc: Add qmlglsrc unit test example
Haihua Hu [Wed, 27 Jul 2016 01:28:23 +0000 (09:28 +0800)]
qmlglsrc: Add qmlglsrc unit test example

https://bugzilla.gnome.org/show_bug.cgi?id=768160

7 years agoqt: implement qmlglsrc for qml view grab
Haihua Hu [Wed, 27 Jul 2016 00:16:47 +0000 (08:16 +0800)]
qt: implement qmlglsrc for qml view grab

[Matthew Waters]: gst-indent sources

https://bugzilla.gnome.org/show_bug.cgi?id=768160

7 years agoqml: Don't forget to unref the actual sink element after setting it on glsinkbin
Sebastian Dröge [Fri, 22 Jul 2016 14:00:14 +0000 (17:00 +0300)]
qml: Don't forget to unref the actual sink element after setting it on glsinkbin

7 years agoqml: Use glsinkbin instead of glupload directly
Sebastian Dröge [Fri, 22 Jul 2016 13:57:45 +0000 (16:57 +0300)]
qml: Use glsinkbin instead of glupload directly

7 years agoqt: fix build some more when QPA is not available
Tim-Philipp Müller [Fri, 1 Jul 2016 18:22:32 +0000 (19:22 +0100)]
qt: fix build some more when QPA is not available

Compiler would complain about include directory that didn't
exist because QPA_INCLUDE_PATH gets subst-ed regardless
(and if it didn't we'd have just an empty -I argument).

https://bugzilla.gnome.org/show_bug.cgi?id=767553

7 years agoqmlglsink: Fix build error when don't have QPA installed.
Haihua Hu [Mon, 27 Jun 2016 10:15:08 +0000 (18:15 +0800)]
qmlglsink: Fix build error when don't have QPA installed.

Check header file existance and wrap the header file include
in the necessary #ifdef to avoid build error.

https://bugzilla.gnome.org/show_bug.cgi?id=767553

7 years agoqmlglsink: add win32 support
Matthew Waters [Thu, 16 Jun 2016 05:13:02 +0000 (15:13 +1000)]
qmlglsink: add win32 support

The current state of c++ ABI's on Window's and Gst's/Qt's conflicting
mingw builds means that we cannot use mingw for building the qt plugin.

Instead, a qmake .pro file is provided that is expected to be used with the
msvc binaries provided by Qt like so:

(with the PATH environment variable containing the path to the qt biniaries
and PKG_CONFIG_PATH containing the path to GStreamer modules)
cd /path/to/sources/gst-plugins-bad/ext/qt
qmake -tp vc

Then open the resulting VS project and build the library.  Then

cp debug/libgstqtsink.dll /path/to/prefix/lib/gstreamer-1.0/libgstqtsink.cll

https://bugzilla.gnome.org/show_bug.cgi?id=761260

8 years agoqml: Enable qmlglsink for eglfs
Sergey Borovkov [Thu, 14 Apr 2016 15:14:32 +0000 (18:14 +0300)]
qml: Enable qmlglsink for eglfs

https://bugzilla.gnome.org/show_bug.cgi?id=763044

8 years agoqmlglsink: propagate GL context creation failure upwards
Matthew Waters [Wed, 15 Jun 2016 14:44:48 +0000 (00:44 +1000)]
qmlglsink: propagate GL context creation failure upwards

Otherwise an application cannot know if the qmlglsink will be displaying frames
incorrectly/at all.

8 years agoqmlglsink: also allow wayland-egl as a platform name
Matthew Waters [Wed, 15 Jun 2016 14:44:16 +0000 (00:44 +1000)]
qmlglsink: also allow wayland-egl as a platform name

8 years agoqmlglsink: Add Wayland support
Haihua Hu [Sun, 12 Jun 2016 07:35:28 +0000 (15:35 +0800)]
qmlglsink: Add Wayland support

Don't use gstgldisplay to get wayland display. Should use QPA on wayland
to get wayland display for QT.

https://bugzilla.gnome.org/show_bug.cgi?id=767553

8 years agobad: use new gst_element_class_add_static_pad_template()
Vineeth TM [Fri, 4 Mar 2016 06:50:26 +0000 (15:50 +0900)]
bad: use new gst_element_class_add_static_pad_template()

https://bugzilla.gnome.org/show_bug.cgi?id=763081

8 years agoqml: Fix leak of the OpenGL contexts
Sergey Borovkov [Tue, 1 Mar 2016 15:22:37 +0000 (18:22 +0300)]
qml: Fix leak of the OpenGL contexts

[Matthew Waters]: add NULL checks before unreffing

https://bugzilla.gnome.org/show_bug.cgi?id=762999

8 years agoqt: use a static_cast instead of dynamic one
Matthew Waters [Tue, 23 Feb 2016 12:10:20 +0000 (23:10 +1100)]
qt: use a static_cast instead of dynamic one

The dynamic_cast is a little but of overkill as the app will still crash if it
fails in the later g_assert.

Allows compilation with -fno-rtti

https://bugzilla.gnome.org/show_bug.cgi?id=762526

8 years agoqmlglsink: Schedule onSceneGrpahInitialized to execute on render thread
Sergey Borovkov [Sun, 24 Jan 2016 14:40:37 +0000 (17:40 +0300)]
qmlglsink: Schedule onSceneGrpahInitialized to execute on render thread

onSceneGraphInitialized() is called from non render thread currently when
scene graph is already initialized.

https://bugzilla.gnome.org/show_bug.cgi?id=761003

8 years agotests: fix warning in qml example
Holger Kaelberer [Sun, 24 Jan 2016 14:47:12 +0000 (15:47 +0100)]
tests: fix warning in qml example

https://bugzilla.gnome.org/show_bug.cgi?id=756082

8 years agoqt: specify that we currently only take 2D textures
Matthew Waters [Mon, 25 Jan 2016 05:29:46 +0000 (16:29 +1100)]
qt: specify that we currently only take 2D textures

Fixes black screen video playback on android without a caps filter.

8 years agoqml: Mark material dirty when texture buffer is updated
Sergey Borovkov [Fri, 8 Jan 2016 19:19:06 +0000 (22:19 +0300)]
qml: Mark material dirty when texture buffer is updated

Qt might not redraw the scene otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=758286

8 years agoqtsink: Add configured GL cflags to the build
Nicolas Dufresne [Wed, 16 Dec 2015 00:28:05 +0000 (19:28 -0500)]
qtsink: Add configured GL cflags to the build

We don't directly link to GL in the element, though we use GL headers.
For this reason we need to include the proper GL headers path. This
prevent this element from using a different GL header then libgstgl.

8 years agoglmemory: base classify and add the pbo memory on top
Matthew Waters [Mon, 14 Dec 2015 02:43:59 +0000 (13:43 +1100)]
glmemory: base classify and add the pbo memory on top

The base class is useful for having multiple backing memory types other
than the default.  e.g. IOSurface, EGLImage, dmabuf?

The PBO transfer logic is now inside GstGLMemoryPBO which uses GstGLBuffer
to manage the PBO memory.

This also moves the format utility functions into their own file.

8 years agoqml: reuse existing GstQSGTexture
Roman Nowicki [Fri, 20 Nov 2015 00:18:43 +0000 (11:18 +1100)]
qml: reuse existing GstQSGTexture

Fixes a memory leak leaking the texture objects.

https://bugzilla.gnome.org/show_bug.cgi?id=758286

8 years agoqml: activate the wrapped context when binding
Matthew Waters [Fri, 20 Nov 2015 00:08:37 +0000 (11:08 +1100)]
qml: activate the wrapped context when binding

Mitigates the following critical

gst_gl_context_thread_add: assertion 'context->priv->active_thread == g_thread_self ()' failed

8 years agoqml: proper initialization if scene is already initialized
Roman Nowicki [Thu, 19 Nov 2015 10:55:19 +0000 (11:55 +0100)]
qml: proper initialization if scene is already initialized

The scene graph can be initialized when the we receive window handle change
notification and so we will not receive a scenegraph initialization
notification.  Initialize ourself in this case.

https://bugzilla.gnome.org/show_bug.cgi?id=758337

8 years agogl: be consistent in gobject boilerpate
Matthew Waters [Mon, 19 Oct 2015 04:15:30 +0000 (15:15 +1100)]
gl: be consistent in gobject boilerpate

GST_GL_IS_* vs GST_IS_GL_*

git grep -l 'GST_GL_IS_' | xargs sed -i 's/GST_GL_IS_/GST_IS_GL_/g'

8 years agoqt: add support for building on osx/ios
Matthew Waters [Mon, 14 Sep 2015 17:14:37 +0000 (03:14 +1000)]
qt: add support for building on osx/ios

Including:
- Necessary configure checks
- Necessary compile time platform checks
- Necessary runtime qt iOS/OSX platform detection

https://bugzilla.gnome.org/show_bug.cgi?id=755100

8 years agoqtsink: explicitely fallthrough switch statement
Luis de Bethencourt [Fri, 28 Aug 2015 15:24:24 +0000 (16:24 +0100)]
qtsink: explicitely fallthrough switch statement

In case ret is False, fallthrough to default case.

CID #1320705

8 years agoqml: remove overwritten value
Luis de Bethencourt [Fri, 28 Aug 2015 15:35:39 +0000 (16:35 +0100)]
qml: remove overwritten value

Value in tex is overwritten before being used. Removing it.

CID 1320715

https://bugzilla.gnome.org/show_bug.cgi?id=754253

8 years agoqt: add support for building/running on android
Matthew Waters [Wed, 2 Sep 2015 13:45:07 +0000 (23:45 +1000)]
qt: add support for building/running on android

Including:
- Necessary configure checks
- Necessary compile time platform checks
- Necessary runtime qt android platform detection
- Escaping GLsync definition with Qt's GLES2 implementation

https://bugzilla.gnome.org/show_bug.cgi?id=754466

8 years agoqt: don't use CPPFLAGS for tools that cannot use them
Matthew Waters [Wed, 2 Sep 2015 13:40:31 +0000 (23:40 +1000)]
qt: don't use CPPFLAGS for tools that cannot use them

For example moc will bail out when given arguments it does not
know about.  The moc specific MOC_CPPFLAGS can still be used
to pass flags to moc.

https://bugzilla.gnome.org/show_bug.cgi?id=754466

8 years agoqt: rename library to include gst prefix
Matthew Waters [Wed, 2 Sep 2015 13:39:54 +0000 (23:39 +1000)]
qt: rename library to include gst prefix

libqtsink -> libgstqtsink

https://bugzilla.gnome.org/show_bug.cgi?id=754466

8 years agogtk, qt: more specifically define the compile time requirements
Matthew Waters [Wed, 9 Sep 2015 14:07:18 +0000 (00:07 +1000)]
gtk, qt: more specifically define the compile time requirements

Otherwise we could include headers/configurations that will
never been installed.

https://bugzilla.gnome.org/show_bug.cgi?id=754732

8 years agoqt: use our function table instead of directly calling gl functions
Matthew Waters [Wed, 9 Sep 2015 14:00:11 +0000 (00:00 +1000)]
qt: use our function table instead of directly calling gl functions

Otherwise when building with --as-needed we would need to link to
a GL or GLES library.

https://bugzilla.gnome.org/show_bug.cgi?id=754732

8 years agoqmlsink: Ensure that at least one windowing system is available
Nirbheek Chauhan [Fri, 7 Aug 2015 11:57:48 +0000 (17:27 +0530)]
qmlsink: Ensure that at least one windowing system is available

Otherwise, we'll just crash at runtime because the gl context is NULL

https://bugzilla.gnome.org/show_bug.cgi?id=754108

8 years agogtk, qt, gl: fix typo in debug and error messages
Tim-Philipp Müller [Mon, 31 Aug 2015 17:06:31 +0000 (18:06 +0100)]
gtk, qt, gl: fix typo in debug and error messages

8 years agoqml: implement the required multiple GL context synchonisation
Matthew Waters [Sat, 8 Aug 2015 15:28:03 +0000 (17:28 +0200)]
qml: implement the required multiple GL context synchonisation

From GStreamer's GL context into the QML context

8 years agoqt: Don't dist files that might not exist
Edward Hervey [Wed, 22 Jul 2015 13:13:48 +0000 (15:13 +0200)]
qt: Don't dist files that might not exist

We only require moc building at build time.

8 years agoqt: Tidy up makefile a bit more
Edward Hervey [Wed, 22 Jul 2015 06:05:04 +0000 (08:05 +0200)]
qt: Tidy up makefile a bit more

Separate generated files, from disted files

8 years agoglcontext: fix get_current_gl_api on x11/nvidia drivers
Matthew Waters [Sat, 18 Jul 2015 07:19:18 +0000 (17:19 +1000)]
glcontext: fix get_current_gl_api on x11/nvidia drivers

They require to get_proc_address some functions through the
platform specific {glX,egl}GetProcAddress rather than the default
GL library symbol lookup.

8 years agoconfigure/qt: Fix build without Qt5X11Extras
Edward Hervey [Fri, 10 Jul 2015 12:01:43 +0000 (14:01 +0200)]
configure/qt: Fix build without Qt5X11Extras

8 years agonew qt5 qml GL video sink
Matthew Waters [Mon, 6 Jul 2015 13:10:51 +0000 (23:10 +1000)]
new qt5 qml GL video sink

Very much in the same spirit as the Gtk GL sink

Two things are provided
1. A QQuickItem subclass that renders out RGBA filled GstGLMemory
   buffers that is instantiated from qml.
2. A sink element that will push buffers into (1)

To use
1. Declare the GstGLVideoItem in qml with an appropriate
   objectName property set.
2. Get the aforementioned GstGLVideoItem from qml using something like

QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));

QObject *rootObject = engine.rootObjects().first();
QQuickItem *videoItem = rootObject->findChild<QQuickItem *> ("videoItem");

3. Set the videoItem on the sink

https://bugzilla.gnome.org/show_bug.cgi?id=752185