platform/upstream/gstreamer.git
6 years agoopengl: Clean Makefile.am
Nicolas Dufresne [Wed, 25 Feb 2015 00:01:45 +0000 (19:01 -0500)]
opengl: Clean Makefile.am

+ Split headers from source
+ Remove uneeded AM_CFLAGS, AM_LDFLAGS
+ Always set OBJCFLAGS

Due to the presence of a .m and regardless of the conditional values,
automake will promote the link command to OBJC using OBJCFLAGS. Only
the basic flags (like warnings and optimization) are going to make a
difference though.

This cleanup builds up the makefile with less specific files first
toward more specific file. FLAGS are built with the basic that unused
flags will have empty variable.

6 years agoglimagesink: cosmetic cleanup
Xavier Claessens [Tue, 24 Feb 2015 17:54:54 +0000 (12:54 -0500)]
glimagesink: cosmetic cleanup

https://bugzilla.gnome.org/show_bug.cgi?id=745105

6 years agoopengl: don't add --tag=CC twice to LIBTOOLFLAGS
Tim-Philipp Müller [Tue, 24 Feb 2015 19:52:59 +0000 (19:52 +0000)]
opengl: don't add --tag=CC twice to LIBTOOLFLAGS

6 years agoopengl: Add --tag=CC to LIBTOOLCLFAGS
Nicolas Dufresne [Tue, 24 Feb 2015 19:35:37 +0000 (14:35 -0500)]
opengl: Add --tag=CC to LIBTOOLCLFAGS

This is required for static build.

6 years agoglwindow: Deactivate window before changing handle
Edward Hervey [Tue, 24 Feb 2015 13:01:04 +0000 (14:01 +0100)]
glwindow: Deactivate window before changing handle

When setting a new window handle, we need to ensure all implementations
will detect the change.

For that we deactivate the context before setting the window handle, then
reactivate the context

https://bugzilla.gnome.org/show_bug.cgi?id=745090

6 years agogl/egl: Detect window handle changes
Edward Hervey [Tue, 24 Feb 2015 12:58:26 +0000 (13:58 +0100)]
gl/egl: Detect window handle changes

When (re)activating the context, the backing window handle might have changed.
If that happened, destroy the previous surface and create a new one

https://bugzilla.gnome.org/show_bug.cgi?id=745090

6 years agogl: remove docbook related warnings
Luis de Bethencourt [Tue, 24 Feb 2015 14:20:42 +0000 (14:20 +0000)]
gl: remove docbook related warnings

6 years agocaopengllayersink: render black when we don't have a texture to display
Matthew Waters [Tue, 24 Feb 2015 12:52:39 +0000 (23:52 +1100)]
caopengllayersink: render black when we don't have a texture to display

Like when the winsys asks us to redraw before the pipeline has started

6 years agoglmemory: allow sharing between buffers
Matthew Waters [Tue, 24 Feb 2015 13:00:48 +0000 (00:00 +1100)]
glmemory: allow sharing between buffers

There was no real reason why the flag was set.  We should be able
to handle it.  Fixes last-sample handling on gl sinks

6 years agoglsyncmeta: add compat definition for gles2
Matthew Waters [Tue, 24 Feb 2015 09:34:35 +0000 (20:34 +1100)]
glsyncmeta: add compat definition for gles2

6 years agonew caopengllayersink element
Matthew Waters [Thu, 29 Jan 2015 06:41:19 +0000 (17:41 +1100)]
new caopengllayersink element

renders gstreamer gl scene/video frames to a caopengllayer retreivable
from the "layer" property.

6 years agogl/calayer: don't use the async callback to render
Matthew Waters [Tue, 24 Feb 2015 08:06:18 +0000 (19:06 +1100)]
gl/calayer: don't use the async callback to render

not until we can provide equivalent functionality for other window
implementations.

6 years agoglsyncmeta: also supported with gles3
Matthew Waters [Mon, 23 Feb 2015 14:20:23 +0000 (01:20 +1100)]
glsyncmeta: also supported with gles3

