platform/upstream/gstreamer.git
6 years agoglmemory: fix the slight difference between EXT_rg and ARB_rg
Matthew Waters [Sat, 14 Mar 2015 18:45:01 +0000 (18:45 +0000)]
glmemory: fix the slight difference between EXT_rg and ARB_rg

GL_EXT_texture_rg doesn't take sized formats for the internalformat
parameter of TexImage* but GL_ARB_texture_rg and GL(ES)3 do.

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

6 years agogl/examples: fixup generic cube example for NDC
Matthew Waters [Sat, 14 Mar 2015 18:10:24 +0000 (18:10 +0000)]
gl/examples: fixup generic cube example for NDC

translating outside the clip region doesn't work

6 years agogl/examples: add sdlshare2 that uses glimagesink to output textures
Julien Isorce [Sat, 14 Mar 2015 15:38:28 +0000 (15:38 +0000)]
gl/examples: add sdlshare2 that uses glimagesink to output textures

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

6 years agoglimagesink: keep window invisible when sharing output
Julien Isorce [Sat, 14 Mar 2015 16:30:42 +0000 (16:30 +0000)]
glimagesink: keep window invisible when sharing output

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

6 years agoglimagesink: provide GstSample in client-draw signal
Julien Isorce [Sat, 14 Mar 2015 15:16:55 +0000 (15:16 +0000)]
glimagesink: provide GstSample in client-draw signal

Instead of prividing texture and size directly.
And apply changes to examples.

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

6 years agosdlshare: use glupload and unmap frame
Julien Isorce [Sat, 14 Mar 2015 15:37:05 +0000 (15:37 +0000)]
sdlshare: use glupload and unmap frame

6 years agoglsyncmeta: make context to wait and set sync explicit
Matthew Waters [Sat, 14 Mar 2015 16:25:29 +0000 (16:25 +0000)]
glsyncmeta: make context to wait and set sync explicit

otherwise we may wait on a sync object in same context by accident

6 years agoglimagesink: Add NULL check in error case
Nicolas Dufresne [Sat, 14 Mar 2015 12:58:22 +0000 (12:58 +0000)]
glimagesink: Add NULL check in error case

Other context may be NULL if something went wrong. Avoid trying to unref
a NULL pointer.

6 years agoglupload/colorconvert: only copy timestamps if the input buffer != output
Matthew Waters [Sat, 14 Mar 2015 10:39:06 +0000 (10:39 +0000)]
glupload/colorconvert: only copy timestamps if the input buffer != output

6 years agogl: add GstGLDisplayCocoa
Julien Isorce [Wed, 11 Mar 2015 00:06:55 +0000 (00:06 +0000)]
gl: add GstGLDisplayCocoa

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

6 years agoexamples: initialize NSApp at the beginning
Julien Isorce [Fri, 13 Mar 2015 09:07:16 +0000 (09:07 +0000)]
examples: initialize NSApp at the beginning

6 years agogl/cocoa: do not terminate loop in gst_gl_window_cocoa_close
Julien Isorce [Sat, 14 Mar 2015 07:49:14 +0000 (07:49 +0000)]
gl/cocoa: do not terminate loop in gst_gl_window_cocoa_close

It is now done in _finalize.

Fix regression introduced by
"gl/window: create the main loop/context on init/finalize"
bc7a7259f357b0065dd94e0668b5a895d83fa53a

6 years agogl: avoid overwriting display and context to NULL
Julien Isorce [Fri, 13 Mar 2015 15:34:55 +0000 (15:34 +0000)]
gl: avoid overwriting display and context to NULL

It happens when the application provides display
and/or context.

6 years agoglshader: attribute locations are -1 on error
Matthew Waters [Fri, 13 Mar 2015 17:41:17 +0000 (17:41 +0000)]
glshader: attribute locations are -1 on error

6 years agoglshader: prevent from getting attributes without vertex shader
Neos3452 [Fri, 13 Mar 2015 17:04:17 +0000 (17:04 +0000)]
glshader: prevent from getting attributes without vertex shader

It doesn't make sense to query for vertex attributes without a vertex
shader. Moreover this is causing a crash on OSX.

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

6 years agoGL: Remove annoying printf in the filterbin class_init
Jan Schmidt [Fri, 13 Mar 2015 15:53:00 +0000 (02:53 +1100)]
GL: Remove annoying printf in the filterbin class_init

