Commit graph

36 commits

Author SHA1 Message Date
Haihua Hu
669600617c qt: implement qmlglsrc for qml view grab
[Matthew Waters]: gst-indent sources

https://bugzilla.gnome.org/show_bug.cgi?id=768160
2016-08-03 22:11:11 +10:00
Tim-Philipp Müller
474ece7683 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
2016-07-01 19:29:49 +01:00
Haihua Hu
04fd6dc6c4 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
2016-06-27 22:44:56 +10:00
Matthew Waters
3be4b85a43 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
2016-06-22 14:26:05 +10:00
Sergey Borovkov
c9dd45393e qml: Enable qmlglsink for eglfs
https://bugzilla.gnome.org/show_bug.cgi?id=763044
2016-06-16 01:49:16 +10:00
Matthew Waters
486d3c3b59 qmlglsink: propagate GL context creation failure upwards
Otherwise an application cannot know if the qmlglsink will be displaying frames
incorrectly/at all.
2016-06-16 01:49:16 +10:00
Matthew Waters
f17e58f888 qmlglsink: also allow wayland-egl as a platform name 2016-06-16 01:49:16 +10:00
Haihua Hu
a07a9b0bc3 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
2016-06-16 01:49:16 +10:00
Vineeth TM
acb1b44ee0 bad: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763081
2016-03-24 14:56:51 +02:00
Sergey Borovkov
c2f17d4834 qml: Fix leak of the OpenGL contexts
[Matthew Waters]: add NULL checks before unreffing

https://bugzilla.gnome.org/show_bug.cgi?id=762999
2016-03-03 13:13:26 +11:00
Matthew Waters
6c6a9cf509 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
2016-02-24 21:20:18 +11:00
Sergey Borovkov
472b396528 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
2016-02-22 20:26:41 +11:00
Matthew Waters
0d851a66af qt: specify that we currently only take 2D textures
Fixes black screen video playback on android without a caps filter.
2016-01-27 16:13:28 +11:00
Sergey Borovkov
1d41990b26 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
2016-01-15 14:11:52 +11:00
Nicolas Dufresne
0e6a8838dc 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.
2015-12-15 19:28:22 -05:00
Matthew Waters
28d088fa2d 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.
2015-12-14 16:35:32 +11:00
Roman Nowicki
1dc889c6d0 qml: reuse existing GstQSGTexture
Fixes a memory leak leaking the texture objects.

https://bugzilla.gnome.org/show_bug.cgi?id=758286
2015-11-20 11:18:43 +11:00
Matthew Waters
aca25b521f 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
2015-11-20 11:09:45 +11:00
Roman Nowicki
21ca4ac9d3 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
2015-11-20 09:41:56 +11:00
Matthew Waters
b2718cbd81 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'
2015-10-19 15:15:30 +11:00
Matthew Waters
c6d03bc7d4 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
2015-10-02 22:29:45 +10:00
Luis de Bethencourt
c95bb94fc2 qtsink: explicitely fallthrough switch statement
In case ret is False, fallthrough to default case.

CID #1320705
2015-09-29 13:37:08 +01:00
Luis de Bethencourt
704f97defd 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
2015-09-28 18:17:22 +10:00
Matthew Waters
d47398de3b 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
2015-09-28 16:47:00 +10:00
Matthew Waters
5f8a587ddc 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
2015-09-28 16:47:00 +10:00
Matthew Waters
e29df60665 qt: rename library to include gst prefix
libqtsink -> libgstqtsink

https://bugzilla.gnome.org/show_bug.cgi?id=754466
2015-09-28 16:47:00 +10:00
Matthew Waters
f1cb602476 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
2015-09-10 13:11:06 +10:00
Matthew Waters
579b734346 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
2015-09-10 00:33:40 +10:00
Nirbheek Chauhan
e99c591dc9 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
2015-08-31 23:16:07 +01:00
Tim-Philipp Müller
9846984c63 gtk, qt, gl: fix typo in debug and error messages 2015-08-31 18:06:31 +01:00
Matthew Waters
b8bb4cc50f qml: implement the required multiple GL context synchonisation
From GStreamer's GL context into the QML context
2015-08-08 17:30:42 +02:00
Edward Hervey
523edaf6bd qt: Don't dist files that might not exist
We only require moc building at build time.
2015-07-22 15:14:28 +02:00
Edward Hervey
2df392541e qt: Tidy up makefile a bit more
Separate generated files, from disted files
2015-07-22 08:06:19 +02:00
Matthew Waters
e56df237ee 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.
2015-07-18 18:18:22 +10:00
Edward Hervey
d1ad64fca7 configure/qt: Fix build without Qt5X11Extras 2015-07-10 14:01:59 +02:00
Matthew Waters
b1bbdceeb2 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
2015-07-10 15:25:26 +10:00