6 years agolibgstgl: eagl: handle CALayer resize
Alessandro Decina [Tue, 24 Feb 2015 03:23:49 +0000 (14:23 +1100)]
libgstgl: eagl: handle CALayer resize

6 years agoglmemory: Fix transfer_pbo memory leak
Vasilis Liaskovitis [Mon, 23 Feb 2015 15:13:31 +0000 (16:13 +0100)]
glmemory: Fix transfer_pbo memory leak

https://bugzilla.gnome.org/show_bug.cgi?id=744977

6 years agogl/cocoa: reduce custom main loop latency
Julien Isorce [Sun, 22 Feb 2015 10:03:54 +0000 (10:03 +0000)]
gl/cocoa: reduce custom main loop latency

This fix a very slow rendering rate regression that only
happens when using gst-launch, i.e. in the case where
the main thread does not run any NSApp loop.

Git bisect reported it has been introduced by the commit
e10d2417e2fe7aa4733c076984339b0d61caa169:
"move to CGL and CAOpenGLLayer for rendering".

Then the commit 7d463576271e5a4cc1070780ba1a69c971e8be1d:
"gstglwindow_cocoa: fix slow render rate" attempted to fix
the slow rendering rate problem when using gst-launch.

At least for me it does not work. I tried several
combinations, for example to flush CA transactions in the
custom app loop, as mentioned in the doc, but the only solution
that fixes the slow rendering is by reducing the loop latency.
From what I tested, no need to put less than 60ms, even if the
framerate has an interval much lower (16.6ms for 60 fps).

6 years agoglmixer: fix some compiler warnings
Julien Isorce [Tue, 17 Feb 2015 23:50:51 +0000 (23:50 +0000)]
glmixer: fix some compiler warnings

i686-apple-darwin11-llvm-gcc-4.2

gstglmixer.h:43: error: redefinition of typedef ‘GstGLMixer’
gstglmixerpad.h:32: error: previous declaration of ‘GstGLMixer’ was here
gstglmixer.h:46: error: redefinition of typedef ‘GstGLMixerFrameData’
gstglmixerpad.h:33: error: previous declaration of ‘GstGLMixerFrameData’ was here

6 years agogstglmemory: Remove now unused transfer_upload function.
Mathieu Duponchelle [Sat, 21 Feb 2015 13:42:05 +0000 (14:42 +0100)]
gstglmemory: Remove now unused transfer_upload function.

6 years agoglmemory: disable automatic pbo upload
Matthew Waters [Sat, 21 Feb 2015 12:29:22 +0000 (23:29 +1100)]
glmemory: disable automatic pbo upload

until we can track where the data is/or is going to be.

6 years agoglememory: only store and act on the map flags on first/last map/unmap
Matthew Waters [Fri, 20 Feb 2015 07:42:23 +0000 (18:42 +1100)]
glememory: only store and act on the map flags on first/last map/unmap

Anytime else, we have no idea how to match up map and unmaps.
We also don't know exactly how the calling code is using us.
Also fixes the case where we're trying to transfer while someone else
is accessing our data pointer or texture resulting in mismatched video
frames.

https://bugzilla.gnome.org/show_bug.cgi?id=744839

6 years agogltransform: Fix includes of graphene headers
Nicolas Dufresne [Wed, 18 Feb 2015 22:10:48 +0000 (17:10 -0500)]
gltransform: Fix includes of graphene headers

The graphene-1.0 part should not be in the source code. This directory
is part of the cflags include. This is similar to gstreamer-1.0/
directory. This break compilation if the include directory where
graphene is installed is not in your include path.

6 years agogl/cocoa: don't deadlock if the dispatch_sync is called from the main thread
Matthew Waters [Tue, 17 Feb 2015 07:17:59 +0000 (18:17 +1100)]
gl/cocoa: don't deadlock if the dispatch_sync is called from the main thread