6 years agoglimagesink: add pixel-aspect-ratio property on the bin
Matthew Waters [Fri, 13 Mar 2015 12:43:13 +0000 (12:43 +0000)]
glimagesink: add pixel-aspect-ratio property on the bin

6 years agoglupload: unref the bufferpool
Matthew Waters [Fri, 13 Mar 2015 12:40:04 +0000 (12:40 +0000)]
glupload: unref the bufferpool

6 years agoglimagesink: forward ALL the properties on the bin
Matthew Waters [Fri, 13 Mar 2015 12:29:54 +0000 (12:29 +0000)]
glimagesink: forward ALL the properties on the bin

6 years agogluploadelement: properly unref buffers that are the same as the input
Matthew Waters [Fri, 13 Mar 2015 12:28:36 +0000 (12:28 +0000)]
gluploadelement: properly unref buffers that are the same as the input

basetransform doesn't unref equal input and output buffers

6 years agogl: get the context from basemixer/basefilter
Matthew Waters [Fri, 13 Mar 2015 10:25:35 +0000 (10:25 +0000)]
gl: get the context from basemixer/basefilter

6 years agogl: retreive the gldisplay/app gl context as soon as possible
Matthew Waters [Fri, 13 Mar 2015 09:38:54 +0000 (09:38 +0000)]
gl: retreive the gldisplay/app gl context as soon as possible

fixes the usage of gst_gl_display_filter_gl_api

6 years agogl/tests: fix deadlock on glcontext wrapped context test
Matthew Waters [Fri, 13 Mar 2015 09:37:46 +0000 (09:37 +0000)]
gl/tests: fix deadlock on glcontext wrapped context test

6 years agoglcolorconvert: cache indices in a buffer object
Julien Isorce [Thu, 12 Mar 2015 16:46:44 +0000 (16:46 +0000)]
glcolorconvert: cache indices in a buffer object

6 years agocaopengllayersink: implement as a bin like glimagesink
Matthew Waters [Sun, 8 Mar 2015 07:16:04 +0000 (18:16 +1100)]
caopengllayersink: implement as a bin like glimagesink

6 years agogl/cocoa: avoid deadlock when creating context on the main thread.
Matthew Waters [Tue, 3 Mar 2015 07:05:04 +0000 (18:05 +1100)]
gl/cocoa: avoid deadlock when creating context on the main thread.

Make window/view creation async so that it is possible to
gst_gl_context_create from the main thread.

6 years agogl: store the list of contexts within gldisplay
Matthew Waters [Tue, 3 Mar 2015 06:26:47 +0000 (17:26 +1100)]
gl: store the list of contexts within gldisplay

Removes the reliance on the allocation query to propogate GL contexts.

Allows thread safely getting a context for the a specific thread.

6 years agoglimagesink: unset the current shader after rendering
Matthew Waters [Tue, 3 Mar 2015 05:48:24 +0000 (16:48 +1100)]
glimagesink: unset the current shader after rendering

fixes gltestsrc ! glimagesink when gltestsrc doesn't use a shader

6 years agogltestsrc: remove usage of gldownload library object
Matthew Waters [Tue, 3 Mar 2015 05:38:56 +0000 (16:38 +1100)]
gltestsrc: remove usage of gldownload library object

6 years agoglcontext: store the thread current context
Matthew Waters [Fri, 27 Feb 2015 13:30:38 +0000 (00:30 +1100)]
glcontext: store the thread current context

6 years agogl: new glsrcbin element
Matthew Waters [Thu, 26 Feb 2015 07:26:36 +0000 (18:26 +1100)]
gl: new glsrcbin element

6 years agoglvideomixer: implement with glmixerbin
Matthew Waters [Thu, 26 Feb 2015 02:45:56 +0000 (13:45 +1100)]
glvideomixer: implement with glmixerbin

The relevant properties are forwarded to/from the containing bin
and sink pads.

6 years agoglmixer: remove usage of upload/download objects
Matthew Waters [Wed, 25 Feb 2015 13:20:37 +0000 (00:20 +1100)]
glmixer: remove usage of upload/download objects

