Commit graph

81 commits

Author SHA1 Message Date
Pierre Labastie
65c987b495 examples: gl: sdl: link to the right in-tree libgstvideo
https://bugzilla.gnome.org/show_bug.cgi?id=796082
2018-05-13 23:31:22 +01:00
Edward Hervey
02d46b867a examples: Disable a specific warning
gcc 8 checks more cases in the "parentheses" checks, and unfortunately
upstream gtk headers fails with that warning.

Make that warning non-fatal
2018-05-11 09:44:58 +02:00
Tim-Philipp Müller
8227135f3b gl: hook up to build system
Tests and documentation will follow separately.

The mixer elements in the opengl plugin need to stay
in -bad for now since they use GstVideoAggregator.

https://bugzilla.gnome.org/show_bug.cgi?id=754094
2017-12-19 12:01:48 +00:00
Tim-Philipp Müller
0eefcb23b4 gl: examples: fix c++ code for -Wreturn-aggregate
.. and use #ifdef instead of #if
2017-12-19 12:01:44 +00:00
Tim-Philipp Müller
59fe9c9122 gl: remove GST_USE_UNSTABLE_API bits 2017-12-19 12:01:37 +00:00
Nicolas Dufresne
ecab99a7a9 sdlshare: Destroy GL backend buffer before the GL Context
This was otherwise leading to a deadlock in the GL library.
2017-12-09 19:32:31 +00:00
Nicolas Dufresne
9e208ba0b6 sdlshare2: Fix race conditions
The client-draw callback is running on the GL Thread, which will
be required to map the buffer. Map early, and pass the mapped
frame instead. On top of that, make sure to signal any pending
draw before trying to push EOS, as some pad locks might be taken.
This is the cost of using the same thread to control GStreamer and
to render GL.
2017-12-09 19:32:31 +00:00
Nicolas Dufresne
dea918a835 meson: Build gl/sdl examples 2017-12-09 19:32:31 +00:00
Jan Schmidt
bbe084de9d 3dvideo example: Correct video overlay for HiDPI
Use the GTK scaling factor to scale the video allocation
so video displays correctly on hi-dpi screens
2017-12-09 19:32:31 +00:00
Jérôme Laheurte
247e232ec4 Use value instead of version macro when testing for mac OS version
https://bugzilla.gnome.org/show_bug.cgi?id=788404
2017-12-09 19:32:30 +00:00
Philippe Normand
b9a2c64d8d examples/gl/gtk: build fix for the 3dvideo example on macOS 2017-12-09 19:32:30 +00:00
Philippe Normand
0559b42d6c examples/gl/gtk: fix overlay handling for macOS
The GTK+ window requires a NSView sub-view, not an NSWindow.
2017-12-09 19:32:30 +00:00
Julien Isorce
4952fdd956 gl: do not include GL headers in public gstgl headers
Except for gst/gl/gstglfuncs.h

It is up to the client app to include these headers.
It is coherent with the fact that gstreamer-gl.pc does not
require any egl.pc/gles.pc. I.e. it is the responsability
of the app to search these headers within its build setup.

For example gstreamer-vaapi includes explicitly EGL/egl.h
and search for it in its configure.ac.

For example with this patch, if an app includes the headers
  gst/gl/egl/gstglcontext_egl.h
  gst/gl/egl/gstgldisplay_egl.h
  gst/gl/egl/gstglmemoryegl.h
it will *no longer* automatically include EGL/egl.h and GLES2/gl2.h.
Which is good because the app might want to use the gstgl api only
without the need to bother about gl headers.

Also added a test: cd tests/check && make libs/gstglheaders.check

https://bugzilla.gnome.org/show_bug.cgi?id=784779
2017-12-09 19:32:29 +00:00
Tim-Philipp Müller
996b8c746f examples: gl: remove ancient bitrotten .vcproj files 2017-12-09 19:32:28 +00:00
Josep Torra
c020f421e1 examples: fix macOS 9.12 deprecation warnings
Add #defines to allow older versions of macOS to use the new constant names.
2017-12-09 19:32:28 +00:00
Nick Kallen
7b42f26b80 applemedia/gl: Update code to use ARC
All code interacting with Objective-C objects should now use Automated
Reference Counting rather than manual memory management or Garbage
Collection. Because ARC prohibits C-structs from containing
references to Objective-C objects, all such fields are now typed
'gpointer'. Setting and gettings Objective-C fields on such a
struct now uses explicit __bridge_* calls to tell ARC about
object lifetimes.