Provide a helper function to check whether we are being called from
the main thread and act appropriately.

6 years agogl/calayer: only start drawing if the parent gl context is ready
Matthew Waters [Tue, 17 Feb 2015 05:41:17 +0000 (16:41 +1100)]
gl/calayer: only start drawing if the parent gl context is ready

otherwise we may try to use GstGLFuncs * that hasn't been set yet

6 years agogl/cocoa: small refactor of layer/view creation into the window
Matthew Waters [Tue, 17 Feb 2015 05:39:56 +0000 (16:39 +1100)]
gl/cocoa: small refactor of layer/view creation into the window

6 years agoglwindow: Remove assertion in gst_gl_window_show() for subclasses not implementing it
Sebastian Dröge [Mon, 16 Feb 2015 23:04:38 +0000 (01:04 +0200)]
glwindow: Remove assertion in gst_gl_window_show() for subclasses not implementing it

On Android and iOS we can't create a window ourselves, so also can't just show
one. That's not a problem and an assertion is not really needed here.

6 years agoglimagesink: Fix debug statement
Edward Hervey [Thu, 12 Feb 2015 16:33:50 +0000 (17:33 +0100)]
glimagesink: Fix debug statement

6 years agogl: Add/Update more debug statements
Edward Hervey [Thu, 12 Feb 2015 14:02:31 +0000 (15:02 +0100)]
gl: Add/Update more debug statements

Where possible, use the _OBJECT variants in order to track better from
which object the debug statement is coming from

Define (and use) GST_CAT_DEFAULT where applicable

Use GST_PTR_FORMAT where applicable

6 years agogl: Make glcontext debug category used in more places
Edward Hervey [Thu, 12 Feb 2015 13:58:14 +0000 (14:58 +0100)]
gl: Make glcontext debug category used in more places

As a bonus it makes the egl context debug messages visible now :)

6 years agoglimagesink: Sprinkle more debug
Edward Hervey [Thu, 12 Feb 2015 13:56:12 +0000 (14:56 +0100)]
glimagesink: Sprinkle more debug

6 years agolibgstgl: set user data and GDestroyNotify for wrapped textures
Alessandro Decina [Mon, 9 Feb 2015 09:44:50 +0000 (20:44 +1100)]
libgstgl: set user data and GDestroyNotify for wrapped textures

6 years agoglproto/vao: only supported in core for ES 3.0+
Matthew Waters [Fri, 6 Feb 2015 01:53:15 +0000 (12:53 +1100)]
glproto/vao: only supported in core for ES 3.0+

Was causing horizontally flipped video for frame 2 onward on android

6 years agoglfilter: ensure that the input upload/colorconvert are always available
Matthew Waters [Thu, 5 Feb 2015 05:46:32 +0000 (16:46 +1100)]
glfilter: ensure that the input upload/colorconvert are always available

6 years agoglimagesink: log the converted caps
Matthew Waters [Thu, 5 Feb 2015 00:06:10 +0000 (11:06 +1100)]
glimagesink: log the converted caps

6 years agoglupload: restrict EGL and UploadMeta to RGBA
Matthew Waters [Thu, 5 Feb 2015 00:05:02 +0000 (11:05 +1100)]
glupload: restrict EGL and UploadMeta to RGBA

other formats are highly untested.

6 years agoglcolorconvert: don't intersect with the input caps
Matthew Waters [Thu, 5 Feb 2015 00:04:05 +0000 (11:04 +1100)]
glcolorconvert: don't intersect with the input caps

that limits our formats to whatever is in the input caps

6 years agogl: fix memory leak
Luis de Bethencourt [Wed, 4 Feb 2015 14:10:13 +0000 (14:10 +0000)]
gl: fix memory leak

In gst_gl_filter_fixate_caps () it can goto done without freeing the memory of
the tmp GstStructure. This makes it go out of scope and leak.

CID #1265765

