Julien Isorce [Mon, 3 Nov 2014 23:02:17 +0000 (23:02 +0000)]
gl/cocoa: fix uncaught exception 'unrecognized selector sent to instance'
Need to set the ':' as the reshape method now takes one parameter.
For the story, the GstGLNSView was previously inheriting from
NSOpenGLView which has a reshape function without any parameter.
Now the GstGLNSView inherits from NSView and we re-use the reshape
function manually.
Julien Isorce [Mon, 3 Nov 2014 22:59:41 +0000 (22:59 +0000)]
gl/cocoa: fix compiler warning
Use the reshape function after being defined. The other way
would have been to declare the reshape function in the header.
gstglwindow_cocoa.m: In function '-[GstGLNSView drawRect:]':
gstglwindow_cocoa.m:555: warning: 'GstGLNSView' may not respond to '-reshape'
gstglwindow_cocoa.m:555: warning: (Messages without a matching method signature
gstglwindow_cocoa.m:555: warning: will be assumed to return 'id' and accept
gstglwindow_cocoa.m:555: warning: '...' as arguments.)
Tim-Philipp Müller [Mon, 3 Nov 2014 00:17:41 +0000 (00:17 +0000)]
gl: fix Since marker for gst_gl_window_run_navigation()
Luis de Bethencourt [Wed, 29 Oct 2014 18:18:07 +0000 (18:18 +0000)]
glshader: Fix memory leak
Memory is only freed in the TRUE clause of the if conditional. Free in the else
clause as well.
Also, consolidate g_malloc + sprintf into a g_strdup_printf().
CID #
1212171
https://bugzilla.gnome.org/show_bug.cgi?id=739368
Luis de Bethencourt [Fri, 31 Oct 2014 10:45:19 +0000 (10:45 +0000)]
glcolorconvert: fix comments that confuse gtk-doc
GTK-Doc uses a special syntax for code documentation. A multiline comment that
starts with an additional '*' marks a documentation block that will be processed
by the GTK-Doc tools. So GTK-Doc is confused if a comment block starts with that
additional '*' but isn't meant to be processed. Removing this additional '*'.
https://bugzilla.gnome.org/show_bug.cgi?id=739444
Matthew Waters [Fri, 31 Oct 2014 01:52:50 +0000 (12:52 +1100)]
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.
Matthew Waters [Fri, 31 Oct 2014 01:52:07 +0000 (12:52 +1100)]
glmixer: advertise support for changing input caps mid-stream
https://bugzilla.gnome.org/show_bug.cgi?id=739334
Matthew Waters [Fri, 31 Oct 2014 01:30:53 +0000 (12:30 +1100)]
gl: sprinkle some Since markers
Matthew Waters [Thu, 30 Oct 2014 12:08:00 +0000 (23:08 +1100)]
glmixer: don't get the current caps from GstVideoInfo for the srcpad
It's missing the caps features needed.
Matthew Waters [Thu, 30 Oct 2014 07:57:59 +0000 (18:57 +1100)]
gl/examples: update for other-context property removal
Matthew Waters [Thu, 30 Oct 2014 05:48:00 +0000 (16:48 +1100)]
glcontext: add more functionality to wrapped contexts
Implements get_current_context() and get_proc_address() for wrapped
contexts.
Matthew Waters [Thu, 30 Oct 2014 01:43:09 +0000 (12:43 +1100)]
glshader: advertise the default vertex and fragment shaders on desktop GL
Lubosz Sarnecki [Wed, 29 Oct 2014 11:22:14 +0000 (12:22 +0100)]
satisfy gst-indent
Jan Schmidt [Wed, 29 Oct 2014 12:23:13 +0000 (22:23 +1000)]
glfiltercube: Fix typo in property description
Wang Xin-yu (王昕宇) [Wed, 29 Oct 2014 00:27:57 +0000 (08:27 +0800)]
glmixer:fix incorrect parameter passed to handle_set_context
Matthew Waters [Tue, 28 Oct 2014 07:27:11 +0000 (18:27 +1100)]
glfilter: get the config from the correct pool
Matthew Waters [Tue, 28 Oct 2014 07:01:27 +0000 (18:01 +1100)]
glfilter: avoid uninitialized variable size when chaining multiple glfilters
https://bugzilla.gnome.org/show_bug.cgi?id=739277
Matthew Waters [Tue, 28 Oct 2014 07:01:01 +0000 (18:01 +1100)]
glfilter: gst-indent file
Matthew Waters [Tue, 28 Oct 2014 06:31:37 +0000 (17:31 +1100)]
glcontext: add api for retreiving the current context and api
that is current in the calling thread.
Matthew Waters [Tue, 21 Oct 2014 08:03:08 +0000 (19:03 +1100)]
glprototypes: add vertex attribute array definitions
Matthew Waters [Thu, 23 Oct 2014 13:35:22 +0000 (00:35 +1100)]
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.
Matthew Waters [Thu, 23 Oct 2014 12:55:48 +0000 (23:55 +1100)]
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.
Matthew Waters [Thu, 14 Aug 2014 13:29:00 +0000 (23:29 +1000)]
gl: propogate other-context using GstContext
Sebastian Dröge [Tue, 21 Oct 2014 14:21:08 +0000 (16:21 +0200)]
gl/cocoa: Fix compiler warning
gstglwindow_cocoa.m: In function '-[GstGLNSView drawRect:]':
gstglwindow_cocoa.m:555: warning: 'GstGLNSView' may not respond to '-reshape'
gstglwindow_cocoa.m:555: warning: (Messages without a matching method signature
gstglwindow_cocoa.m:555: warning: will be assumed to return 'id' and accept
gstglwindow_cocoa.m:555: warning: '...' as arguments.)
Matthew Waters [Mon, 20 Oct 2014 19:04:10 +0000 (06:04 +1100)]
glmixer: fixup eglimage include path
Matthew Waters [Sat, 18 Oct 2014 08:03:43 +0000 (10:03 +0200)]
glbufferpool: add the GstVideoGLTextureUploadMeta buffer pool option
Matthew Waters [Sun, 19 Oct 2014 23:34:27 +0000 (10:34 +1100)]
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
Wang Xin-yu (王昕宇) [Mon, 20 Oct 2014 07:02:28 +0000 (15:02 +0800)]
glcolorconvert: support RGB16/BGR16 video format upload
https://bugzilla.gnome.org/show_bug.cgi?id=738842
Brion Vibber [Sat, 18 Oct 2014 04:26:52 +0000 (21:26 -0700)]
gl/cocoa: Fix for building on Mac OS X 10.10
Using NSApp directly seems to confuse something, as the compiler
was expecting an id<NSFileManagerDelegate>. Switched to using
[NSApplication sharedApplication], and specified the delegate
protocol on the window class as well.
https://bugzilla.gnome.org/show_bug.cgi?id=738740
Matthew Waters [Tue, 14 Oct 2014 12:00:11 +0000 (14:00 +0200)]
gldeinterlace: ref the uploaded buffer
Instead of the possibly non-GL input buffer.
Matthew Waters [Tue, 14 Oct 2014 14:41:51 +0000 (16:41 +0200)]
glfilter: add uploaded_buffer field
Sebastian Dröge [Mon, 13 Oct 2014 11:28:57 +0000 (13:28 +0200)]
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.
Sebastian Dröge [Mon, 13 Oct 2014 11:27:55 +0000 (13:27 +0200)]
glmixer: Call the pad's parent class finalize method
Sebastian Dröge [Mon, 13 Oct 2014 11:27:11 +0000 (13:27 +0200)]
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.
Sebastian Dröge [Mon, 13 Oct 2014 11:25:42 +0000 (13:25 +0200)]
gltestsrc: Add other-context property
Sebastian Dröge [Mon, 13 Oct 2014 09:56:03 +0000 (11:56 +0200)]
glimagesink: Don't leak other-context
Sebastian Dröge [Mon, 13 Oct 2014 09:53:47 +0000 (11:53 +0200)]
glmixer: Add other-context property
Sebastian Dröge [Thu, 9 Oct 2014 07:54:35 +0000 (10:54 +0300)]
gl/cocoa: Add support for HiDPI displays
Without this our GL surface would be upscaled after rendering
by Cocoa, which would reduce image quality.
Matthew Waters [Thu, 9 Oct 2014 01:28:11 +0000 (12:28 +1100)]
glcolorconvert: output why we cannot convert a buffer
Matthew Waters [Thu, 9 Oct 2014 01:25:55 +0000 (12:25 +1100)]
glcolorconvert: fix planar YUV download
- sample the u and v planes properly
- output the correctly scaled u and v planes for different chroma block sizes
Vivia Nikolaidou [Wed, 8 Oct 2014 18:51:12 +0000 (21:51 +0300)]
gloverlay: And fix another unused variable compiler warning
Vivia Nikolaidou [Wed, 8 Oct 2014 18:49:25 +0000 (21:49 +0300)]
gloverlay: Fix unused variable compiler warning when compiling without desktop GL
Wang Xin-yu (王昕宇) [Sun, 28 Sep 2014 02:51:09 +0000 (10:51 +0800)]
gltestsrc: implement checkers pattern with GLSL
https://bugzilla.gnome.org/show_bug.cgi?id=737505
Matthew Waters [Tue, 7 Oct 2014 12:04:30 +0000 (23:04 +1100)]
glcolorconvert: fix UYVY download green screen
Matthew Waters [Tue, 7 Oct 2014 11:50:22 +0000 (22:50 +1100)]
glcolrconvert: fix YUY2 download
- The shader was outputing the wrong values compared with raw
videotestsrc.
- deal with the texture edge properly.
- properly sample the 2x1 rectangle for the u and v values
- don't double sample the y value
Sebastian Dröge [Wed, 1 Oct 2014 13:04:36 +0000 (16:04 +0300)]
gl/cocoa: Always update our viewport if Cocoa tells us something has changed
The visible rect and bounds might be the same as before, but Cocoa
might've changed our viewport without us nothing. This happens if
you hide the view and show it again.
Sebastian Dröge [Wed, 1 Oct 2014 08:55:13 +0000 (11:55 +0300)]
gl/cocoa: Handle NSView::renewGState() properly
Don't update the screen until we redraw, this prevents flickering during
scrolling, clipping, resizing, etc
Lubosz Sarnecki [Thu, 25 Sep 2014 15:01:31 +0000 (17:01 +0200)]
gltransformation: graphene multiplication order has changed
https://bugzilla.gnome.org/show_bug.cgi?id=733510
Matthew Waters [Tue, 30 Sep 2014 10:39:36 +0000 (20:39 +1000)]
glvideomixer: update element documentation
Matthew Waters [Tue, 30 Sep 2014 08:26:34 +0000 (18:26 +1000)]
tests/glcolorconvert: do reorder checking for rgba formats
Matthew Waters [Tue, 30 Sep 2014 04:46:14 +0000 (14:46 +1000)]
glcolorconvert: convert xRGB into ARGB properly
The alpha channel might not be the last component so check which one
it is in and clobber that one instead.
Matthew Waters [Mon, 29 Sep 2014 15:45:20 +0000 (01:45 +1000)]
tests/glmemory: add simple transfer test
tests transferring to/from the GL with a 1x1 RGBA pixel.
Matthew Waters [Mon, 29 Sep 2014 15:38:05 +0000 (01:38 +1000)]
glmemory: unset the opposite corresponding transfer flags when mapped with write
fixes consistency with consecutive gst_memory_map()'s with
flags & GST_MAP_WRITE
Sebastian Dröge [Mon, 29 Sep 2014 06:33:42 +0000 (09:33 +0300)]
gl/cocoa: Update viewport according to the current clipping
We have to update the GL viewport if the NSView is only partially
visible. Otherwise the content of the frame will be visibly offset.
Sebastian Dröge [Mon, 29 Sep 2014 07:49:46 +0000 (10:49 +0300)]
gl/cocoa: Improve the NSApplication initialization
This is only for non-Cocoa apps but previously caused a 2 second
waiting during startup for Cocoa apps. This is unacceptable.
Instead we now check a bit more extensive if something actually
runs on the GLib default main context, and if not don't even
bother waiting for something to happen from there.
Sebastian Dröge [Mon, 29 Sep 2014 06:24:49 +0000 (09:24 +0300)]
gl/cocoa: NSView::drawRect() should call into reshape too
We a) need to render again because part of the window was
obscured and b) might need to reshape because of clipping
changes.
Sebastian Dröge [Fri, 26 Sep 2014 11:21:46 +0000 (14:21 +0300)]
gl/cocoa: Call UI related API from the application main thread
Sebastian Dröge [Fri, 26 Sep 2014 10:05:27 +0000 (13:05 +0300)]
gl/cocoa: Switch to a plain NSView subclass instead of NSOpenGLView
We don't and can't use NSOpenGLView as it's supposed to be used and
it gets into our way by being to clever in various situations.
Edward Hervey [Mon, 29 Sep 2014 06:54:29 +0000 (08:54 +0200)]
glcontext: Initialize variable
Avoids the following warning:
gstglcontext.c:647:58: error: 'prev' may be used uninitialized in
this function [-Werror=maybe-uninitialized]
Jan Schmidt [Sun, 28 Sep 2014 14:23:57 +0000 (00:23 +1000)]
examples: Fix Qt/GL qglwtextureshare example for X11
We need to pass the X11 display to GstGL or else it will
use its own X11 Display pointer, and the GL Context won't get shared
correctly on newer X servers
Jan Schmidt [Sun, 28 Sep 2014 10:21:50 +0000 (20:21 +1000)]
examples: port GL/Qt examples to Qt5
Update the GL Qt integration examples for Qt5 changes and for GstGL
signal signature changes.
Matthew Waters [Sun, 28 Sep 2014 14:32:05 +0000 (00:32 +1000)]
glcontext: fixup error in sharegroup comment
Matthew Waters [Sun, 28 Sep 2014 14:27:30 +0000 (00:27 +1000)]
Revert accidental push: "gltestsrc: implement checkers pattern with GLSL"
This reverts commit
eae09179f0b4eb584c8fc7b6560d8fc8e86eed4c.
Matthew Waters [Sun, 28 Sep 2014 14:24:28 +0000 (00:24 +1000)]
glcontext: detect the sharegroup case where the context are in different chains
In the end they will lead to the same root context in the tree so check that
for equality.
Wang Xin-yu (王昕宇) [Sun, 28 Sep 2014 02:51:09 +0000 (10:51 +0800)]
gltestsrc: implement checkers pattern with GLSL
Matthew Waters [Sun, 28 Sep 2014 11:18:32 +0000 (21:18 +1000)]
glfilter: silence a warning with empty input caps
discovered with the doublecube example
gst_caps_get_features: assertion 'index < GST_CAPS_LEN (caps)' failed
Matthew Waters [Sun, 28 Sep 2014 10:37:04 +0000 (20:37 +1000)]
examples/gl: update for signal signature change
Matthew Waters [Fri, 26 Sep 2014 12:29:56 +0000 (22:29 +1000)]
gloverlay: fix zero output frames with YUY2/UYVY
also, be nice and disable blending for other elements
Matthew Waters [Fri, 26 Sep 2014 12:22:06 +0000 (22:22 +1000)]
gloverlay: protect desktop gl specific tokens with #if
Matthew Waters [Fri, 26 Sep 2014 02:28:10 +0000 (12:28 +1000)]
gloverlay: free the image memory every time the location changes
fixes a memory leak
Sebastian Dröge [Thu, 25 Sep 2014 17:48:59 +0000 (20:48 +0300)]
gloverlay: Include into the build with GLES2 only too
Matthew Waters [Thu, 25 Sep 2014 15:45:22 +0000 (01:45 +1000)]
gltestsrc: free the shader on stop
Matthew Waters [Thu, 25 Sep 2014 15:34:54 +0000 (01:34 +1000)]
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).
Matthew Waters [Thu, 25 Sep 2014 15:14:35 +0000 (01:14 +1000)]
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
Sebastian Dröge [Thu, 25 Sep 2014 13:13:19 +0000 (16:13 +0300)]
gl/cocoa: Switch from our custom main loop to a GMainLoop
Simplifies code a lot and makes it more similar to the other backends.
Sebastian Dröge [Thu, 25 Sep 2014 13:12:24 +0000 (16:12 +0300)]
gl/cocoa: Clear the current GL context when it should happen
Matthew Waters [Wed, 24 Sep 2014 04:29:37 +0000 (14:29 +1000)]
glvideomixer: skip input frames with an alpha of 0
Matthew Waters [Wed, 24 Sep 2014 03:13:19 +0000 (13:13 +1000)]
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
Lubosz Sarnecki [Thu, 21 Aug 2014 00:14:40 +0000 (02:14 +0200)]
gltestsrc: add Mandelbrot fractal pattern.
https://bugzilla.gnome.org/show_bug.cgi?id=735131
Lubosz Sarnecki [Thu, 21 Aug 2014 00:13:58 +0000 (02:13 +0200)]
gltestsrc: implement snow pattern with GLSL.
https://bugzilla.gnome.org/show_bug.cgi?id=735131
Matthew Waters [Tue, 23 Sep 2014 02:02:18 +0000 (12:02 +1000)]
glupload: fallback to upload if contexts cannot share GL resources
Fixes pipelines of the form
gleffects ! tee ! glimagesink
as tee does not pass on the allocation query.
Matthew Waters [Tue, 23 Sep 2014 02:01:04 +0000 (12:01 +1000)]
glcontext: add gst_gl_context_can_share
Which determines whether two GstGLContext's can share sharable
OpenGL resources.
Matthew Waters [Mon, 22 Sep 2014 10:01:27 +0000 (20:01 +1000)]
gl/tests: update for upload API changes
Sebastian Dröge [Mon, 22 Sep 2014 07:08:17 +0000 (10:08 +0300)]
gl: Let gst_gl_context_get_thread() return a new reference to the GThread
Otherwise it might go away in the meantime and the caller has some random pointer.
Anuj Jaiswal [Mon, 22 Sep 2014 05:40:42 +0000 (11:10 +0530)]
gl: consecutive return, break statement
Signed-off-by: Anuj Jaiswal <anuj.jaiswal@samsung.com>
https://bugzilla.gnome.org/show_bug.cgi?id=736939
Matthew Waters [Mon, 22 Sep 2014 02:21:22 +0000 (12:21 +1000)]
gl/debug: desktop GL does not have the KHR suffixes
Matthew Waters [Mon, 22 Sep 2014 01:59:30 +0000 (11:59 +1000)]
examples/gl/gtk: use the sync bus callback to set the window handle
And output error messages.
Tim-Philipp Müller [Sun, 21 Sep 2014 12:32:29 +0000 (13:32 +0100)]
gl: add since markers for new API
Matthew Waters [Sun, 21 Sep 2014 11:42:41 +0000 (21:42 +1000)]
glmemory: add debug line for freeing textures
Matthew Waters [Sun, 21 Sep 2014 11:36:49 +0000 (21:36 +1000)]
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
Matthew Waters [Sun, 21 Sep 2014 11:30:58 +0000 (21:30 +1000)]
glcontext: add API to retreive the thread that context is active in
Sanjay NM [Fri, 19 Sep 2014 10:02:33 +0000 (15:32 +0530)]
gl: Removed unreachable break, unused variable
https://bugzilla.gnome.org/show_bug.cgi?id=736957
Ognyan Tonchev [Tue, 16 Sep 2014 09:42:34 +0000 (11:42 +0200)]
glfilter: do not leak pool in error cases
https://bugzilla.gnome.org/show_bug.cgi?id=736732
Ognyan Tonchev [Tue, 16 Sep 2014 09:41:43 +0000 (11:41 +0200)]
gltestsrc: do not leak pool in error cases
https://bugzilla.gnome.org/show_bug.cgi?id=736730
Ognyan Tonchev [Tue, 16 Sep 2014 09:41:16 +0000 (11:41 +0200)]
glmixer: do not leak pool in error cases
https://bugzilla.gnome.org/show_bug.cgi?id=736729
Vasilis Liaskovitis [Tue, 9 Sep 2014 10:01:47 +0000 (12:01 +0200)]
GstGLWindow: Introduce navigation thread
This thread dispatches navigation events. It is needed to avoid deadlocks
between window backend threads that emit navigation events (e.g. X11/GMainLoop
thread) and consumers of navigation events such as glimagesink, see
https://bugzilla.gnome.org/show_bug.cgi?id=733661
GstGlWindow_x11 thread is changed to invoke the navigation thread for navigation
dispatching, instead of emiting the event itself. Othe backends beside X11 do
not dispatch navigation events yet, but should use this thread when dispatching
these events in the future.
The navigation thread is currently part of GstGLWindow and not implemented in
separate subclasses / backends. This will be needed in the future.
gst_gl_window_x11_get_surface_dimensions is also changed to use a cached value
of the window's width, height. These values are now retrieved in the X11
thread, function gst_gl_window_x11_handle_event. This change is needed because
otherwise the XGetWindowAttributes gets called from the navigation thread,
leading to xlib aborting due to multithreaded access (if XInitThreads is not
called before, as is the case for gst-launch)
Lubosz Sarnecki [Mon, 7 Jul 2014 08:52:57 +0000 (10:52 +0200)]
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
Sebastian Dröge [Thu, 28 Aug 2014 13:42:30 +0000 (16:42 +0300)]
glimagesink: Add missing break to switch
CID
1232801
Wang Xin-yu (王昕宇) [Tue, 26 Aug 2014 08:21:42 +0000 (16:21 +0800)]
gl: qglwtextureshare demo fixes and cleanup
1. glcontextid function is replaced by gstreamer gst_gl_context_new_wrapped .
2. call gst_init before gst_gl_display_new , seems gst_gl_display_new depends
on gst_allocator_register , which only worked after gst_init called
3. flush gstreamer OpenGL context before using shared texture, fix
flicker problem.
https://bugzilla.gnome.org/show_bug.cgi?id=735566
Wang Xin-yu (王昕宇) [Wed, 27 Aug 2014 05:40:42 +0000 (13:40 +0800)]
gl: Add GSTGLAPI macro to the debug callback function
Fixes the Windows build.
https://bugzilla.gnome.org/show_bug.cgi?id=735565