Sebastian Dröge
fc607b3c53
glimagesink: Call gst_object_unref() on the GstGL GObjects again
...
While they're plain GObjects it does not hurt to call gst_object_unref()
on them and potentially allows to debug reference leaks a bit easier.
2017-12-09 19:31:37 +00:00
Sebastian Dröge
2b38f86b4e
glimagesink: If creating a context or upload failed, destroy it
...
Fixes deadlocks in error cases when later code assumes the broken
context is actually usable.
https://bugzilla.gnome.org/show_bug.cgi?id=728761
2017-12-09 19:31:37 +00:00
Vincent Penquerc'h
f230f758e7
gl: a couple spelling/grammar fixes
2017-12-09 19:31:37 +00:00
Vincent Penquerc'h
d6a87fb0c3
gl: guard against using a NULL window pointer
...
Coverity 1195145
2017-12-09 19:31:37 +00:00
Vincent Penquerc'h
c728fd3b8d
gl: prevent division by 0 on unsupported texture type
...
Coverity 1199697
2017-12-09 19:31:37 +00:00
Jan Schmidt
c891eedb79
glcolorconvert: Fix bt709 conversion matrices.
...
Fix the sign on one entry in the bt.709 YUV->RGB conversion
matrix, and the corresponding inverse matrix. Fixes really
wrong colouring of some videos.
2017-12-09 19:31:37 +00:00
Julien Isorce
d539fd4a54
gl: allow to include GLES/gl.h
...
https://bugzilla.gnome.org/show_bug.cgi?id=703343
2017-12-09 19:31:37 +00:00
Sebastian Dröge
2843ca2066
gl/eagl: Fix compilation
2017-12-09 19:31:37 +00:00
Sebastian Dröge
a6f5b079d8
gl/eagl: Notify the window's resize callback about surface dimension changes
...
https://bugzilla.gnome.org/show_bug.cgi?id=728107
2017-12-09 19:31:37 +00:00
Sebastian Dröge
d462e7f6df
gl/eagl: Remove spurious private struct pointer
2017-12-09 19:31:37 +00:00
Sebastian Dröge
6fb0f1d1c7
gl/android: Notify the window's resize callback about surface dimension changes
...
https://bugzilla.gnome.org/show_bug.cgi?id=728107
2017-12-09 19:31:37 +00:00
Matthew Waters
9eb5001e02
glimagesink: remove unused texture
2017-12-09 19:31:36 +00:00
Matthew Waters
57b4bd6905
glimagesink: move upload into _prepare()
2017-12-09 19:31:36 +00:00
Matthew Waters
175ca3f7b0
gl/context: output available extensions
2017-12-09 19:31:36 +00:00
Matthew Waters
1460d22e92
gl/context: provide get_gl_version
2017-12-09 19:31:36 +00:00
Julien Isorce
9062658bc7
gl/color: restore viewport dimensions when fbo done
...
Regression introduced by 95abfda139
.
It caused to display the wrong frame size when resizing the window.
2017-12-09 19:31:36 +00:00
Sebastian Dröge
b83d2df47d
gl: Import QuartzCore/QuartzCore.h for CAEAGLLayer on older iOS versions
2017-12-09 19:31:36 +00:00
Sebastian Dröge
a05928ba62
gl: Set glimagesink rank to SECONDARY
...
This is a full-featured video sink now and especially should be
used instead of osxvideosink on OSX if available.
2017-12-09 19:31:36 +00:00
Sebastian Dröge
3770d2a406
gl: Add support for iOS EAGL platform
...
https://bugzilla.gnome.org/show_bug.cgi?id=703341
2017-12-09 19:31:36 +00:00
Julien Isorce
9d396a2495
gl/cocoa: make gst_gl_window_cocoa_send_message_async re-entrant
...
Backends that use g_main_context_invoke are re-entrant.
Il allows to call two nested gst_gl_context_thread_add.
ex: init_upload / init_colorconvert
2017-12-09 19:31:36 +00:00
Sebastian Dröge
aab3ef1b5d
glimagesink: First handle GL window setup, then create the context and its thread
2017-12-09 19:31:36 +00:00
Julien Isorce
3819fbef46
gl/cocoa: fix NSAutoreleasePool initialization
2017-12-09 19:31:36 +00:00
Julien Isorce
08cce2cd5b
gl/cocoa: ensure to call NSApplication:sharedApplication in the main thread
...
"(NSApplication *)sharedApplication This method also makes a connection
to the window server and completes other initialization"
The implicit thing which is not mentioned is that it required
to be called in the main thread.
Fix a regression introduces by 82b7c915bb
When using with gst-launch, it was not possible to click on the close
cross of the window anymore which is a bit anoying and also because
it's was possible before.
Prior to this commit the GstGLContextCocoaClass was initialized
in the main thread because gst_gl_context_new was called in the
state change function from going from ready to paused.
From this commit this call is done from the streaming thread.
So that the call to [NSApplication sharedApplication];
was not done in the main thread anymore.
We now ensure that by assuming there is a GMainLoop running.
It's for debugging purpose so that's ok to do that. Also
note we already do this assumtion to run app itereations.
The regression had no consequence on the cocoa/videooverlay example
(that should be moved from gst-plugins-gl to -bad) because the
application is responsible for that necessary call.
2017-12-09 19:31:36 +00:00
Julien Isorce
e7dc1d787e
gl/color: fix warning type qualifiers ignored
...
i686-apple-darwin11-llvm-gcc-4.2
"warning: type qualifiers ignored on function return type"
2017-12-09 19:31:36 +00:00
Matthew Waters
a321fa998a
gl/color: remove if statement with no effect
...
Coverity 1199698
2017-12-09 19:31:36 +00:00
Matthew Waters
92c243be62
gl/color: pass large value by reference
...
Coverity 1199700
2017-12-09 19:31:36 +00:00
Matthew Waters
6c73fa0b5f
gl/mem: cache the stride/unpack length for upload
2017-12-09 19:31:36 +00:00
Matthew Waters
1ce0c5356f
gl/color: explicitly map the buffers we are copying into
...
Otherwise it may not be downloaded at all.
2017-12-09 19:31:36 +00:00
Matthew Waters
50ff50c10e
gl/color: cache the temporary textures
2017-12-09 19:31:36 +00:00
Matthew Waters
94371dc204
gl/mem: provide defines for tokens not defined in GLES2/ancient platforms
2017-12-09 19:31:36 +00:00
Matthew Waters
7c77c31afd
gl: fixup incorrect number of arguments
2017-12-09 19:31:36 +00:00
Matthew Waters
12ecf507b8
gl: fix incorrect usage of g_return_if_fail
2017-12-09 19:31:36 +00:00
Matthew Waters
30c6efc432
gl/mem: allocate the memory per plane
...
This patch provides the basic infrastructure required for this.
Upload and Download has been ported to this.
Has the nice effect of allowing GstGLMemory to be our
refcounted texture object for any texture type (not just RGBA).
Should not lose any features/video formats.
2017-12-09 19:31:36 +00:00
Matthew Waters
ea2d4cb446
gl/eglimage: #if 0 unused code
2017-12-09 19:31:36 +00:00
Matthew Waters
fba49c3463
gl: add colorconvert object that converts between color spaces/formats
...
Currently used by both upload and download objects separately.
2017-12-09 19:31:36 +00:00
Vincent Penquerc'h
2767aae4e2
gl: pass large structure by const pointer, not value
...
Avoids large pointless memcpy.
Coverity 206236, 206237
2017-12-09 19:31:36 +00:00
Vincent Penquerc'h
07565d0ff7
gl: test for frame NULLness before dereferencing it
...
Coverity 1195172, 1195171
2017-12-09 19:31:36 +00:00
Vincent Penquerc'h
7de81a33ca
gl: fix leaks
...
As the relevant variables are initialized to 0/NULL, we can loop
over the full range and make sure we free partial allocations
when an error happens partway through initialization.
2017-12-09 19:31:36 +00:00
Sebastian Dröge
4ecffcf76b
glimagesink: Create GL context and set up window from the streaming thread
...
gst_gl_context_create() might need to dispatch some operations to the
application's main thread, and calling this in the change_state function
can cause deadlocks.
2017-12-09 19:31:36 +00:00
Tim-Philipp Müller
efeaf7467b
tests: fix gl unit tests for recent API changes
2017-12-09 19:31:35 +00:00
Matthew Waters
a20a5d36e2
gl: pass video info's by reference
2017-12-09 19:31:35 +00:00
Matthew Waters
173b234ed2
gl: fix array initialization
2017-12-09 19:31:35 +00:00
Matthew Waters
394128a4db
glbumper: remove redundant check
2017-12-09 19:31:35 +00:00
Matthew Waters
ff52514714
gl/glx: use the context's display rather than asking for the window's
2017-12-09 19:31:35 +00:00
Matthew Waters
b70069bc61
gl: fix assignment of temporary variables
2017-12-09 19:31:35 +00:00
Matthew Waters
71548893bf
gl: avoid adding a NULL pool to propose allocation
2017-12-09 19:31:35 +00:00
Matthew Waters
790f34c7a6
gl: fix detection of extensions with GL versions < 3
...
Mesa, for example returns valid pointers for glGetIntegerv and
glGetStringi even if the gl version is less than that required for
both those functions to supposedly exist.
https://bugzilla.gnome.org/show_bug.cgi?id=727324
2017-12-09 19:31:35 +00:00
Tim-Philipp Müller
82555e80ba
gl: egl: fix distcheck and out of source build
2017-12-09 19:31:35 +00:00
Rico Tzschichholz
34a4eef1ec
build: Fix make dist
2017-12-09 19:31:35 +00:00
Matthew Waters
6491e4d275
gl: fix out-of-source builds pt2
...
21b897de2f
did this for x11 and wayland.
Do it for the other backends as well.
2017-12-09 19:31:35 +00:00