Matthew Waters
93968916a4
glsyncmeta: make context to wait and set sync explicit
...
otherwise we may wait on a sync object in same context by accident
2017-12-09 19:31:58 +00:00
Julien Isorce
63366be8ad
gl: add GstGLDisplayCocoa
...
https://bugzilla.gnome.org/show_bug.cgi?id=746012
2017-12-09 19:31:58 +00:00
Julien Isorce
d3b3887c52
gl/cocoa: do not terminate loop in gst_gl_window_cocoa_close
...
It is now done in _finalize.
Fix regression introduced by
"gl/window: create the main loop/context on init/finalize"
bc7a7259f3
2017-12-09 19:31:58 +00:00
Julien Isorce
a51680b1b3
gl: avoid overwriting display and context to NULL
...
It happens when the application provides display
and/or context.
2017-12-09 19:31:57 +00:00
Matthew Waters
15fd4e164a
glshader: attribute locations are -1 on error
2017-12-09 19:31:57 +00:00
Neos3452
7d83351172
glshader: prevent from getting attributes without vertex shader
...
It doesn't make sense to query for vertex attributes without a vertex
shader. Moreover this is causing a crash on OSX.
https://bugzilla.gnome.org/show_bug.cgi?id=746168
2017-12-09 19:31:57 +00:00
Matthew Waters
7b9d70944b
glupload: unref the bufferpool
2017-12-09 19:31:57 +00:00
Matthew Waters
92f0aa9bd8
gl: get the context from basemixer/basefilter
2017-12-09 19:31:57 +00:00
Matthew Waters
51620950e4
gl: retreive the gldisplay/app gl context as soon as possible
...
fixes the usage of gst_gl_display_filter_gl_api
2017-12-09 19:31:57 +00:00
Julien Isorce
d6e460095f
glcolorconvert: cache indices in a buffer object
2017-12-09 19:31:57 +00:00
Matthew Waters
35476a4cb4
gl/cocoa: avoid deadlock when creating context on the main thread.
...
Make window/view creation async so that it is possible to
gst_gl_context_create from the main thread.
2017-12-09 19:31:57 +00:00
Matthew Waters
813fb633b4
gl: store the list of contexts within gldisplay
...
Removes the reliance on the allocation query to propogate GL contexts.
Allows thread safely getting a context for the a specific thread.
2017-12-09 19:31:57 +00:00
Matthew Waters
d44594c622
glcontext: store the thread current context
2017-12-09 19:31:57 +00:00
Matthew Waters
3e608bcce7
glfilter: don't use the library upload/convert objects
2017-12-09 19:31:57 +00:00
Matthew Waters
1ba38bc10a
glupload: implement propose_allocation pool handling for glmemory upload
2017-12-09 19:31:56 +00:00
Matthew Waters
2ead0d97ed
gl: add a new glbasefilter class below glfilter
...
It deals with propagating the gl display/contexts throughout the
application/pipeline
2017-12-09 19:31:56 +00:00
Matthew Waters
6d4cca89ef
glutils: expose running a query on a set of src/sink pads
2017-12-09 19:31:56 +00:00
Matthew Waters
f9ac4984eb
glfilter: advertise resize in the caps negotiation properly
2017-12-09 19:31:56 +00:00
Matthew Waters
1d4b82d5f8
glcolorconvert: we don't do resizing of the video frames
...
As we cannot do accurate texel sampling then due to the texture
coordinates being interpolated based on the output frame size.
2017-12-09 19:31:56 +00:00
Matthew Waters
39eb34eb43
gl/x11: don't XGetWindowAttributes every XEvent
...
fixes a deadlock in xcb where the X window may not exist.
https://bugzilla.gnome.org/show_bug.cgi?id=745633
2017-12-09 19:31:56 +00:00
Matthew Waters
9968b512c5
gl/window: hopefully fixup compile warnings on android/ios
2017-12-09 19:31:56 +00:00
Jan Schmidt
ebbdf29a24
glfilter: Remove redundant check for clearing context on reset.
...
The context is already cleared a few lines above.
2017-12-09 19:31:56 +00:00
Jan Schmidt
6350c35352
Remove a bunch of silly ';;' typos at the end of lines
2017-12-09 19:31:56 +00:00
Matthew Waters
5b8f3e7870
gl/window: create the main loop/context on init/finalize
...
Avoids races setting the window handle from the main thread.
https://bugzilla.gnome.org/show_bug.cgi?id=745633
2017-12-09 19:31:56 +00:00
Nicolas Dufresne
da41207841
glfilter: Don't chain downstream pool
...
Chaining a downstream pool would lead to two owner of the same
pool. In dynamic pipeline, if one owner is removed from the pipeline
the pool will be stopped, and the rest of the pipeline will fail
since the pool will now be flushing. Also fix proposed pool caching,
filter->pool was never set, never unrefed.
https://bugzilla.gnome.org/show_bug.cgi?id=745705
2017-12-09 19:31:56 +00:00
Sebastian Dröge
eeab6e881f
gldownload: Simplify caps feature setting code
2017-12-09 19:31:56 +00:00
Sebastian Dröge
cb59ace574
gl: Remove format info in glcolorconvert's transform_caps function instead of on every caller
...
... and let glmixer actually transform the caps it is supposed to transform
instead of inventing new caps.
2017-12-09 19:31:56 +00:00
Sebastian Dröge
86d1280f2c
glupload: Simplify caps feature setting code
2017-12-09 19:31:56 +00:00
Edward Hervey
285afe0861
gldisplay: Only use debugging if we have valid values
...
The debug category won't have been created/activated if it's not a
valid display
2017-12-09 19:31:56 +00:00
Nicolas Dufresne
c9ee5a4b87
glfilter: Get rid of uploader if caps have changed
...
We need to update the uploader format if that caps have changed.
https://bugzilla.gnome.org/show_bug.cgi?id=745549
2017-12-09 19:31:56 +00:00
Edward Hervey
961e847433
gl: Fix context leaks
...
Introduced by a12ca13750
2017-12-09 19:31:56 +00:00
Julien Isorce
befc24469c
gl/cocoa: register only one custom nsapp loop
...
Otherwise the pipeline stalls when running
more than one glimagesink with gst-launch.
Also only register the custom nsapp loop
when setting up the nsapp from gstgl.
2017-12-09 19:31:56 +00:00
Julien Isorce
075a4ffaff
gl/cocoa: instead of class_init use g_once to setup nsapp
2017-12-09 19:31:56 +00:00
Julien Isorce
9599b46416
gl/cocoa: check for deprecated constants prior to OSX 10.10
2017-12-09 19:31:56 +00:00
Nicolas Dufresne
50c491dd36
glbufferpool: Fix offset for odd height
...
We also need to recalculate the offset, since otherwise the frame
mapping will be forward two lines in the U and V planes (I420) due
to gst_video_info_align() round up the Y plane to a even number of
lines.
https://bugzilla.gnome.org/show_bug.cgi?id=745054
2017-12-09 19:31:56 +00:00
Nicolas Dufresne
b2aea709d0
glmemory: Support offset when downloading
...
Make sure we support offset and video alignment when downloading too.
This is currently not used (plane_start is always 0), but it makes
the code correct if we want to use that later.
2017-12-09 19:31:55 +00:00
Nicolas Dufresne
0cbe42af24
glmemory: Provide correct size on upload
...
Provide the right size to GL when uploading. Using maxsize is wrong
since we offset the data point with the memory offset and video
alignement offset.
https://bugzilla.gnome.org/show_bug.cgi?id=744246
2017-12-09 19:31:55 +00:00
Nicolas Dufresne
3405eec996
glmemory: Provide correct size on download
...
Provide the right size to GL when downloading. This fixes downloading
from GLMemory that where created for libav.
https://bugzilla.gnome.org/show_bug.cgi?id=744246
2017-12-09 19:31:55 +00:00
Nicolas Dufresne
33050939ff
glmemory: Use fallback for partial copy
...
When the memory is partial copy, the texture size and videoinfo no
longer make sense. As we cannot guess what the application wants, we
safely copy into a sysmem memory.
https://bugzilla.gnome.org/show_bug.cgi?id=744246
2017-12-09 19:31:55 +00:00
Nicolas Dufresne
de79830b05
glmemory: Add GstAllocationParams and alignment support
...
This implements support for GstAllocationParams and memory alignments.
The parameters where simply ignored which could lead to crash on
certain platform when used with libav and no luck.
https://bugzilla.gnome.org/show_bug.cgi?id=744246
2017-12-09 19:31:55 +00:00
Matthew Waters
05a4c89f25
glupload: perform egl upload on the gl thread
...
Fixes EGLImage usage on raspberry pi
https://bugzilla.gnome.org/show_bug.cgi?id=743914
2017-12-09 19:31:55 +00:00
Víctor Manuel Jáquez Leal
e3d457ec8e
glupload: Set freed method implementation to NULL
...
When trying to render buffers with meta:GLTextureUpload the glimagesink crashes
with a segmentation fault.
This patch workarounds this crash setting to NULL the method implementation
after free.
https://bugzilla.gnome.org/show_bug.cgi?id=745206
2017-12-09 19:31:55 +00:00
Edward Hervey
081f101f56
glwindow: Deactivate window before changing handle
...
When setting a new window handle, we need to ensure all implementations
will detect the change.
For that we deactivate the context before setting the window handle, then
reactivate the context
https://bugzilla.gnome.org/show_bug.cgi?id=745090
2017-12-09 19:31:55 +00:00
Edward Hervey
4fa2ddda96
gl/egl: Detect window handle changes
...
When (re)activating the context, the backing window handle might have changed.
If that happened, destroy the previous surface and create a new one
https://bugzilla.gnome.org/show_bug.cgi?id=745090
2017-12-09 19:31:55 +00:00
Luis de Bethencourt
6a515ab278
gl: remove docbook related warnings
2017-12-09 19:31:55 +00:00
Matthew Waters
fba2a2093f
glmemory: allow sharing between buffers
...
There was no real reason why the flag was set. We should be able
to handle it. Fixes last-sample handling on gl sinks
2017-12-09 19:31:55 +00:00
Matthew Waters
5acb75cdf4
glsyncmeta: add compat definition for gles2
2017-12-09 19:31:55 +00:00
Matthew Waters
1cf843292b
gl/calayer: don't use the async callback to render
...
not until we can provide equivalent functionality for other window
implementations.
2017-12-09 19:31:55 +00:00
Matthew Waters
844c0e77ee
glsyncmeta: also supported with gles3
2017-12-09 19:31:55 +00:00
Alessandro Decina
464b9e7680
libgstgl: eagl: handle CALayer resize
2017-12-09 19:31:55 +00:00