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
Nicolas Dufresne
1812c19291
composition-overlay: Positions are relative to texture
...
The coordinate are relative to the texture dimension and not
the window dimension now. There is no need to pass the window
dimension or to update the overlay if the dimension changes.
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2017-12-09 19:32:06 +00:00
Lubosz Sarnecki
8abd2bbe35
gloverlaycompositor: Create own shader object
...
Make gloverlaycompositor independent of the shader used in the sink.
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2017-12-09 19:32:06 +00:00
Nicolas Dufresne
1fae4b199a
glimagesink: Properly handle compsositor life time
...
Should be created in READY_TO_PAUSED, not PAUSED_TO_PLAYING.
Should be cleared in PAUSED_TO_READY.
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2017-12-09 19:32:06 +00:00
Lubosz Sarnecki
91d4cfe2b0
glimagesink: Send reconfigure event when window size changes
...
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2017-12-09 19:32:06 +00:00
Lubosz Sarnecki
052b0a1caf
glimagesinkbin: Add allocation query for GstVideoOverlayComposition
...
Adds an GST_VIDEO_OVERLAY_COMPOSITION_META_API_TYPE query to glupload
and glimagesink. Detects the query from the downstream elements, so
it is executed only when downstream supports the overlay API.
This makes pipelines with textoverlay ! glupload ! gldownload ! xvimagesink possible.
Uses allocation meta struct for passing the window size upstream.
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2017-12-09 19:32:06 +00:00
Lubosz Sarnecki
dc47e6d3c0
glimagesinkbin: Add GstVideoOverlayCompositionMeta caps features
...
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2017-12-09 19:32:06 +00:00
Lubosz Sarnecki
1c0ddbd9a8
glimagesink: Upload and draw overlays with GstGLOverlayCompositor
...
Receives the GstOverlayComposition buffer in the glimagesink and draws them.
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2017-12-09 19:32:06 +00:00
Vineeth TM
5229b50125
glimagesink: use g_clear_error instead of g_error_free
...
replace g_error_free with g_clear_error, as it internally
checks if error variable is valid or not.
https://bugzilla.gnome.org/show_bug.cgi?id=751823
2017-12-09 19:32:05 +00:00
Nicolas Dufresne
0f3c34f05f
glimagesink: Don't leak pool
...
gst_query_add_allocation_pool is transfer none. Also unref
if there was a configuration error.
2017-12-09 19:32:05 +00:00
Julien Isorce
76983d4454
gldisplay: add gst_gl_display_create_context
...
It also emits a create-context signal so that an application
can provide an external GstGLContext backend.
https://bugzilla.gnome.org/show_bug.cgi?id=750310
2017-12-09 19:32:04 +00:00
Julien Isorce
e29e67fa6e
Revert "gl: add GstGLContextGPUProcess backend"
...
This reverts commit b377112ee3
.
2017-12-09 19:32:04 +00:00
Jan Schmidt
dad74d40e1
glimagesink: Remove duplicate, useless line of code
2017-12-09 19:32:04 +00:00
Jan Schmidt
77676ffc90
glimagesink: Support multiview/stereoscopic video
...
Support video with multiview info in the caps, transform
it to mono anaglyph by default, but allow for configuring
other output modes and handoff to the app via
the draw signal.
https://bugzilla.gnome.org/show_bug.cgi?id=611157
2017-12-09 19:32:04 +00:00
Matthew Waters
5276b7ccbf
glimagesink: add missing handle-events/ignore-alpha property to the bin
2017-12-09 19:32:04 +00:00
Nicolas Dufresne
ccc410e73c
glimagesink: Don't do pool caching
...
We now know that pool caching can cause renegotiation issues
when an element in the pipeline change from passthrough to not
passthrough. As it's not needed, don't cache existing pools.
https://bugzilla.gnome.org/show_bug.cgi?id=748344
2017-12-09 19:32:04 +00:00
Matthew Waters
dffa2857d7
gl: move basesink properties from glimagesinkbin to glsinkbin
2017-12-09 19:32:04 +00:00
Matthew Waters
6c56aba687
glwindow: handle gst_video_overlay_set_render_rectangle
2017-12-09 19:32:03 +00:00
Julien Isorce
238edceda4
gl: add GstGLContextGPUProcess backend
...
It builds its GL vtable from a proc address provided
by the application.
2017-12-09 19:32:02 +00:00
Matthew Waters
f272500ccb
glimagesink: correctly use the sync meta across multiple contexts
...
1. Set the sync point after the (possible) upload has occured
2. Wait in the correct GL context (the draw context)
Note: We don't add the GL sync meta to the input buffer as it's not
writable and a copy would be expensive.
2017-12-09 19:32:01 +00:00
Matthew Waters
0e2fe3c2e9
glimagesink: free the vertex buffer when done
...
fixes a memory leak
2017-12-09 19:32:01 +00:00
Matthew Waters
72993f54fa
gl: remove useless gl{En,Dis}able (GL_TEXTURE_*) calls
...
We are using shaders everywhere and so they are not needed
2017-12-09 19:32:01 +00:00
Matthew Waters
ac793f691d
glimagesink: cleanup properties
...
remove unused "display-name"
ensure defaults between the bin/element are the same
2017-12-09 19:32:01 +00:00
Matthew Waters
65c57b77ff
gl: element buffers are part of vao state
...
Use them as such. They are also required for GL3 core profile support
with glDrawElements on OS X.
2017-12-09 19:32:01 +00:00
Matthew Waters
50d3161ac5
gl: don't deadlock on context creation failure
...
https://bugzilla.gnome.org/show_bug.cgi?id=749284
2017-12-09 19:32:01 +00:00
Sebastian Dröge
3353667212
Revert "Revert "glimagesink: add pixel-aspect-ratio property on the bin""
...
This reverts commit d96e43b034
.
2017-12-09 19:32:00 +00:00
Sebastian Dröge
b189e3fec3
Revert "Revert "glimagesink: forward ALL the properties on the bin""
...
This reverts commit 59fb0f830f
.
2017-12-09 19:32:00 +00:00
Sebastian Dröge
7304d3cc75
Revert "Revert "glimagesink: implement as a bin""
...
This reverts commit be938f92d9
.
2017-12-09 19:32:00 +00:00
Sebastian Dröge
51d3a0a059
Revert "gl: readd glupload/download onto element pads"
...
This reverts commit 87d8270f30
.
2017-12-09 19:32:00 +00:00
Matthew Waters
296397a8b1
glimagesink: handle the local_context query
...
so that upstream elements can get the GL context from glimagesink
2017-12-09 19:32:00 +00:00
Matthew Waters
343947f383
gl: readd glupload/download onto element pads
...
Allows insertion of gl elements into non-gl pipelines without converter
(upload/download) elements.
https://bugzilla.gnome.org/show_bug.cgi?id=743974
2017-12-09 19:32:00 +00:00
Matthew Waters
d9737138ef
Revert "glimagesink: implement as a bin"
...
This reverts commit 8a0017e21d
.
2017-12-09 19:32:00 +00:00
Matthew Waters
3b0efeb731
Revert "glimagesink: forward ALL the properties on the bin"
...
This reverts commit 4be45e5f30
.
2017-12-09 19:32:00 +00:00
Matthew Waters
0da6dbce81
Revert "glimagesink: add pixel-aspect-ratio property on the bin"
...
This reverts commit 2ba6bb9b93
.
2017-12-09 19:32:00 +00:00