https://bugzilla.gnome.org/show_bug.cgi?id=777847
2017-12-09 19:32:27 +00:00
Matthew Waters
263255137e examples/gl/qt: fix the examples for the use of newer API
gstgl doesn't undo/overwrite what GL state the examples are changing
anymore.  As such, the examples need to reset the GL state themselves
to be able to play nice with libgstgl
2017-12-09 19:32:24 +00:00
Matthew Waters
18ac98c58b gl: GST_GL_TYPE -> GST_TYPE_GL
Some deprecated symbols are kept for backwards compatibility
2017-12-09 19:32:23 +00:00
Alistair Buxton
6d8456e018 gl/examples: Really remove references to $(GST_PLUGINS_GL_*).
These seem to have been missed in the previous commit to this file.

https://bugzilla.gnome.org/show_bug.cgi?id=771023
2017-12-09 19:32:22 +00:00
Matthew Waters
061049dd73 gl/examples/fxtest: fix up for wayland support
- Pass the wayland display to gst
- Redrawing on resize is no longer needed.
2017-12-09 19:32:22 +00:00
Matthew Waters
e3b5214ac6 gl/examples: fix switchvideooverlay for wayland
and call XInitThreads() for X11
2017-12-09 19:32:18 +00:00
Matthew Waters
df6a85725f gl/examples: remove duplicated videooverlay example
filtervideooverlay proved the exact same example (only with a extra glfiltercube).
2017-12-09 19:32:18 +00:00
Matthew Waters
ed1ff251db gl/examples/3d: additions for wayland support 2017-12-09 19:32:18 +00:00
Sebastian Dröge
82a39d2227 gl/gtk: Fix compiler warning in example
fxtest.c: In function ‘main’:
fxtest.c:190:3: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
   GtkWidget *window;
   ^~~~~~~~~
2017-12-09 19:32:18 +00:00
Matthew Waters
015ec7587f gl/examples/qt: restrict the GL API to opengl where needed
Until the examples are ported to opengl3/gles2, they will not work with any
other GL api.
2017-12-09 19:32:18 +00:00
Matthew Waters
d2542993dd gl/examples/gtk: call XInitThreads
Fixes some sporadic X11 threading assertions.
2017-12-09 19:32:18 +00:00
Matthew Waters
34e12a8837 gl/examples/cube*: choose opengl by default
The examples don't work with any other GL API.

Also fix the yuv example to not translate the cube out of the clipping area.
2017-12-09 19:32:17 +00:00
Matthew Waters
c3e362a8a9 gl/examples/fxtest: add needed glupload to the pipeline
Fixes a negotiation failure in the example
2017-12-09 19:32:17 +00:00
Sebastian Dröge
f2e4344385 clutter: Fix compilation error in GL examples
Include gst/gl.h instead of specific headers to prevent such problems also in
the future.

In file included from ../../../../gst-libs/gst/gl/gl.h:47:0,
                 from ../../../../gst-libs/gst/gl/gstglbasememory.h:137,
                 from ../../../../gst-libs/gst/gl/gstglmemory.h:29,
                 from cluttershare.c:39:
../../../../gst-libs/gst/gl/gstglmemorypbo.h:51:20: error: field ‘mem’ has incomplete type
   GstGLMemory      mem;
                    ^
../../../../gst-libs/gst/gl/gstglmemorypbo.h:124:24: error: field ‘parent’ has incomplete type
   GstGLMemoryAllocator parent;
                        ^
../../../../gst-libs/gst/gl/gstglmemorypbo.h:134:29: error: field ‘parent_class’ has incomplete type
   GstGLMemoryAllocatorClass parent_class;
                             ^
2017-12-09 19:32:12 +00:00
Vineeth TM
def421acf6 gstreamer: bad: Fix memory leaks when context parse fails
When g_option_context_parse fails, context and error variables are not getting free'd
which results in memory leaks. Free'ing the same.