6 years agogl: remove the egl caps from the src pads
Matthew Waters [Tue, 3 Feb 2015 04:30:08 +0000 (15:30 +1100)]
gl: remove the egl caps from the src pads

we don't actually support producing EGLImage buffers anywhere.

6 years agoglcolorconvert: put GstGLSyncMeta on output buffers
Matthew Waters [Tue, 3 Feb 2015 02:32:47 +0000 (13:32 +1100)]
glcolorconvert: put GstGLSyncMeta on output buffers

allows thread safely using the provided output buffer in a separate
thread

6 years agoglupload: only try the glmemory upload for sysmem/glmemory caps features
Matthew Waters [Mon, 2 Feb 2015 13:35:26 +0000 (00:35 +1100)]
glupload: only try the glmemory upload for sysmem/glmemory caps features

Allows selecting/testing the upload path with explicit caps features.

6 years agoglmemory: add missing initilisation of tex_target when copying
Matthew Waters [Mon, 2 Feb 2015 13:26:20 +0000 (00:26 +1100)]
glmemory: add missing initilisation of tex_target when copying

fixes:

glcolorscale ! video/x-raw\(meta:GstVideoGLTextureUploadMeta\) !
glimagesink

6 years agoglupload: allow NULL buffer for accept vfunc
Matthew Waters [Mon, 2 Feb 2015 13:15:30 +0000 (00:15 +1100)]
glupload: allow NULL buffer for accept vfunc

6 years agoglupload: remove unsed convert field in private struct
Matthew Waters [Mon, 2 Feb 2015 13:13:07 +0000 (00:13 +1100)]
glupload: remove unsed convert field in private struct

6 years agoglupload/download/convert: provide transform_caps functions
Matthew Waters [Mon, 2 Feb 2015 13:11:06 +0000 (00:11 +1100)]
glupload/download/convert: provide transform_caps functions

Allows finer grain decisions about formats and features at each
stage of the pipeline.
Also provide propose_allocation for glupload besed on the supported
methods.

6 years agogstglwindow_cocoa: fix slow render rate
Alessandro Decina [Tue, 3 Feb 2015 00:07:58 +0000 (11:07 +1100)]
gstglwindow_cocoa: fix slow render rate

In gst_gl_window_cocoa_draw we used to just call setNeedsDisplay:YES. That was
creating an implicit CA transaction which was getting committed at the next
runloop iteration. Since we don't know how often the main runloop is running,
and when we run it implicitly (from gst_gl_window_cocoa_nsapp_iteration) we only
do so every 200ms, use an explicit CA transaction instead and commit it
immediately. CA transactions nest and debounce automatically so this will never
result in extra work.

6 years agogstglcaopengllayer: use the correct rectangle type for iOS and OS X
Matthew Waters [Mon, 2 Feb 2015 12:40:16 +0000 (23:40 +1100)]
gstglcaopengllayer: use the correct rectangle type for iOS and OS X

6 years agoglcolorconvert: use the correct caps feature for supported caps
Matthew Waters [Mon, 2 Feb 2015 10:07:48 +0000 (21:07 +1100)]
glcolorconvert: use the correct caps feature for supported caps

glcolorconvert currently only supports converting between GLMemory
targets.

6 years agoglsyncmeta: don't use the gst debug object variants
Matthew Waters [Mon, 2 Feb 2015 09:51:31 +0000 (20:51 +1100)]
glsyncmeta: don't use the gst debug object variants

We are not a GObject or any inferable GstMiniObject supported by
the gst debug system.  Also fixes a segfault.

6 years agogl: update unit test for glmemory api change
Matthew Waters [Fri, 30 Jan 2015 07:51:17 +0000 (18:51 +1100)]
gl: update unit test for glmemory api change

6 years agoglimagesink: clobber the alpha channel by default
Matthew Waters [Fri, 30 Jan 2015 04:13:27 +0000 (15:13 +1100)]
glimagesink: clobber the alpha channel by default