6 years agogl: new glmixerbin element
Matthew Waters [Wed, 25 Feb 2015 12:48:56 +0000 (23:48 +1100)]
gl: new glmixerbin element

6 years agoglimagesink: implement as a bin
Matthew Waters [Fri, 20 Feb 2015 05:47:01 +0000 (16:47 +1100)]
glimagesink: implement as a bin

glupload ! glcolorconvert ! sink

Some properties are manually forwarded.  The rest are available using
GstChildProxy.

The two signals are forwarded as well.

6 years agogl: new glsinkbin element
Matthew Waters [Thu, 19 Feb 2015 07:23:37 +0000 (18:23 +1100)]
gl: new glsinkbin element

similar to glfilterbin but for sinks

6 years agoglfilter: don't use the library upload/convert objects
Matthew Waters [Thu, 19 Feb 2015 03:19:59 +0000 (14:19 +1100)]
glfilter: don't use the library upload/convert objects

6 years agogl: new element glfilterbin
Matthew Waters [Thu, 19 Feb 2015 02:33:28 +0000 (13:33 +1100)]
gl: new element glfilterbin

It encapsulates a confiurable GL processing element in the
upload/colorconvert/download dance required to transparently process
the majority of GstBuffer's.

6 years agogl: add new gldownloadelement
Matthew Waters [Thu, 19 Feb 2015 02:24:59 +0000 (13:24 +1100)]
gl: add new gldownloadelement

Simply transforms caps to/from raw/glmemory capsfeatures

6 years agogl: add a new glcolorconvert element based on the glcolorconvert library object
Matthew Waters [Thu, 12 Feb 2015 06:59:27 +0000 (17:59 +1100)]
gl: add a new glcolorconvert element based on the glcolorconvert library object

6 years agoglupload: implement propose_allocation pool handling for glmemory upload
Matthew Waters [Wed, 11 Mar 2015 16:56:16 +0000 (16:56 +0000)]
glupload: implement propose_allocation pool handling for glmemory upload

6 years agogl: add a new glupload element based on the glupload library object
Matthew Waters [Wed, 11 Feb 2015 12:29:01 +0000 (23:29 +1100)]
gl: add a new glupload element based on the glupload library object

6 years agogl: add a new glbasemixer class below glmixer
Matthew Waters [Wed, 11 Feb 2015 03:48:45 +0000 (14:48 +1100)]
gl: add a new glbasemixer class below glmixer

It deals with propagating the gl display/contexts throughout the
application/pipeline

6 years agogl: add a new glbasefilter class below glfilter
Matthew Waters [Tue, 10 Feb 2015 14:48:11 +0000 (01:48 +1100)]
gl: add a new glbasefilter class below glfilter

It deals with propagating the gl display/contexts throughout the
application/pipeline

6 years agoglutils: expose running a query on a set of src/sink pads
Matthew Waters [Tue, 10 Feb 2015 14:27:28 +0000 (01:27 +1100)]
glutils: expose running a query on a set of src/sink pads

6 years agoglfilter: advertise resize in the caps negotiation properly
Matthew Waters [Thu, 12 Mar 2015 10:14:50 +0000 (10:14 +0000)]
glfilter: advertise resize in the caps negotiation properly

6 years agoglcolorconvert: we don't do resizing of the video frames
Matthew Waters [Thu, 12 Mar 2015 09:46:02 +0000 (09:46 +0000)]
glcolorconvert: we don't do resizing of the video frames

As we cannot do accurate texel sampling then due to the texture
coordinates being interpolated based on the output frame size.

6 years agogl/x11: don't XGetWindowAttributes every XEvent
Matthew Waters [Wed, 11 Mar 2015 18:49:22 +0000 (18:49 +0000)]
gl/x11: don't XGetWindowAttributes every XEvent

fixes a deadlock in xcb where the X window may not exist.

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

6 years agogl/window: hopefully fixup compile warnings on android/ios
Matthew Waters [Wed, 11 Mar 2015 14:50:28 +0000 (14:50 +0000)]
gl/window: hopefully fixup compile warnings on android/ios

6 years agoglfilter: Remove redundant check for clearing context on reset.
Jan Schmidt [Wed, 11 Mar 2015 06:19:17 +0000 (17:19 +1100)]
glfilter: Remove redundant check for clearing context on reset.

