Nicola Murino
dd928efa51
glimagesink: fix memleak
...
https://bugzilla.gnome.org/show_bug.cgi?id=743142
2017-12-09 19:31:52 +00:00
Matthew Waters
02fdc64844
glvideomixer: don't upload if alpha <= 0
...
Implemented using a upload_buffer vfunc within GstGLMixer allowing
NULL uploaded buffers.
2017-12-09 19:31:52 +00:00
Matthew Waters
1dfeae2c42
gl: split glcolorconvert usage from glupload
...
the separation allows the transfer operation to occur in a separate
thread/time which may increase performance in specific circumstances.
2017-12-09 19:31:52 +00:00
Tim-Philipp Müller
3c3ca1c842
glmixer, glvideomixer: update for GstAggregatorPadForeachFunc change
2017-12-09 19:31:52 +00:00
Tim-Philipp Müller
36b4984be2
glmixer: update for aggregator start/stop vfunc change
2017-12-09 19:31:52 +00:00
Nirbheek Chauhan
c1b1f546d5
glvideomixer: Point to compositor for the pad properties documentation
2017-12-09 19:31:52 +00:00
Nicolas Dufresne
a1e02726ee
gl: Add support for GstVideoAlignment
...
This allow saving a copy with libav video decoders or decoders with
similar padding requirement.
https://bugzilla.gnome.org/show_bug.cgi?id=740900
2017-12-09 19:31:52 +00:00
Matthew Waters
f8611d79d7
glfiltercube: use a shader everywhere
2017-12-09 19:31:52 +00:00
Matthew Waters
ba3a3cd783
gl: fixup vao and vbo usage for legacy GL
2017-12-09 19:31:52 +00:00
Matthew Waters
b428dec737
gleffects: don't abort when setting the effect to 0,1,2
2017-12-09 19:31:52 +00:00
Ramprakash Jelari
67b47921ca
gl: Rename gst-launch-0.10 to gst-launch-1.0 in docs
2017-12-09 19:31:51 +00:00
Matthew Waters
dee5943c0e
glimagesink: properly handle the !opengl3 case
...
https://bugzilla.gnome.org/show_bug.cgi?id=740012
2017-12-09 19:31:51 +00:00
Tim-Philipp Müller
fb6a514562
glfilterapp: fix unused variable compiler warning
...
When GST_GL_HAVE_OPENGL is 0 or unset.
2017-12-09 19:31:51 +00:00
Matthew Waters
869106454a
glfilterapp is now available on gles2 as well so build it
2017-12-09 19:31:51 +00:00
Matthew Waters
83b6572928
gl: fix typo in #if
...
GST_GL_API_HAVE_OPENGL doesn't exist
2017-12-09 19:31:51 +00:00
Matthew Waters
3be1edc634
gl: fix various build errors without desktop gl
2017-12-09 19:31:51 +00:00
Matthew Waters
4bd62ebb03
gldisplay: implement runtime GL api filtering
...
Needed so that the pipeline/application can limit the choice of GL api
to what it supports
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
Matthew Waters
6bb113f685
gl: add a sync meta for synchronizing across GL contexts
...
A context can create a GLsync object that can be waited on in order
to ensure that GL resources created in one context are able to be
used in another shared context without any chance of reading invalid
data.
This meta would be placed on buffers that are known to cross from
one context to another. The receiving element would then wait
on the sync object to ensure that the data to be used is complete.
2017-12-09 19:31:51 +00:00
Matthew Waters
f016bc4679
glfilterapp: port to gles2 and gl3
2017-12-09 19:31:51 +00:00
Matthew Waters
eff381b93d
gloverlay: support gl3
2017-12-09 19:31:51 +00:00
Matthew Waters
65c89e07fb
glvideomixer: add support for gl3
2017-12-09 19:31:51 +00:00
Matthew Waters
cc2eb41497
glfiltercube: add a gl3 code path
2017-12-09 19:31:51 +00:00
Matthew Waters
9dfd234fec
glfiltershader: support gl3
2017-12-09 19:31:51 +00:00
Matthew Waters
f99e9d01a9
gltransformation: support gl3
2017-12-09 19:31:51 +00:00
Matthew Waters
a82db7eb9e
gleffects: support gl3 whereever gles2 is supported
2017-12-09 19:31:51 +00:00
Matthew Waters
7ffe6fa93e
glcolorscale: support gl3
2017-12-09 19:31:51 +00:00
Matthew Waters
96e5304517
glimagesink: use vbo's and vao's for gl3
2017-12-09 19:31:50 +00:00
Thibault Saunier
d3fef37d61
videoaggregator: Expose vmethods to set converters and prepare/clean frames
...
This gives more flexibility to the subclasses and permits to remove the
GstVideoAggregatorClass->disable_frame_conversion ugly API.
WARNING: This breaks the API as it removes the disable_frame_conversion
field
API:
+ GstVideoAggregatorClass->find_best_format
+ GstVideoAggregatorPadClass->set_format
+ GstVideoAggregatorPadClass->prepare_frame
+ GstVideoAggregatorPadClass->clean_frame
- GstVideoAggregatorClass->disable_frame_conversion
https://bugzilla.gnome.org/show_bug.cgi?id=740768
2017-12-09 19:31:50 +00:00
Matthew Waters
55977523b0
glimagesink: only attempt a resize when the window has already resized
...
fixes a black startup screen on wayland
2017-12-09 19:31:50 +00:00
Matthew Waters
00506bf183
glupload: rearchitecture for non GLMemory inputs/outputs
...
Allows other memory types to be implemented/returned/used by the caller.
2017-12-09 19:31:50 +00:00
Vineeth T M
1716e8c481
glimagesink: critical error while seek playback-test(stop state)
...
If we seek when media is in stop state, playback-test gives
critical error, since context of glimagesink is destroyed during stop.
But since context is not present, we need not handle send_event in glimagesink
Hence adding a condition to check if context is valid.
https://bugzilla.gnome.org/show_bug.cgi?id=740305
2017-12-09 19:31:50 +00:00
Matthew Waters
3455b050c2
glmixer: add read-only context property
2017-12-09 19:31:50 +00:00
Matthew Waters
f0c118c77a
glimagesink: don't set the upload to NULL on the drain query
...
https://bugzilla.gnome.org/show_bug.cgi?id=732694
2017-12-09 19:31:50 +00:00
Julien Isorce
c72498af92
glimagesink: release stored buffers on drain query
...
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732694
2017-12-09 19:31:49 +00:00
Matthew Waters
af9b73043e
gl: remove the width/height fields from the caps to support frame resizing
...
It was previously only occuring with sysmem caps features
https://bugzilla.gnome.org/show_bug.cgi?id=739334
2017-12-09 19:31:49 +00:00
Alessandro Decina
c3612847ef
glimagesink: don't make gst_glimage_sink_handle_events call _ensure_gl_setup
...
gst_glimage_sink_handle_events can be called from the overlay interface and from
the main thread before GL is setup. Before this change, that would call
_ensure_gl_setup() and deadlock on OSX.
Change things so that it's always safe to call gst_glimage_sink_handle_events()
without stuff deadlocking.
2017-12-09 19:31:49 +00:00
Alessandro Decina
ab8990c89f
glimagesink: fix possible deadlock on osx
...
Remove gst_glimage_sink_handle_events call in gst_glimage_sink_init. It was
unnecessary and when the element was instantiated from the main thread, caused a
deadlock in OSX creating the context (thread).
2017-12-09 19:31:49 +00:00
Matthew Waters
d9b724a3d2
glimagesink: clamp the resize width/height to >= 1 to avoid a GL error
2017-12-09 19:31:49 +00:00
Lubosz Sarnecki
64dd17bde6
glimagesink: implement gst_video_overlay_handle_events
...
https://bugzilla.gnome.org/show_bug.cgi?id=736035
2017-12-09 19:31:49 +00:00
Matthew Waters
0fa95fe809
glimagesink: resize the viewport correctly on a caps change
...
with force-aspect-ratio=true, if the width or height changed, the
viewport wasn't being updated to respect the new video width and height
until a resize occured.
2017-12-09 19:31:49 +00:00
Matthew Waters
b06ca547d6
glmixer: advertise support for changing input caps mid-stream
...
https://bugzilla.gnome.org/show_bug.cgi?id=739334
2017-12-09 19:31:49 +00:00
Matthew Waters
4a8b7c9193
glmixer: don't get the current caps from GstVideoInfo for the srcpad
...
It's missing the caps features needed.
2017-12-09 19:31:49 +00:00
Lubosz Sarnecki
e173ab2b9d
satisfy gst-indent
2017-12-09 19:31:49 +00:00
Jan Schmidt
1a25f7e44a
glfiltercube: Fix typo in property description
2017-12-09 19:31:49 +00:00
Wang Xin-yu (王昕宇)
10eb848d57
glmixer:fix incorrect parameter passed to handle_set_context
2017-12-09 19:31:48 +00:00
Matthew Waters
0b2e5c3f95
glmixer: override the caps query in order to 'convert' capsfeatures
...
Otherwise, it is only possible for the sink pads and the src pads to
have the exact same caps features. We can convert from any feature
to another feature so support that.
2017-12-09 19:31:48 +00:00
Matthew Waters
1bd6e87cfc
glmixer: override the accept caps query in order to 'convert' capsfeatures
...
Otherwise, it is only possible for the sink pads and the src pads to
have the exact same caps features. We can convert from any feature
to another feature so support that.
2017-12-09 19:31:48 +00:00
Matthew Waters
62e3c40d97
gl: propogate other-context using GstContext
2017-12-09 19:31:48 +00:00
Matthew Waters
f0426043ce
glmixer: fixup eglimage include path
2017-12-09 19:31:48 +00:00
Matthew Waters
0806de5c75
glbufferpool: add the GstVideoGLTextureUploadMeta buffer pool option
2017-12-09 19:31:48 +00:00
Matthew Waters
3cccd77d5d
videoaggregator: operate on caps rather than video info
...
Otherwise the CapsFeatures will be lost along with the possibility
of multiple output types and formats.
https://bugzilla.gnome.org/show_bug.cgi?id=738129
2017-12-09 19:31:48 +00:00
Matthew Waters
ed6be7fead
gldeinterlace: ref the uploaded buffer
...
Instead of the possibly non-GL input buffer.
2017-12-09 19:31:48 +00:00
Sebastian Dröge
22a1ec13b6
glimagesink: Only finalize the other context in finalize()
...
Otherwise we change a value of a property when going to READY state,
which is unexpected behaviour.
2017-12-09 19:31:48 +00:00
Sebastian Dröge
3eab72f409
glmixer: Call the pad's parent class finalize method
2017-12-09 19:31:48 +00:00
Sebastian Dröge
aed7da3d12
glmixer: Only finalize the other context in finalize()
...
Otherwise we change a value of a property when going to READY state,
which is unexpected behaviour.
2017-12-09 19:31:48 +00:00
Sebastian Dröge
c46c642fd3
gltestsrc: Add other-context property
2017-12-09 19:31:48 +00:00
Sebastian Dröge
3b9b30563e
glimagesink: Don't leak other-context
2017-12-09 19:31:48 +00:00
Sebastian Dröge
9d1df014fd
glmixer: Add other-context property
2017-12-09 19:31:48 +00:00
Vivia Nikolaidou
4fa5392e14
gloverlay: And fix another unused variable compiler warning
2017-12-09 19:31:48 +00:00
Vivia Nikolaidou
53213d924e
gloverlay: Fix unused variable compiler warning when compiling without desktop GL
2017-12-09 19:31:48 +00:00
Wang Xin-yu (王昕宇)
924e017bda
gltestsrc: implement checkers pattern with GLSL
...
https://bugzilla.gnome.org/show_bug.cgi?id=737505
2017-12-09 19:31:48 +00:00
Lubosz Sarnecki
28d4d57180
gltransformation: graphene multiplication order has changed
...
https://bugzilla.gnome.org/show_bug.cgi?id=733510
2017-12-09 19:31:47 +00:00
Matthew Waters
d30a476c1c
glvideomixer: update element documentation
2017-12-09 19:31:47 +00:00
Matthew Waters
aeb60d850d
Revert accidental push: "gltestsrc: implement checkers pattern with GLSL"
...
This reverts commit eae09179f0
.
2017-12-09 19:31:47 +00:00
Wang Xin-yu (王昕宇)
14f297b61c
gltestsrc: implement checkers pattern with GLSL
2017-12-09 19:31:47 +00:00
Matthew Waters
7d99c66ca5
gloverlay: fix zero output frames with YUY2/UYVY
...
also, be nice and disable blending for other elements
2017-12-09 19:31:47 +00:00
Matthew Waters
0e89ab4c91
gloverlay: protect desktop gl specific tokens with #if
2017-12-09 19:31:47 +00:00
Matthew Waters
f4afec4657
gloverlay: free the image memory every time the location changes
...
fixes a memory leak
2017-12-09 19:31:47 +00:00
Sebastian Dröge
17fa8eac04
gloverlay: Include into the build with GLES2 only too
2017-12-09 19:31:47 +00:00
Matthew Waters
1c4e5c2aeb
gltestsrc: free the shader on stop
2017-12-09 19:31:47 +00:00
Matthew Waters
f5006bdf09
glvideomixer: fix blending with low-alpha sources
...
We also need to apply the blend paramaters to the alpha channel otherwise
the output of the blend will appear black at low alpha values (< 0.2).
2017-12-09 19:31:46 +00:00
Matthew Waters
96208c1694
gloverlay: reimplement everything
...
- update for shaders
- add alpha property
- image placement properties shamelessly borrowed from gdkpixbufoverlay
- image placement properties are GstController able
- use GstGLMemory for the overlay image data
- add support for gles2
2017-12-09 19:31:46 +00:00
Matthew Waters
07489f7b76
glvideomixer: skip input frames with an alpha of 0
2017-12-09 19:31:46 +00:00
Matthew Waters
ae919f4475
gl: download whenever we have sysmem capsfeatures
...
Otherwise we could pass on a RGBA formatted buffer and downstream would
misinterpret that as some other video format.
Fixes pipelines of the form
gleffects ! tee ! xvimagesink
2017-12-09 19:31:46 +00:00
Lubosz Sarnecki
3fcfcbbb87
gltestsrc: add Mandelbrot fractal pattern.
...
https://bugzilla.gnome.org/show_bug.cgi?id=735131
2017-12-09 19:31:46 +00:00
Lubosz Sarnecki
67732e4883
gltestsrc: implement snow pattern with GLSL.
...
https://bugzilla.gnome.org/show_bug.cgi?id=735131
2017-12-09 19:31:46 +00:00
Matthew Waters
6491af9ffc
glupload: provide the output buffer that is rendered into
...
Allows callers to properly reference count the buffers used for
rendering.
Fixes a redraw race in glimagesink where the previous buffer
(the one used for redraw operations) is freed as soon as the next
buffer is uploaded.
1. glimagesink uploads in _prepare() to texture n
1.1 glupload holds buffer n
2. glimagesink _render()s texture n
3. glimagesink uploads texture n+1
3.1 glupload free previous buffer which deletes texture n
3.2 glupload holds buffer n+1
4. glwindow resize/expose
5. glimagesink redraws with texture n
The race is that the buffer n (the one used for redrawing) is freed as soon as
the buffer n+1 arrives. There could be any amount of time and number of
redraws between this event and when buffer n+1 is actually rendered and thus
replaces buffer n as the redraw source.
https://bugzilla.gnome.org/show_bug.cgi?id=736740
2017-12-09 19:31:46 +00:00
Sanjay NM
4f6e9f4e41
gl: Removed unreachable break, unused variable
...
https://bugzilla.gnome.org/show_bug.cgi?id=736957
2017-12-09 19:31:46 +00:00
Ognyan Tonchev
3a70f04113
gltestsrc: do not leak pool in error cases
...
https://bugzilla.gnome.org/show_bug.cgi?id=736730
2017-12-09 19:31:46 +00:00
Ognyan Tonchev
276b682559
glmixer: do not leak pool in error cases
...
https://bugzilla.gnome.org/show_bug.cgi?id=736729
2017-12-09 19:31:46 +00:00
Lubosz Sarnecki
e3aa918032
gltransformation: fix issues and expose mvp matrix
...
* aspect should not be 0 on init
* rename fovy to fov
* add mvp to properties as boxed graphene type
* fix transformation order. scale first
* clear color with 1.0 alpha
https://bugzilla.gnome.org/show_bug.cgi?id=734223
2017-12-09 19:31:46 +00:00
Sebastian Dröge
2c0f8e1107
glimagesink: Add missing break to switch
...
CID 1232801
2017-12-09 19:31:46 +00:00
Lubosz Sarnecki
e266f6517d
glimagesink: expose context
...
* expose context in draw / reshape callbacks
* add context property
https://bugzilla.gnome.org/show_bug.cgi?id=734482
2017-12-09 19:31:45 +00:00
Matthew Waters
94efcd2595
glmixer: unref the GstGLUpload in the pad if freed while running
...
Dynamic pipelines that get and release the sink pads will finalize
the pad without going through gst_gl_mixer_stop() which is where the
upload object is usually freed. Don't leak objects in such case.
2017-12-09 19:31:45 +00:00
Wang Xin-yu (王昕宇)
922cb97758
glvideomixer: avoid gl resource race condition between different thread
...
https://bugzilla.gnome.org/show_bug.cgi?id=734830
2017-12-09 19:31:45 +00:00
Matthew Waters
c9d63878dd
glvideomixer: don't clobber unnecessary GstVideoInfo fields
...
otherwise we might clobber other important fields such as the frame rate.
2017-12-09 19:31:45 +00:00
Matthew Waters
fc1b2298d6
glvideomixer: get the attribute from the correct shader
2017-12-09 19:31:45 +00:00
Matthew Waters
beb9b95d39
glimagesink: unref the window on navigation event
...
plugs a memory leak
2017-12-09 19:31:45 +00:00
Tim-Philipp Müller
6bbcefe029
opengl: update element docs for 1.x
2017-12-09 19:31:45 +00:00
Matthew Waters
e18905d057
glvideomixer: add a background property
...
That's compatible with the compositor/videomixer property
https://bugzilla.gnome.org/show_bug.cgi?id=731954
2017-12-09 19:31:45 +00:00
Vasilis Liaskovitis
7b1a853888
GstGLWindow, GstGLImagesink, x11: Scale navigation events on resized windows
...
If window is resized, GstStructure pointer values have to be rescaled to
original geometry. A get_surface_dimensions GLWindow class method is added for
this purpose and used in the navigation send_event function.
https://bugzilla.gnome.org/show_bug.cgi?id=703486
2017-12-09 19:31:45 +00:00
Matthew Waters
d3804ee7aa
gl: document GST_GL_* environment variables
...
https://bugzilla.gnome.org/show_bug.cgi?id=733245
2017-12-09 19:31:45 +00:00
Matthew Waters
84a50aefe1
glimagesink: keep the uploaded buffer around on successful redisplay
...
We might need it later to perform a redisplay. GstGLUpload will take
of releasing the previous buffer when it receives a new buffer.
https://bugzilla.gnome.org/show_bug.cgi?id=733726
2017-12-09 19:31:44 +00:00
Matthew Waters
e6d5dd04d5
glimagesink: silence gsignal warning
...
instance '0xblah' has no handler with id '13'
2017-12-09 19:31:44 +00:00
Matthew Waters
884be3de11
glimagesink: remove extra argument from debug call
2017-12-09 19:31:44 +00:00
Vasilis Liaskovitis
c064e4e75e
glimagesink: Add navigation interface and callbacks for GstGLWindow mouse/key signals
...
https://bugzilla.gnome.org/show_bug.cgi?id=703486
2017-12-09 19:31:44 +00:00
Wang Xin-yu (王昕宇)
2ce11e4bac
gl: fix multi gl object leaks
...
1. fix FBO leaks in decide_allocation
2. fix texture leaks in decide_allocation and reset
3. fix texture leaks in FBO incomplete error path
2017-12-09 19:31:44 +00:00
Sebastian Dröge
f942221ebd
gl: Always build gstglmixer, not only when full OpenGL support is enabled
2017-12-09 19:31:44 +00:00
Sebastian Dröge
b02a6a98b2
gl: Link to all required libraries but not more
2017-12-09 19:31:44 +00:00