And replacing g_error_free with g_clear_error, which checks if the error being passed
is not NULL and sets the variable to NULL on free'ing.

https://bugzilla.gnome.org/show_bug.cgi?id=753854
2017-12-09 19:32:09 +00:00
Jan Schmidt
c096fec277 3dvideo: Add simple gtk example stereoscopic video player
https://bugzilla.gnome.org/show_bug.cgi?id=611157
2017-12-09 19:32:04 +00:00
Matthew Waters
aff768f34c gl/examples: update qt examples for api changes 2017-12-09 19:32:04 +00:00
Julien Isorce
66c8c8ad87 gl/example: fix build error when compiling cocoa-videooverlay
libtool: error: ignoring unknown tag OBJC
and
clang: error: argument unused during compilation: '-pthread'
2017-12-09 19:32:03 +00:00
Edward Hervey
786b857e62 examples: Fix gl usage without wayland support
Not all platforms have wayland support. Handle that gracefully at
compile time
2017-12-09 19:32:03 +00:00
Matthew Waters
411d4d13b4 gl/examples: update gtk examples for glupload 2017-12-09 19:32:03 +00:00
Matthew Waters
81485d0b22 gl/examples: update gtk examples for wayland 2017-12-09 19:32:03 +00:00
Matthew Waters
70ccb610f6 tests/gl/gtk: implement setting a wayland display/surface 2017-12-09 19:32:03 +00:00
Jan Schmidt
506129ed42 Fix flags order in GL examples for uninstalled build 2017-12-09 19:32:01 +00:00
Matthew Waters
a4287991ae gl/examples: fixup generic cube example for NDC
translating outside the clip region doesn't work
2017-12-09 19:31:58 +00:00
Julien Isorce
8ca59af389 gl/examples: add sdlshare2 that uses glimagesink to output textures
https://bugzilla.gnome.org/show_bug.cgi?id=739681
2017-12-09 19:31:58 +00:00
Julien Isorce
1d88b95201 glimagesink: provide GstSample in client-draw signal
Instead of prividing texture and size directly.
And apply changes to examples.

https://bugzilla.gnome.org/show_bug.cgi?id=739681
2017-12-09 19:31:58 +00:00
Julien Isorce
0f90283520 sdlshare: use glupload and unmap frame 2017-12-09 19:31:58 +00:00
Julien Isorce
74b8117e53 examples: initialize NSApp at the beginning 2017-12-09 19:31:58 +00:00
Matthew Waters
07d41de7c4 gl/qt/examples: update for NSOpenGL -> CGL change 2017-12-09 19:31:53 +00:00
Matthew Waters
b99d53e0ff gl/examples: fixup sdl example for gluPerspective removal 2017-12-09 19:31:51 +00:00
Thijs Vermeir
035f6f975a gl/cocoa: Fix example on Mac OS X 10.10
Using NSApp directly seems to confuse something, as the compiler
was expecting an id<NSFileManagerDelegate>. Switched to using
[NSApplication sharedApplication], and specified the delegate
protocol on the window class as well.

Similar to https://bugzilla.gnome.org/show_bug.cgi?id=738740
2017-12-09 19:31:51 +00:00
Matthew Waters
892d056a44 gl: remove the use of glu 2017-12-09 19:31:51 +00:00
Sebastian Dröge
673b0190af gl/cocoa: Remove GNUStep support
Until gcc and GNUStep properly support Objective-C blocks and other
"new" features of Objective-C we can't properly support them without
making the code much more ugly.

https://bugzilla.gnome.org/show_bug.cgi?id=739152
2017-12-09 19:31:50 +00:00
Matthew Waters
6811c39ff9 gl/examples: update for other-context property removal 2017-12-09 19:31:49 +00:00
Jan Schmidt
6b96a87003 examples: Fix Qt/GL qglwtextureshare example for X11
We need to pass the X11 display to GstGL or else it will
use its own X11 Display pointer, and the GL Context won't get shared
correctly on newer X servers
2017-12-09 19:31:47 +00:00