The context is already cleared a few lines above.

6 years agoRemove a bunch of silly ';;' typos at the end of lines
Jan Schmidt [Wed, 11 Mar 2015 05:55:14 +0000 (16:55 +1100)]
Remove a bunch of silly ';;' typos at the end of lines

6 years agogl/window: create the main loop/context on init/finalize
Matthew Waters [Fri, 6 Mar 2015 04:31:18 +0000 (15:31 +1100)]
gl/window: create the main loop/context on init/finalize

Avoids races setting the window handle from the main thread.

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

6 years agotests: glcontext: remove unnecessary semicolon
hoonhee.lee [Mon, 9 Mar 2015 03:41:59 +0000 (12:41 +0900)]
tests: glcontext: remove unnecessary semicolon

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

6 years agoglmixer: Don't share our downstream pool with upstream
Nicolas Dufresne [Sat, 7 Mar 2015 01:11:00 +0000 (20:11 -0500)]
glmixer: Don't share our downstream pool with upstream

Pool cannot have multiple owner. This can lead to spurious
pool was flushing error.

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

6 years agoglfilter: Don't chain downstream pool
Nicolas Dufresne [Thu, 5 Mar 2015 21:28:36 +0000 (16:28 -0500)]
glfilter: Don't chain downstream pool

Chaining a downstream pool would lead to two owner of the same
pool. In dynamic pipeline, if one owner is removed from the pipeline
the pool will be stopped, and the rest of the pipeline will fail
since the pool will now be flushing. Also fix proposed pool caching,
filter->pool was never set, never unrefed.

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

6 years agoglimagesink: Only cache pool, don't manage it
Nicolas Dufresne [Thu, 5 Mar 2015 20:49:50 +0000 (15:49 -0500)]
glimagesink: Only cache pool, don't manage it

GLImage does not use any kind of internal pool. There was some
remaining code and comment stating that it was managing the
pool, and it was in fact setting the active state when doing
to ready state.

* Only create the pool if requested and in propose_allocation
* Cache the pool to avoid reallocation on spurious reconfigure
* Don't try to deactivate the pool (we don't own it)

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

6 years agogldownload: Simplify caps feature setting code
Sebastian Dröge [Fri, 6 Mar 2015 17:54:24 +0000 (18:54 +0100)]
gldownload: Simplify caps feature setting code

6 years agogl: Remove format info in glcolorconvert's transform_caps function instead of on...
Sebastian Dröge [Fri, 6 Mar 2015 17:15:11 +0000 (18:15 +0100)]
gl: Remove format info in glcolorconvert's transform_caps function instead of on every caller

... and let glmixer actually transform the caps it is supposed to transform
instead of inventing new caps.

6 years agoglupload: Simplify caps feature setting code
Sebastian Dröge [Fri, 6 Mar 2015 17:36:12 +0000 (18:36 +0100)]
glupload: Simplify caps feature setting code

6 years agogldisplay: Only use debugging if we have valid values
Edward Hervey [Thu, 5 Mar 2015 18:09:49 +0000 (19:09 +0100)]
gldisplay: Only use debugging if we have valid values

The debug category won't have been created/activated if it's not a
valid display

6 years agogloverlay: Fix upside down and miss-aligned JPEG
Nicolas Dufresne [Tue, 3 Mar 2015 20:22:38 +0000 (15:22 -0500)]
gloverlay: Fix upside down and miss-aligned JPEG

LibJPEG uses macroblock of 8x8 sample. In this element we use RGB and
Y444, two 24bit formats that are stored in 32bit pixels. This mean we
have 32x32 bytes macroblocks. For this reason, we need to allocate
our buffer slightly larger. We also need to pass the line pointer in
the right order, otherwise the image endup upside-down.

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

6 years agogltransformation: normalize translations
Xavier Claessens [Thu, 19 Feb 2015 02:21:01 +0000 (21:21 -0500)]
gltransformation: normalize translations

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

* Lubosz: use maxfloat for transformation range

6 years agogltransformation: Fix doc typo
Xavier Claessens [Thu, 19 Feb 2015 01:41:14 +0000 (20:41 -0500)]
gltransformation: Fix doc typo

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