this can be disabled with the ignore-alpha property

6 years agoRevert "libgstgl: gstglcaopengllayer: set the layer as opaque"
Alessandro Decina [Fri, 30 Jan 2015 01:32:17 +0000 (12:32 +1100)]
Revert "libgstgl: gstglcaopengllayer: set the layer as opaque"

This reverts commit 6f152d381ca21595cdc823f32341c8f2fe71b9c7.

The layer shouldn't be always opaque, it should be made a property.

6 years agolibgstgl: gstglcaopengllayer: set the layer as opaque
Alessandro Decina [Fri, 30 Jan 2015 01:22:25 +0000 (12:22 +1100)]
libgstgl: gstglcaopengllayer: set the layer as opaque

6 years agoglcolorconvert: Add FIXME comment about possibility of non-Apple YCbCr422 rectangular...
Sebastian Dröge [Thu, 29 Jan 2015 15:30:34 +0000 (16:30 +0100)]
glcolorconvert: Add FIXME comment about possibility of non-Apple YCbCr422 rectangular textures

6 years agoglcolorconvert: Only use GL_TEXTURE_RECTANGLE with OpenGL
Sebastian Dröge [Thu, 29 Jan 2015 15:26:26 +0000 (16:26 +0100)]
glcolorconvert: Only use GL_TEXTURE_RECTANGLE with OpenGL

It's not defined for GLES.

6 years agolibgstgl: run a custom shader to convert YUV to RGB on mac and ios
Alessandro Decina [Tue, 27 Jan 2015 13:48:27 +0000 (00:48 +1100)]
libgstgl: run a custom shader to convert YUV to RGB on mac and ios

When GL_APPLE_ycbcr_422 is available, run a custom shader to convert
GL_TEXTURE_RECTANGLE textures from YUV to RGB.

See https://www.opengl.org/registry/specs/APPLE/ycbcr_422.txt

6 years agogl: initial support for texture targets other than GL_TEXTURE_2D
Alessandro Decina [Tue, 27 Jan 2015 13:13:46 +0000 (00:13 +1100)]
gl: initial support for texture targets other than GL_TEXTURE_2D

Make GstGLMemory hold the texture target (tex_target) the texture it represents
(tex_id) is bound to. Modify gst_gl_memory_wrapped_texture and
gst_gl_download_perform_with_data to take the texture target as an argument.

This change is needed to support wrapping textures created outside libgstgl,
which might be bound to a target other than GL_TEXTURE_2D. For example on OSX
textures coming from VideoToolbox have target GL_TEXTURE_RECTANGLE.

With this change we still keep (and sometimes imply) GL_TEXTURE_2D as the
target of textures created with libgstgl.

API: modify GstGLMemory
API: modify gst_gl_memory_wrapped_texture
API: gst_gl_download_perform_with_data

6 years agogstglcolorconvert: micro optimization
Alessandro Decina [Thu, 22 Jan 2015 02:18:23 +0000 (13:18 +1100)]
gstglcolorconvert: micro optimization

Don't call glClear && glClearColor at each draw since we're going to draw the
whole viewport anyway. Gets rid of a glFlush triggered by glClear on OSX.

6 years agogstglcolorconvert: relax caps features check
Alessandro Decina [Thu, 22 Jan 2015 02:11:46 +0000 (13:11 +1100)]
gstglcolorconvert: relax caps features check

Require caps to have the GST_CAPS_FEATURE_MEMORY_GL_MEMORY feature but allow
them to have more features.

6 years agogl/win32: fixup compilation
Matthew Waters [Thu, 29 Jan 2015 12:45:15 +0000 (23:45 +1100)]
gl/win32: fixup compilation

6 years agoglwindow: make showing a window explicit
Matthew Waters [Thu, 29 Jan 2015 11:25:00 +0000 (22:25 +1100)]
glwindow: make showing a window explicit

Also fixes the cgl context always displaying a window to render to for
every GstGLContextCocoa created

