platform/upstream/gst-plugins-good.git
8 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

8 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

8 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

8 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

8 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

8 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

8 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.

9 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

9 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

9 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

9 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'

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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.

9 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

9 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.

9 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

9 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