Matthew Waters [Fri, 29 May 2015 08:06:27 +0000 (18:06 +1000)]
gl/wayland: implement setting the render rectangle
Places our subsurface at the rectangle provided position
Matthew Waters [Fri, 29 May 2015 08:03:52 +0000 (18:03 +1000)]
glwindow: handle gst_video_overlay_set_render_rectangle
Matthew Waters [Fri, 29 May 2015 08:01:29 +0000 (18:01 +1000)]
gl/wayland: don't block the event loop after poll
Use the dispatch_pending set of functions which just run the currently
queued up events instead of potentially waiting for an event to occur.
Matthew Waters [Wed, 27 May 2015 06:42:55 +0000 (16:42 +1000)]
tests/gl/gtk: implement setting a wayland display/surface
Matthew Waters [Wed, 27 May 2015 06:39:06 +0000 (16:39 +1000)]
gl/wayland: implement basic video overlay support via subsurfaces
Currently does not position the subsurface relative to the parent surface at all
Matthew Waters [Wed, 27 May 2015 05:44:33 +0000 (15:44 +1000)]
gl/wayland: allow a NULL wl_event_queue
perform operations on the default wl_display event queue in that case
Matthew Waters [Wed, 27 May 2015 05:43:06 +0000 (15:43 +1000)]
gl/utils: implement wayland display GstContext
requried for sharing GL contexts or subsurface support
Matthew Waters [Fri, 22 May 2015 06:07:49 +0000 (16:07 +1000)]
gl/wayland: run each window on a separate queue
Based on patch by Julien Isorce <julien.isorce@collabora.co.uk>
https://bugzilla.gnome.org/show_bug.cgi?id=709747
Jan Schmidt [Fri, 29 May 2015 16:19:25 +0000 (02:19 +1000)]
gl: Don't leak temp strings in _RGB_pixel_order()
Fix a memory leak of temporary strings when computing
swizzling of RGB formats.
Jan Schmidt [Fri, 29 May 2015 16:29:47 +0000 (02:29 +1000)]
glfilter: Add transform_internal_caps() vfunc
Add a vfunc that is called by glfilter before it sets
caps features and intersects with the peer caps, and
move removing the size from caps into its default
implementation. Allows sub-classes to do more
sophisticated management of the size fields in case they
don't support arbitrary resizing or have distinct
preferences.
Jan Schmidt [Fri, 29 May 2015 16:23:44 +0000 (02:23 +1000)]
glfilter: Don't remove size fields from caps
Instead of removing size fields, set them to the full range
like videoscale does, so the caps are clearly unfixed in
all cases.
Julien Isorce [Wed, 27 May 2015 09:58:10 +0000 (10:58 +0100)]
gl: add GstGLContextGPUProcess backend
It builds its GL vtable from a proc address provided
by the application.
Julien Isorce [Wed, 27 May 2015 15:28:39 +0000 (16:28 +0100)]
gl: add and use gst_gl_internal_format_rgba
Previously when compiling GstGL with both GL and GLES2,
GL_RGBA8 was picked from GL/gl.h. But a clash may happen at
runtime when one is selecting GLES2.
gst_gl_internal_format_rgba allows to check at runtime
if it should use GL_RGBA or GL_RGBA8.
Julien Isorce [Wed, 27 May 2015 13:10:16 +0000 (14:10 +0100)]
glwindow_x11: use parent default implementation
Julien Isorce [Wed, 27 May 2015 10:16:32 +0000 (11:16 +0100)]
glcontext_glx: rename variable from window to context
Julien Isorce [Wed, 27 May 2015 10:11:55 +0000 (11:11 +0100)]
glwindow: initialize debug in class_init
Useful if one uses gst_gl_window_x11_new directly
instead of gst_gl_window_new.
Julien Isorce [Wed, 27 May 2015 10:07:38 +0000 (11:07 +0100)]
glcontext: initialize debug in class_init
Useful if one uses gst_gl_context_egl_new directly
instead of gst_gl_context_new.
Julien Isorce [Wed, 27 May 2015 09:55:20 +0000 (10:55 +0100)]
glcontext: add gst_gl_context_set_display helper
Julien Isorce [Wed, 27 May 2015 14:25:40 +0000 (15:25 +0100)]
glcontext: add missing _CAST after G_TYPE_CHECK_CLASS
Julien Isorce [Wed, 27 May 2015 09:51:54 +0000 (10:51 +0100)]
glwindow: add missing _CAST after G_TYPE_CHECK_CLASS
Julien Isorce [Tue, 26 May 2015 17:38:39 +0000 (18:38 +0100)]
glwindow: provides some default implementations to factorize with all backends
Luis de Bethencourt [Wed, 27 May 2015 12:05:11 +0000 (13:05 +0100)]
gleffects: 'for' loop initial declaration
'for' loop initial declarations are not allowed in C89, moving the declarations
to before the 'for' loops.
Xavier Claessens [Tue, 26 May 2015 20:47:47 +0000 (16:47 -0400)]
gloverlay: fix a leak
https://bugzilla.gnome.org/show_bug.cgi?id=749846
Xavier Claessens [Tue, 26 May 2015 19:10:28 +0000 (15:10 -0400)]
gloverlay: properly handle errors while loading file
Post an error on the bus if anything bad happens while reading
and parsing the image file.
https://bugzilla.gnome.org/show_bug.cgi?id=749846
Xavier Claessens [Tue, 26 May 2015 19:04:34 +0000 (15:04 -0400)]
gloverlay: remove unused type_file field
https://bugzilla.gnome.org/show_bug.cgi?id=749846
Xavier Claessens [Tue, 26 May 2015 19:01:37 +0000 (15:01 -0400)]
gl: propagate return value from filter and filter_texture
https://bugzilla.gnome.org/show_bug.cgi?id=749846
Matthew Waters [Tue, 26 May 2015 02:47:40 +0000 (12:47 +1000)]
gleffects: properly initialize the shaders across contexts implementing multiple API's
Matthew Waters [Tue, 26 May 2015 02:44:47 +0000 (12:44 +1000)]
gleffects_laplacian: fix shader compilation in gl3/gles2
https://bugzilla.gnome.org/show_bug.cgi?id=748393
Matthew Waters [Fri, 22 May 2015 03:12:09 +0000 (13:12 +1000)]
gl/wayland: remove dead event source code
Matthew Waters [Thu, 21 May 2015 07:48:31 +0000 (17:48 +1000)]
gl/wayland: add GstGLDisplayWayland
Simple implementation split from GstGLWindowWayland
Can now have multiple glimagesink elements all displaying output
linked via GL or otherwise (barring GL platform limitations).
The intel driver is racy and can crash setting up the two glimagesink contexts.
e.g.
videotestsrc ! tee name=t ! queue ! glupload ! glimagesinkelement
t. ! queue ! gleffects_blur ! glimagesinkelement
videotestsrc ! glupload ! glfiltercube ! tee name=t ! queue ! glimagesinkelement
t. ! queue ! gleffects_blur ! glimagesinkelement
Matthew Waters [Mon, 25 May 2015 07:27:58 +0000 (17:27 +1000)]
gltransformation: fix DrawElements call for element array buffers
https://bugzilla.gnome.org/show_bug.cgi?id=749734
Matthew Waters [Fri, 22 May 2015 15:00:18 +0000 (01:00 +1000)]
gl/calayer: provide the exact GL api version for the wrapped context
Otherwise we could end up being mistaken for the diference between a
gl3 and a gl2 context resulting in a failure getting the list of
extensions from the wrapped context due to the difference between
glGetString and glGetStringi for the GL_EXTENSIONS token.
https://bugzilla.gnome.org/show_bug.cgi?id=749728
Xavier Claessens [Thu, 21 May 2015 19:30:34 +0000 (15:30 -0400)]
gl: win32: do not call SetParent in release_parent_win_id()
When called from gst_gl_window_win32_close(), internal window
could not exist, and if it does it's going to be destroyed just
after that anyway. Also it causes window_proc() to be called
and crash because it gets a NULL context.
When called from gst_gl_window_win32_set_window_handle() we are
going to set another parent anyway, and it's probably better to
reparent directly instead of passing by a NULL parent which could
cause the internal window to popup briefly.
https://bugzilla.gnome.org/show_bug.cgi?id=749601
Xavier Claessens [Thu, 21 May 2015 19:30:00 +0000 (15:30 -0400)]
gl: win32: remove unused code
https://bugzilla.gnome.org/show_bug.cgi?id=749601
Xavier Claessens [Wed, 20 May 2015 21:09:21 +0000 (17:09 -0400)]
gl: win32: fix crash when finalizing GstGLContext
gst_gl_context_finalize() is calling gst_gl_window_win32_quit()
which was posting a message. But then window_proc takes window's
context and get a NULL.
Now that we've got a GMainLoop we can do like other backends and
simply call g_main_loop_quit().
This also remove duplicated code to release the parent window and
potential crash there because parent_proc could be NULL if we never
created the internal window. That could happen for example if setting
state to READY then setting a window_handle, and go back to NULL state.
https://bugzilla.gnome.org/show_bug.cgi?id=749601
Xavier Claessens [Wed, 20 May 2015 21:06:42 +0000 (17:06 -0400)]
gl: win32: Fix leaked GstGLContext
https://bugzilla.gnome.org/show_bug.cgi?id=749601
Xavier Claessens [Wed, 20 May 2015 19:30:49 +0000 (15:30 -0400)]
gl: win32: set the parent window when creating internal window
When _set_window_handle() was called in READY state, it wasn't
set to the internal window created later.
https://bugzilla.gnome.org/show_bug.cgi?id=749601
Xavier Claessens [Wed, 20 May 2015 19:29:50 +0000 (15:29 -0400)]
gl: win32: use a GMainContext to dispatch win32 messages
gst_gl_window_win32_send_message_async() could be called before the
internal window is created so we cannot use PostMessage there.
x11 and wayland backends both create a custom GSource for this,
so there is no reason to not do that for win32.
https://bugzilla.gnome.org/show_bug.cgi?id=749601
Jan Schmidt [Thu, 21 May 2015 14:27:36 +0000 (00:27 +1000)]
glupload: Don't leak all memory uploaded via raw uploads.
Remove an extra ref missed when switching over to not
reusing output textures
Sebastian Dröge [Thu, 21 May 2015 13:24:48 +0000 (16:24 +0300)]
compositor/glvideomixer: Don't calculate PAR/DAR with unset GstVideoInfos
Otherwise we divide by zero.
Matthew Waters [Thu, 21 May 2015 05:05:33 +0000 (15:05 +1000)]
glcontext: require a shader version to initialize.
It's very near pointless to try our GL implementation without shaders.
https://bugzilla.gnome.org/show_bug.cgi?id=749284
Jan Schmidt [Tue, 19 May 2015 16:38:53 +0000 (02:38 +1000)]
Fix flags order in GL examples for uninstalled build
Matthew Waters [Wed, 20 May 2015 14:56:01 +0000 (00:56 +1000)]
compositor/glvideomixer: fix up par handling
We were using the wrong formula
https://bugzilla.gnome.org/show_bug.cgi?id=749634
Xavier Claessens [Tue, 19 May 2015 14:43:28 +0000 (10:43 -0400)]
gl: fix crash on windows with intel driver
https://bugzilla.gnome.org/show_bug.cgi?id=749430
Matthew Waters [Tue, 19 May 2015 14:50:37 +0000 (00:50 +1000)]
caopengllayersink: static const the indices array
the contents will never change anyway.
Matthew Waters [Tue, 19 May 2015 14:28:52 +0000 (00:28 +1000)]
caopengllayersink: 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.
Similar to the change with the same name for glimagesink
Matthew Waters [Tue, 19 May 2015 14:28:07 +0000 (00:28 +1000)]
caopengllayersink: update for GL3 element array buffer usage
fixes blank output
Matthew Waters [Tue, 19 May 2015 06:22:00 +0000 (16:22 +1000)]
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.
Matthew Waters [Tue, 19 May 2015 06:19:41 +0000 (16:19 +1000)]
gl/calayer: provide a current wrapped GstGLContext for callbacks
So that the draw and resize callbacks can get the current GstGLContext.
Matthew Waters [Tue, 19 May 2015 06:14:39 +0000 (16:14 +1000)]
glsyncmeta: ensure that the Fence is going to be executed
Otherwise it could stay client side without being submitted to the GL
server resulting in another context waiting on a Fence that will never
become signalled causing a deadlock.
Matthew Waters [Tue, 19 May 2015 01:47:23 +0000 (11:47 +1000)]
glupload: don't reuse output textures for raw data upload
Causes stale textures to be used further down the chain.
Matthew Waters [Tue, 19 May 2015 01:11:02 +0000 (11:11 +1000)]
glframebuffer: don't clear the framebuffer
Breaks attempting to blend with the destination buffer and should be done
explicitly by the callback anyway.
Matthew Waters [Tue, 19 May 2015 01:09:54 +0000 (11:09 +1000)]
glbasefilter: track gl_start/stop correctly
Don't start multiple times without calling gl_stop.
Matthew Waters [Thu, 14 May 2015 11:21:01 +0000 (21:21 +1000)]
glimagesink: free the vertex buffer when done
fixes a memory leak
Matthew Waters [Thu, 22 Jan 2015 07:00:36 +0000 (18:00 +1100)]
glcontext/cocoa: implement GL3 core context selection
Matthew Waters [Thu, 14 May 2015 08:35:35 +0000 (18:35 +1000)]
tests/gl: fix typo
Matthew Waters [Thu, 14 May 2015 06:42:09 +0000 (16:42 +1000)]
gl: remove useless gl{En,Dis}able (GL_TEXTURE_*) calls
We are using shaders everywhere and so they are not needed
Matthew Waters [Thu, 14 May 2015 05:10:59 +0000 (15:10 +1000)]
glimagesink: cleanup properties
remove unused "display-name"
ensure defaults between the bin/element are the same
Matthew Waters [Thu, 14 May 2015 04:56:30 +0000 (14:56 +1000)]
gleffects: only try the GL2 shader init path if we have a GL2 context
Matthew Waters [Tue, 12 May 2015 12:04:26 +0000 (22:04 +1000)]
glshader: attempt to detect the gles2 inside opengl3 case
This is necessary to use gles2 shaders in a GL 3 core context on
OS X which fails without a proper #version being set on the shaders.
Matthew Waters [Tue, 12 May 2015 07:55:43 +0000 (17:55 +1000)]
glshader: remove references to gl3 specific shaders
We rely specifically on gles2 shaders being supported by the GL
implementation with GL3 core profile.
Matthew Waters [Fri, 1 May 2015 02:04:28 +0000 (12:04 +1000)]
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.
Matthew Waters [Thu, 7 May 2015 05:25:10 +0000 (12:25 +0700)]
glmemory: properly detect (hopefully) the correct ext_rg/arb_rg variant
GL_EXT_texture_rg is only valid for GLES2. GLES3 uses similar wording to
the GL_ARB_texture_rg which requires a sized internal format that the
GL_EXT_texture_rg does not require.
https://www.khronos.org/registry/gles/extensions/EXT/EXT_texture_rg.txt
https://www.opengl.org/registry/specs/ARB/texture_rg.txt
Matthew Waters [Wed, 13 May 2015 13:55:28 +0000 (23:55 +1000)]
glcontext: propagate the version/extension failure upwards
Otherwise the calling code has no idea that the context failed to
be created fully.
https://bugzilla.gnome.org/show_bug.cgi?id=749284
Matthew Waters [Wed, 13 May 2015 13:54:52 +0000 (23:54 +1000)]
gl: don't deadlock on context creation failure
https://bugzilla.gnome.org/show_bug.cgi?id=749284
Sebastian Dröge [Wed, 13 May 2015 12:42:15 +0000 (15:42 +0300)]
glmixerbin: Don't unref pad templates
Otherwise we unref the reference that is owned by the element class.
Matthew Waters [Wed, 13 May 2015 07:11:55 +0000 (17:11 +1000)]
glvideomixer: implement par handling
We were previously ignoring it completely
Matthew Waters [Wed, 13 May 2015 07:10:42 +0000 (17:10 +1000)]
glvideomixer: don't upload the vertex data every frame
Add the missing cache tracking statement.
Nicolas Dufresne [Tue, 12 May 2015 20:36:58 +0000 (16:36 -0400)]
gluploadelement: Remove uneeded header and defines
Nicolas Dufresne [Mon, 11 May 2015 19:02:02 +0000 (15:02 -0400)]
gltestsrc: Use default get_caps implementation
The custom code is wrong as it ignores the templates, which leads to
missing fields in the result. Instead, simply use the default get_caps
implementation which does it correctly (get the template, intersect
with filter and return).
https://bugzilla.gnome.org/show_bug.cgi?id=749237
Sebastian Dröge [Mon, 11 May 2015 12:54:52 +0000 (15:54 +0300)]
glmixer: Implement GstVideoAggregator::find_best_format()
Without this, we will fixate weird pixel-aspect-ratios like 1/
2147483647. But
in the end, all the negotiation code in videoaggregator needs a big cleanup
and videoaggregator needs to get rid of the software-mixer specific things
everywhere.
Matthew Waters [Mon, 11 May 2015 12:53:09 +0000 (22:53 +1000)]
gl: demote upload/convert/download elements to none
Copy paste error
Matthew Waters [Mon, 11 May 2015 12:37:44 +0000 (22:37 +1000)]
gl: expose internal glvideomixerelement\
We might want more control over the exact pipeline
Also reduces overhead
Matthew Waters [Mon, 11 May 2015 12:35:18 +0000 (22:35 +1000)]
gl: expose internal glimagesinkelement
We might want more control over the exact pipeline.
Also reduces overhead.
Sebastian Dröge [Wed, 6 May 2015 13:47:27 +0000 (15:47 +0200)]
Revert "Revert "glimagesink: add pixel-aspect-ratio property on the bin""
This reverts commit
d96e43b034a03fe54633907bc1bf2a26fe5f95fb.
Sebastian Dröge [Wed, 6 May 2015 13:47:20 +0000 (15:47 +0200)]
Revert "Revert "glimagesink: forward ALL the properties on the bin""
This reverts commit
59fb0f830f08e3e59f87f83df8fa3c2d9f3d9741.
Sebastian Dröge [Wed, 6 May 2015 13:47:04 +0000 (15:47 +0200)]
Revert "Revert "glimagesink: implement as a bin""
This reverts commit
be938f92d94e8acccf593128281f6e09213600a0.
Sebastian Dröge [Wed, 6 May 2015 13:46:49 +0000 (15:46 +0200)]
Revert "gl: readd glupload/download onto element pads"
This reverts commit
87d8270f302b03f63ce04f986d824892a2c131fd.
Sebastian Dröge [Wed, 6 May 2015 13:43:32 +0000 (15:43 +0200)]
Revert "Revert "glvideomixer: implement with glmixerbin""
This reverts commit
b4bd11f2f3a60224d188b27ab55b278077cb1217.
Matthew Waters [Tue, 5 May 2015 04:44:25 +0000 (14:44 +1000)]
glsyncmeta: fixup size declaration
Matthew Waters [Mon, 4 May 2015 13:42:36 +0000 (23:42 +1000)]
glimagesink: handle the local_context query
so that upstream elements can get the GL context from glimagesink
Jan Schmidt [Sun, 3 May 2015 13:08:15 +0000 (23:08 +1000)]
glcolorconvert: Improve passthrough check when no conversion is needed.
Make the passthrough check contingent on only the fields we
can modify being unchanged, and pre-compute it when caps
change instead of checking on each buffer. Makes the passthrough
more lenient if consumers are lax about making input and output
caps complete.
Matthew Waters [Thu, 30 Apr 2015 01:15:40 +0000 (11:15 +1000)]
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
Matthew Waters [Wed, 29 Apr 2015 12:55:00 +0000 (22:55 +1000)]
Revert "glvideomixer: implement with glmixerbin"
This reverts commit
0fb56738a14391f248aa0be8756adeaf978baa0c.
Matthew Waters [Wed, 29 Apr 2015 12:38:00 +0000 (22:38 +1000)]
Revert "glimagesink: implement as a bin"
This reverts commit
8a0017e21d5f9a8507f0593c6b24f723aa415258.
Matthew Waters [Wed, 29 Apr 2015 12:32:33 +0000 (22:32 +1000)]
Revert "glimagesink: forward ALL the properties on the bin"
This reverts commit
4be45e5f30dc6121f2769323603447f591ca4a0a.
Matthew Waters [Wed, 29 Apr 2015 12:32:20 +0000 (22:32 +1000)]
Revert "glimagesink: add pixel-aspect-ratio property on the bin"
This reverts commit
2ba6bb9b9325b63f58a9ff0b2c82fa28759dcabc.
Jan Schmidt [Tue, 28 Apr 2015 16:30:05 +0000 (02:30 +1000)]
glimagesink: Cache caps for passing to the client draw call
Don't convert the GstVideoInfo to caps on every draw call,
just cache the caps and pass them into the GstSample.
Jan Schmidt [Tue, 28 Apr 2015 16:20:09 +0000 (02:20 +1000)]
glupload: Make upload method static caps non-const.
Retrieving a GstStaticCaps does a one time internal
initialisation and caches it - they can't be stored as
const structures.
Matthew Waters [Tue, 28 Apr 2015 10:46:52 +0000 (20:46 +1000)]
glmemory: remove uneeded unref
The call to _gl_mem_alloc_data will unref and NULLify 'dest' for us.
We just need to return.
https://bugzilla.gnome.org/show_bug.cgi?id=744246
Matthieu Bouron [Tue, 28 Apr 2015 07:37:59 +0000 (09:37 +0200)]
glimagesink: Use gst_pad_get_pad_template_caps in ::get_caps()
Matthew Waters [Tue, 28 Apr 2015 10:11:07 +0000 (20:11 +1000)]
glupload: provide the sink template caps that could be used
https://bugzilla.gnome.org/show_bug.cgi?id=746399
Xavier Claessens [Mon, 27 Apr 2015 14:11:41 +0000 (10:11 -0400)]
egl: Use maximum bits per color instead of minimum
https://bugzilla.gnome.org/show_bug.cgi?id=748425
Matthieu Bouron [Mon, 27 Apr 2015 12:49:59 +0000 (14:49 +0200)]
glfiltercube: Don't initialize multiple shaders on renegotiation
Matthieu Bouron [Mon, 27 Apr 2015 08:24:00 +0000 (10:24 +0200)]
glimagesink: Remove unused stop function
Matthew Waters [Mon, 27 Apr 2015 06:04:50 +0000 (16:04 +1000)]
glimagesink: unref the pool in the correct place
Otherwise we could hold a pool to a context that is never going to be used.
https://bugzilla.gnome.org/show_bug.cgi?id=748405
Matthieu Bouron [Mon, 27 Apr 2015 08:01:53 +0000 (10:01 +0200)]
gltransformation: Unref shader in ::stop()
Matthew Waters [Mon, 27 Apr 2015 05:20:56 +0000 (15:20 +1000)]
gl: unref display/other-context in the correct place
Otherwise state changes from PLAYING->READY->PAUSED will cause there to
to be no display configured on the element.
https://bugzilla.gnome.org/show_bug.cgi?id=748405
Sebastian Dröge [Sun, 26 Apr 2015 19:42:03 +0000 (21:42 +0200)]
glfilter: De-camelcase onInitFBO() vfunc
Sebastian Dröge [Sun, 26 Apr 2015 19:39:06 +0000 (21:39 +0200)]
glfilter: Remove onStart/onStop vfuncs, and unused onReset()
onStart/onStop are just duplicates of the basetransform ones, onReset
was never called but was used everywhere when stop should've been used.