6 years agoglfilter: Get rid of uploader if caps have changed
Nicolas Dufresne [Tue, 3 Mar 2015 18:45:46 +0000 (13:45 -0500)]
glfilter: Get rid of uploader if caps have changed

We need to update the uploader format if that caps have changed.

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

6 years agogl: Fix context leaks
Edward Hervey [Tue, 3 Mar 2015 15:55:26 +0000 (16:55 +0100)]
gl: Fix context leaks

Introduced by a12ca13750a15300ab3c718ebde2984dc3d587b3

6 years agogl/cocoa: register only one custom nsapp loop
Julien Isorce [Sun, 1 Mar 2015 19:57:23 +0000 (19:57 +0000)]
gl/cocoa: register only one custom nsapp loop

Otherwise the pipeline stalls when running
more than one glimagesink with gst-launch.

Also only register the custom nsapp loop
when setting up the nsapp from gstgl.

6 years agogl/cocoa: instead of class_init use g_once to setup nsapp
Julien Isorce [Sun, 1 Mar 2015 16:54:10 +0000 (16:54 +0000)]
gl/cocoa: instead of class_init use g_once to setup nsapp

6 years agogl/cocoa: check for deprecated constants prior to OSX 10.10
Julien Isorce [Thu, 26 Feb 2015 23:04:09 +0000 (23:04 +0000)]
gl/cocoa: check for deprecated constants prior to OSX 10.10

6 years agoglbufferpool: Fix offset for odd height
Nicolas Dufresne [Sun, 1 Mar 2015 14:43:32 +0000 (09:43 -0500)]
glbufferpool: Fix offset for odd height

We also need to recalculate the offset, since otherwise the frame
mapping will be forward two lines in the U and V planes (I420) due
to gst_video_info_align() round up the Y plane to a even number of
lines.

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

6 years agogl-test: Port unit tests to new API
Nicolas Dufresne [Sun, 1 Mar 2015 05:08:42 +0000 (00:08 -0500)]
gl-test: Port unit tests to new API

6 years agoglmemory: Support offset when downloading
Nicolas Dufresne [Sat, 28 Feb 2015 20:00:13 +0000 (15:00 -0500)]
glmemory: Support offset when downloading

Make sure we support offset and video alignment when downloading too.
This is currently not used (plane_start is always 0), but it makes
the code correct if we want to use that later.

6 years agoglmemory: Provide correct size on upload
Nicolas Dufresne [Sat, 28 Feb 2015 18:01:16 +0000 (13:01 -0500)]
glmemory: Provide correct size on upload

Provide the right size to GL when uploading. Using maxsize is wrong
since we offset the data point with the memory offset and video
alignement offset.

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

6 years agoglmemory: Provide correct size on download
Nicolas Dufresne [Sat, 28 Feb 2015 17:48:03 +0000 (12:48 -0500)]
glmemory: Provide correct size on download

Provide the right size to GL when downloading. This fixes downloading
from GLMemory that where created for libav.

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

6 years agoglmemory: Use fallback for partial copy
Nicolas Dufresne [Sat, 28 Feb 2015 16:55:26 +0000 (11:55 -0500)]
glmemory: Use fallback for partial copy

When the memory is partial copy, the texture size and videoinfo no
longer make sense. As we cannot guess what the application wants, we
safely copy into a sysmem memory.

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

6 years agoglmemory: Add GstAllocationParams and alignment support
Nicolas Dufresne [Wed, 25 Feb 2015 23:07:03 +0000 (18:07 -0500)]
glmemory: Add GstAllocationParams and alignment support

This implements support for GstAllocationParams and memory alignments.
The parameters where simply ignored which could lead to crash on
certain platform when used with libav and no luck.

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

6 years agoglupload: perform egl upload on the gl thread
Matthew Waters [Sat, 28 Feb 2015 07:21:33 +0000 (18:21 +1100)]
glupload: perform egl upload on the gl thread

Fixes EGLImage usage on raspberry pi

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

6 years agoglupload: Set freed method implementation to NULL
Víctor Manuel Jáquez Leal [Thu, 26 Feb 2015 12:20:26 +0000 (13:20 +0100)]
glupload: Set freed method implementation to NULL

When trying to render buffers with meta:GLTextureUpload the glimagesink crashes
with a segmentation fault.

This patch workarounds this crash setting to NULL the method implementation
after free.

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

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