Jan Schmidt
46260654a4
glimagesink: Always display with requested stereo display mode
...
Even if the input is monoscopic, the app might want to display
it in a different layout, to do side-by-side for VR for example,
so if the app changes the output-multiview-mode always use that.
2018-02-09 18:16:04 +11:00
Nicolas Dufresne
17b118c120
glimagesink: Allow resetting render rectangle
...
As documented, passing -1 to x and/or y should reset the render
rectangle to the window/display size.
https://bugzilla.gnome.org/show_bug.cgi?id=792798
2018-01-30 09:58:14 +00:00
Nicolas Dufresne
3b317ea6c2
glimagesink: Add render-rectangle property
...
This allow controlling the render rectangle from gst-launch-1.0.
https://bugzilla.gnome.org/show_bug.cgi?id=792798
2018-01-30 09:58:14 +00:00
Haihua Hu
4fa5c37878
glimagesink: expose should do redisplay all the time
...
when using internal window, window resize should work
when pause state, but expose only do redisplay when
window_id is valid. So expose should do redisplay all
the time.
https://bugzilla.gnome.org/show_bug.cgi?id=787394
2017-12-09 19:32:30 +00:00
Nicolas Dufresne
707385690d
Request minimum buffer even if need_pool is FALSE
...
When tee is used, it will not request a pool, but still it wants to
know how many buffers are required.
https://bugzilla.gnome.org/show_bug.cgi?id=730758
2017-12-09 19:32:30 +00:00
Matthew Waters
21252d450c
glutils: fix matrix operations everywhere
...
- correct the matrix multiplication
- Use column-major matrices
- reverse order of matrix multiplications
https://bugzilla.gnome.org/show_bug.cgi?id=785980
2017-12-09 19:32:30 +00:00
Thibault Saunier
95ac4d5175
docs: Port all docstring to gtk-doc markdown
2017-12-09 19:32:27 +00:00
Matthew Waters
61ee2685c0
gl: GL_ARRAY_BUFFER is not a part of VAO state
...
As a result we need to bind it on every draw in order to have the
correct state in the GL state machine.
2017-12-09 19:32:27 +00:00
Sebastian Dröge
dc28155e21
gl: Rename gst_gl_get_affine_transformation_meta_as_ndc_ext() to prevent symbol conflict
...
The same symbol also exists in libgstgl, although marked as private and
internal. This has no effect when doing static linking and there's a
symbol conflict.
2017-12-09 19:32:26 +00:00
Matthew Waters
69da104456
glutils: document functions
2017-12-09 19:32:26 +00:00
Matthew Waters
ceda9dc1aa
gl/utils: also take care of the local GL context in query functions
...
Simplifies a deduplicates a lot of code in elements retrieving/setting
the local OpenGL context.
2017-12-09 19:32:26 +00:00
Matthew Waters
2b89a2c348
glwindow: remove is_running() function
...
It isn't necessary in correctly written programs.
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
Haihua Hu
e41e98a127
glimagesink: Fix horizontal/vertical flip matrizes
...
They were swapped.
https://bugzilla.gnome.org/show_bug.cgi?id=769371
2017-12-09 19:32:21 +00:00
Matthew Waters
3c1c5e9d83
glcontext: remove not thread-safe get/set_error()
...
Use GError's instead if necessary.
2017-12-09 19:32:21 +00:00
Haihua Hu
3cf27dd1c8
glimagesink: support video rotation using transform matrix
...
Add "rotate-method" to glimagesink and apply transform matrix
to vertex coordinate to control rotation.
https://bugzilla.gnome.org/show_bug.cgi?id=765795
2017-12-09 19:32:20 +00:00
Matthew Waters
2d62b2910c
gl: take the affine transformation in NDC
...
Provide a function to get the affine matrix in the meta in terms of NDC
coordinates and use as a standard opengl matrix.
Also advertise support for the affine transformation meta in the allocation
query.
2017-12-09 19:32:19 +00:00
Matthew Waters
5efc2e8705
gl/egl: replace gsteglimagememory with an EGLImage wrapper
...
That can be passed to GstGLMemoryEGL.
This also ports the dmabuf uploader to GstEGLImage and GstGLMemoryEGL.
2017-12-09 19:32:19 +00:00
Sebastian Dröge
139ab08cde
glimagesink: Fix indentation
2017-12-09 19:32:19 +00:00
Haihua Hu
b43af664bc
glimagesink: need to clean window_id when state change form READY to NULL
...
When application change pipeline state NULL->READY and then READY->NULL,
glimagesink will not clear glsink->window_id. After that, when application
change state NULL->READY, the new_window_id is equal to window_id, glimagesink
will not set window handle. It will use the internal window but not the window
create by application.
https://bugzilla.gnome.org/show_bug.cgi?id=765241
2017-12-09 19:32:19 +00:00
Matthew Waters
9829245b2b
glimagesink: support the affine transformation meta for any texture target
2017-12-09 19:32:18 +00:00
Vineeth TM
e92bbb2a83
bad: use new gst_element_class_add_static_pad_template()
...
https://bugzilla.gnome.org/show_bug.cgi?id=763081
2017-12-09 19:32:18 +00:00
Vineeth TM
cd696a0b79
glimagesink: Fix window memory leak
...
https://bugzilla.gnome.org/show_bug.cgi?id=763356
2017-12-09 19:32:17 +00:00
Matthew Waters
9ac6c546de
glimagesink: remove unsed reconfigure variable
2017-12-09 19:32:16 +00:00
Matthew Waters
5694cdd8ca
glimagesink: don't push a reconfigure event from the GL thread
...
Doing so may cause deadlocks when other elements attempt destroy or created
GL resources.
https://bugzilla.gnome.org/show_bug.cgi?id=760559
2017-12-09 19:32:16 +00:00
Matthew Waters
b25ce3f334
glimagesink: remove reduntant glimagesink from debug logging
2017-12-09 19:32:14 +00:00
Florent Thiéry
f18d14db45
glimagesink: Post unhandled navigation events on the bus
...
Based off xvimagesink implementation
https://bugzilla.gnome.org/show_bug.cgi?id=759869
2017-12-09 19:32:13 +00:00
Lubosz Sarnecki
dbcea228b2
glimagesink: Show error when video frame is not mapped.
...
Adds more meaningful error than
"Failed to convert multiview video buffer", which is always used
when prepare_next_buffer() fails in gst_glimage_sink_prepare().
https://bugzilla.gnome.org/show_bug.cgi?id=743345
2017-12-09 19:32:13 +00:00
Matthew Waters
09677a4d30
glimagesink: don't deadlock on resize
...
Performing any GL function marshalling off the GL thread with glimagesink's
render lock is prone to deadlocks between the GL thread and the non-GL thread.
What can happen is this:
1. non-GL thread attempts to function marshal to the GL thread.
2. while 1 is happening, the winsys gives an event (say resize)
3. This calls back into glimagesink which taks the render lock.
4. As the GL function marshalling is attempting to run on the GL
and already has glimagesink's render lock locked. This deadlocks
as the threads are waiting for each other.
2017-12-09 19:32:13 +00:00
Sebastian Dröge
c9fafe8445
glimagesink: Remove unused variable
...
gstglimagesink.c: In function 'gst_glimage_sink_on_draw':
gstglimagesink.c:1959:18: error: unused variable 'sync_meta' [-Werror=unused-variable]
GstGLSyncMeta *sync_meta = NULL;
^
2017-12-09 19:32:11 +00:00
Matthew Waters
9fd665c90d
glimagesink: wait on the correct sync meta when rendering
2017-12-09 19:32:11 +00:00
Matthew Waters
ad237e792e
glimagesink: add support for rendering external-oes textures
...
https://bugzilla.gnome.org/show_bug.cgi?id=757285
2017-12-09 19:32:11 +00:00
Vineeth TM
15d9267ed5
glimagesink: Fix structure memory leak
...
https://bugzilla.gnome.org/show_bug.cgi?id=758205
2017-12-09 19:32:11 +00:00
Matthew Waters
b8c1ecf268
glviewconvert: remove set_format
...
We need the caps to be able to
1. check the caps features
2. get the requested texture-target on input/output
2017-12-09 19:32:11 +00:00
Matthew Waters
bb1ae9042b
glimagesink: fix a memory leak if the view conversion fails
2017-12-09 19:32:11 +00:00
Matthew Waters
7c52793e7c
glimagesink: balance the creation/destruction of the overlay compositor
...
Fixes some leaks/possible segfault on when failing to create the compositor.
2017-12-09 19:32:11 +00:00
Matthew Waters
c4452041a8
glimagesink: wait on the provided sync meta provided to glimagesink
2017-12-09 19:32:10 +00:00
Matthew Waters
681cb5b16d
glmemory: add support for rectangle textures
...
Add the various tokens/strings for the differnet texture types (2D, rect, oes)
Changes the GLmemory api to include the GstGLTextureTarget in all relevant
functions.
Update the relevant caps/templates for 2D only textures.
2017-12-09 19:32:10 +00:00
Matthew Waters
c3b69f3478
glimagesink: create a context in NULL_READY
...
So that it's possible for decoders et al. to request the OpenGL context
in their READY_PAUSED transition with decodebin/playbin.
2017-12-09 19:32:09 +00:00
Matthew Waters
06de6998e5
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'
2017-12-09 19:32:09 +00:00
Matthew Waters
f688a8f0b2
glshader: port to using GstGLSLStage objects for string management
...
A GstGLShader is now simply a collection of stages that are
compiled and linked together into a program. The uniform/attribute
interface has remained the same.
2017-12-09 19:32:09 +00:00
Matthew Waters
8187171908
gl: chain up to the parent class for GstElement::set_context
...
https://bugzilla.gnome.org/show_bug.cgi?id=705579
2017-12-09 19:32:08 +00:00
Matthew Waters
bf98930546
gl: sprinkle some debug markers to ease debugging
2017-12-09 19:32:08 +00:00
Matthew Waters
25c109f850
glimagesink: request a resize on caps/3d mode changes
...
Fixes incorrect aspect ratio on OSX when changing caps or the 3d
output mode.
https://bugzilla.gnome.org/show_bug.cgi?id=755111
2017-12-09 19:32:08 +00:00
Matthew Waters
b537e98ae7
glimagesink: avoid updating the viewport in the draw loop
...
Fixes flashes/incorrect aspect ratio when resizing glimagesink on OSX.
2017-12-09 19:32:08 +00:00
Nicolas Dufresne
369acd42c9
glimagesink: update display size before sending event
...
This is minor issue, as the reconfigure event is asynchronous.
Basically, update width/height before sending the event.
2017-12-09 19:32:08 +00:00
Nicolas Dufresne
a342d95ca6
glsink: Enable sync meta on pools we offer
...
As the upload is asynchronous, we need to enable the sync meta to
gain correct rendering. The buffer pool receiver don't know about
that.
2017-12-09 19:32:07 +00:00
Nicolas Dufresne
a3a0e0db30
glimagesink: Move overlay rendering after video rendering
...
This is mostly cosmetic, but heoretically it reduces the amount of
required object in the context at one point. It also avoids potential
conflicts.
2017-12-09 19:32:07 +00:00
Matthew Waters
83716a0586
glimagesink: take into account non 1/1 par for navigation
...
The current code was ignoring the par/dar aspect when transforming
from window coordinates to stream coordinates resulting in incorrect
coordinates being sent upstream in the navigation events.
2017-12-09 19:32:07 +00:00
Tim-Philipp Müller
0a2f2426b0
glimagesink: fix allocation meta structure leak
...
gst_query_add_allocation_meta() does not take ownership
of the structure, for some reason.
CID 1312135
2017-12-09 19:32:06 +00:00