6 years agogl/calayer: add resize callback based on the bounds rectangle
Matthew Waters [Thu, 29 Jan 2015 06:31:09 +0000 (17:31 +1100)]
gl/calayer: add resize callback based on the bounds rectangle

6 years agogl/caopengllayer: draw asynchronously
Matthew Waters [Thu, 29 Jan 2015 04:26:21 +0000 (15:26 +1100)]
gl/caopengllayer: draw asynchronously

This essentially makes the CAOpenGLLayer draw every refresh cycle.

6 years agogl/cocoa: don't segfault if we have a NULL draw/resize/close callback
Matthew Waters [Wed, 28 Jan 2015 06:59:42 +0000 (17:59 +1100)]
gl/cocoa: don't segfault if we have a NULL draw/resize/close callback

6 years agocgl/calayer: use a callback instead of hardcoding the draw functionality
Matthew Waters [Wed, 28 Jan 2015 06:16:14 +0000 (17:16 +1100)]
cgl/calayer: use a callback instead of hardcoding the draw functionality

6 years agocgl: install the gl context and gl layer headers
Matthew Waters [Wed, 28 Jan 2015 06:13:05 +0000 (17:13 +1100)]
cgl: install the gl context and gl layer headers

6 years agocgl: add a header for the CAOpenGLLayer support
Matthew Waters [Wed, 28 Jan 2015 06:05:14 +0000 (17:05 +1100)]
cgl: add a header for the CAOpenGLLayer support

6 years agogl/dispmanx: fix build
Philippe Normand [Tue, 27 Jan 2015 10:25:53 +0000 (11:25 +0100)]
gl/dispmanx: fix build

Commit ab48bb6f0f55091662e595a001e178154ce60cdb changed the API of
GstGLWindow.

6 years agoglmemory: more compatibility defines for gles2 systems
Matthew Waters [Tue, 27 Jan 2015 03:52:47 +0000 (14:52 +1100)]
glmemory: more compatibility defines for gles2 systems

6 years agoglmemory: add some thread safety for gl operations
Matthew Waters [Tue, 27 Jan 2015 01:15:43 +0000 (12:15 +1100)]
glmemory: add some thread safety for gl operations

6 years agoglmemory: use pbo's for download
Matthew Waters [Tue, 27 Jan 2015 00:53:51 +0000 (11:53 +1100)]
glmemory: use pbo's for download

In order to use pbo's efficiently, the transfer operation has to
be separated from the use of the downloaded data which requires some
rearchitecturing around glcolorconvert/gldownload and elements

6 years agoglprototypes: add some (un)map buffer variants for GL/GLES
Matthew Waters [Tue, 27 Jan 2015 00:04:07 +0000 (11:04 +1100)]
glprototypes: add some (un)map buffer variants for GL/GLES

6 years agogltestsrc: Ensure variable is initialized before usage
Edward Hervey [Fri, 23 Jan 2015 11:41:29 +0000 (12:41 +0100)]
gltestsrc: Ensure variable is initialized before usage

Coverity CID: 1256569

6 years agogl/tests: update glwindow api change
Matthew Waters [Fri, 23 Jan 2015 06:27:42 +0000 (17:27 +1100)]
gl/tests: update glwindow api change

6 years agogl/window/eagl: fix a couple of typos
Matthew Waters [Fri, 23 Jan 2015 05:52:25 +0000 (16:52 +1100)]
gl/window/eagl: fix a couple of typos

6 years agoglwindow: cleanup/reorganize functions/members into logical groups
Matthew Waters [Fri, 23 Jan 2015 05:39:44 +0000 (16:39 +1100)]
glwindow: cleanup/reorganize functions/members into logical groups

6 years agogl/qt/examples: update for NSOpenGL -> CGL change
Matthew Waters [Fri, 23 Jan 2015 03:18:12 +0000 (14:18 +1100)]
gl/qt/examples: update for NSOpenGL -> CGL change

6 years agoglwindow: remove width/height from _draw()
Matthew Waters [Fri, 23 Jan 2015 03:11:48 +0000 (14:11 +1100)]
glwindow: remove width/height from _draw()

Depending on the platform, it was only ever implemented to 1) set a
default surface size, 2) resize based on the video frame or 3) nothing.
Instead, provide a set_preferred_size () that elements/applications
can use to request a certain size which may be ignored for
videooverlay/other cases.

6 years agoglcontext/cocoa: avoid destroying a possibly 0 GSource id
Matthew Waters [Thu, 22 Jan 2015 10:43:51 +0000 (21:43 +1100)]
glcontext/cocoa: avoid destroying a possibly 0 GSource id

6 years agogl/cocoa: move to CGL and CAOpenGLLayer for rendering
Matthew Waters [Tue, 20 Jan 2015 11:01:39 +0000 (22:01 +1100)]
gl/cocoa: move to CGL and CAOpenGLLayer for rendering

Removes the use of NSOpenGL* variety and functions.  Any Cocoa
specific functions that took/returned a NSOpenGL* object now
take/return the CGL equivalents.

6 years agoglcontext/cocoa: add debug category
Matthew Waters [Thu, 22 Jan 2015 05:08:11 +0000 (16:08 +1100)]
glcontext/cocoa: add debug category

6 years agoConstify some static arrays everywhere
Sebastian Dröge [Wed, 21 Jan 2015 09:17:04 +0000 (10:17 +0100)]
Constify some static arrays everywhere

6 years agoglimagesink: fix memleak
Nicola Murino [Sun, 18 Jan 2015 20:05:44 +0000 (21:05 +0100)]
glimagesink: fix memleak

https://bugzilla.gnome.org/show_bug.cgi?id=743142

6 years agoglapi: fix compilation with latest MSVC
Lasse Laursen [Fri, 16 Jan 2015 23:06:40 +0000 (10:06 +1100)]
glapi: fix compilation with latest MSVC

https://bugzilla.gnome.org/show_bug.cgi?id=743041

6 years agoglmemory: use the correct size for the pbo
Matthew Waters [Thu, 15 Jan 2015 01:57:59 +0000 (12:57 +1100)]
glmemory: use the correct size for the pbo

It was missing the GstVideoAlignment padding which could cause GL
errors related to overrunning the size of the pbo.

6 years agoglvideomixer: don't upload if alpha <= 0
Matthew Waters [Wed, 14 Jan 2015 22:47:45 +0000 (09:47 +1100)]
glvideomixer: don't upload if alpha <= 0

Implemented using a upload_buffer vfunc within GstGLMixer allowing
NULL uploaded buffers.

6 years agoglmemory: remove spurious gst_video_info_align
Matthew Waters [Wed, 14 Jan 2015 22:45:21 +0000 (09:45 +1100)]
glmemory: remove spurious gst_video_info_align

That will be taken care of by the calling code (typically a bufferpool).
The GstVideoAlignment is purely informational to compute plane data sizes.

6 years agogl: split glcolorconvert usage from glupload
Matthew Waters [Wed, 14 Jan 2015 11:08:43 +0000 (22:08 +1100)]
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.

6 years agoglmemory: offset the data pointer for upload for GstVideoAlignment
Matthew Waters [Wed, 14 Jan 2015 01:39:11 +0000 (12:39 +1100)]
glmemory: offset the data pointer for upload for GstVideoAlignment

otherwise we attempt to read from the padding data

6 years agoglmemory: use pbo's for upload
Matthew Waters [Tue, 13 Jan 2015 13:08:11 +0000 (00:08 +1100)]
glmemory: use pbo's for upload

6 years agoglupload: relax the GLMemory uploader check for input caps features
Matthew Waters [Tue, 13 Jan 2015 12:47:06 +0000 (23:47 +1100)]
glupload: relax the GLMemory uploader check for input caps features

As there may be a sysmem caps features with GLMemory filled buffers.
e.g.

videotestsrc ! glimagesink

6 years agoglcolorconvert: fix memleak
Nicola Murino [Thu, 25 Dec 2014 22:10:19 +0000 (23:10 +0100)]
glcolorconvert: fix memleak

https://bugzilla.gnome.org/show_bug.cgi?id=741943

6 years agoglupload: fix some memory leaks
Nicola Murino [Thu, 25 Dec 2014 21:59:42 +0000 (22:59 +0100)]
glupload: fix some memory leaks

https://bugzilla.gnome.org/show_bug.cgi?id=741943

6 years agoglcontext: allow wrapped contexts to be utilised like non-wrapped contexts
Matthew Waters [Wed, 31 Dec 2014 06:45:53 +0000 (17:45 +1100)]
glcontext: allow wrapped contexts to be utilised like non-wrapped contexts

Fill in the missing pieces like get_proc_address, the gl function vtable

6 years agogl/cocoa: Disable hack for NSApp iteration with a special #define
Sebastian Dröge [Sat, 10 Jan 2015 14:34:57 +0000 (15:34 +0100)]
gl/cocoa: Disable hack for NSApp iteration with a special #define

The hack causes deadlocks and other interesting problems and it really
can only be fixed properly inside GLib. We will include a patch for
GLib in our builds for now that handles this, and hopefully at some
point GLib will also merge a proper solution.

A proper solution would first require to refactor the polling in
GMainContext to only provide a single fd, e.g. via epoll/kqueue
or a thread like the one added by our patch. Then this single
fd could be retrieved from the GMainContext and directly integrated
into a NSRunLoop.

https://bugzilla.gnome.org/show_bug.cgi?id=741450
https://bugzilla.gnome.org/show_bug.cgi?id=704374

6 years agogl/cocoa: Don't init and clear static GMutex / GCond
Sebastian Dröge [Thu, 8 Jan 2015 08:35:23 +0000 (09:35 +0100)]
gl/cocoa: Don't init and clear static GMutex / GCond

We would potentially use it from the main loop later in
gst_gl_window_cocoa_init_nsapp() if it timed out before.

6 years agoglfilter: remove logically dead code
Luis de Bethencourt [Wed, 7 Jan 2015 16:53:41 +0000 (16:53 +0000)]
glfilter: remove logically dead code

Soon after setting two variables to 1, the code checks if their values are
different from each other. This would never be true. Removing this.

CID 1226443

6 years agoglmixer, glvideomixer: update for GstAggregatorPadForeachFunc change
Tim-Philipp Müller [Tue, 30 Dec 2014 19:43:43 +0000 (19:43 +0000)]
glmixer, glvideomixer: update for GstAggregatorPadForeachFunc change

6 years agoglmixer: update for aggregator start/stop vfunc change
Tim-Philipp Müller [Tue, 30 Dec 2014 19:26:47 +0000 (19:26 +0000)]
glmixer: update for aggregator start/stop vfunc change

6 years agoglvideomixer: Point to compositor for the pad properties documentation
Nirbheek Chauhan [Sat, 27 Dec 2014 10:20:17 +0000 (15:50 +0530)]
glvideomixer: Point to compositor for the pad properties documentation

6 years agogltest: Port to new API
Nicolas Dufresne [Fri, 19 Dec 2014 18:18:50 +0000 (13:18 -0500)]
gltest: Port to new API

https://bugzilla.gnome.org/show_bug.cgi?id=740900

6 years agoglbufferpool: Always recalculate buffer size
Nicolas Dufresne [Fri, 19 Dec 2014 17:22:12 +0000 (12:22 -0500)]
glbufferpool: Always recalculate buffer size

Actually we should always recalculate buffer size since our buffer size
even when not-padded is smaller for many sub-sampled formats. This is
because we don't add padding between the planes.

https://bugzilla.gnome.org/show_bug.cgi?id=740900