platform/upstream/gstreamer.git
8 years agoglwindow: Hide navigation specific internal API and add API to asynchronously send...
Sebastian Dröge [Mon, 21 Dec 2015 10:27:09 +0000 (11:27 +0100)]
glwindow: Hide navigation specific internal API and add API to asynchronously send navigation events

Exposing the navigation thread's main context, GSourceFuncs and structs called
key_event and mouse_event is exposing a bit too much of the internals. Let's
just go with two functions to asynchronously send navigation events on the
window with the same API as the synchronous ones.

8 years agoglwindow: Use g_thread_join() instead of a custom condition variable for waiting...
Sebastian Dröge [Mon, 21 Dec 2015 09:46:52 +0000 (10:46 +0100)]
glwindow: Use g_thread_join() instead of a custom condition variable for waiting for the navigation thread to finish

Also hide some internal functions and fields while we're at it and fix
a race condition with the startup condition variable.

8 years agoglwindow: Fix memory leak of navigation thread
Haihua Hu [Mon, 30 Nov 2015 01:36:09 +0000 (09:36 +0800)]
glwindow: Fix memory leak of navigation thread

When stopping the navigation thread, call g_thread_join() to release
the resources hold by it.

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

8 years agoassrender, dvbsuboverlay: fix example pipelines in docs
Tim-Philipp Müller [Sat, 19 Dec 2015 21:25:49 +0000 (21:25 +0000)]
assrender, dvbsuboverlay: fix example pipelines in docs

8 years agohlsdemux: reflow update_playlist a bit
Tim-Philipp Müller [Sat, 19 Dec 2015 21:10:56 +0000 (21:10 +0000)]
hlsdemux: reflow update_playlist a bit

Reduce indentation by erroring out directly on failure.

8 years agohlsdemux: fix potential error leak
Tim-Philipp Müller [Sat, 19 Dec 2015 20:59:12 +0000 (20:59 +0000)]
hlsdemux: fix potential error leak

Clear error as soon as we determine that the download failed,
otherwise there are code paths where we might return without
clearing it ever, which would leak the GError then. Also, we
can pass a NULL GError pointer to _fetch_uri(), so just do that
instead of passing one that we're going to just free again
right away anyway.

8 years agoopencv: remove unneeded sink_event function in pyramidsegment
Luis de Bethencourt [Sat, 19 Dec 2015 12:05:59 +0000 (12:05 +0000)]
opencv: remove unneeded sink_event function in pyramidsegment

8 years agoopencv: remove unneeded sink_event function in textoverlay
Luis de Bethencourt [Sat, 19 Dec 2015 12:04:01 +0000 (12:04 +0000)]
opencv: remove unneeded sink_event function in textoverlay

8 years agotemplatematch: remove useless function
Thiago Santos [Fri, 18 Dec 2015 21:51:49 +0000 (18:51 -0300)]
templatematch: remove useless function

8 years agohlsdemux: always set timestamp on reverse playback
Thiago Santos [Fri, 18 Dec 2015 14:56:17 +0000 (11:56 -0300)]
hlsdemux: always set timestamp on reverse playback

Downstream needs to be able to restore the timestamps after a discont
to do reverse playback

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

8 years agoglconvert: Fix compilation of GRAY16_LE/BE shader
Nicolas Dufresne [Fri, 18 Dec 2015 20:36:40 +0000 (15:36 -0500)]
glconvert: Fix compilation of GRAY16_LE/BE shader

8 years agoglupload: Add dmabuf upload method.
Nicolas Dufresne [Fri, 13 Nov 2015 16:24:30 +0000 (17:24 +0100)]
glupload: Add dmabuf upload method.

This upload method detect and optimize uploads of DMABuf memory. This is
done by creating and caching EGLImages wrapper around DMABuf. The
EGLImages are then binded to a texture which get converter using
standard shader.

Example pipeline:

GST_GL_PLATFORM=egl \
gst-launch-1.0 v4l2src device=/dev/video1 io-mode=4 ! \
               video/x-raw,format=NV12 ! glimagesink

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

8 years agoeglimagememory: Also import BGR16, ABGR, xBGR, AYUV, GRAY16_LE/BE and Y444
Nicolas Dufresne [Fri, 18 Dec 2015 20:52:46 +0000 (15:52 -0500)]
eglimagememory: Also import BGR16, ABGR, xBGR, AYUV, GRAY16_LE/BE and Y444

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

8 years agoeglimagememory: Add RGB/BGR DMABuf importation support
Nicolas Dufresne [Fri, 18 Dec 2015 16:08:29 +0000 (11:08 -0500)]
eglimagememory: Add RGB/BGR DMABuf importation support

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

8 years agoeglimagememory: Methods to create GstGLMemory from dmabufs
Lubosz Sarnecki [Fri, 13 Nov 2015 16:40:08 +0000 (17:40 +0100)]
eglimagememory: Methods to create GstGLMemory from dmabufs

Maps GstVideoFormats to suitable DRM fourccs which work with
glcolorconvert, using gst_gl_memory_alloc(). We require mostly
only 4 formats to be supported by the driver. We require DRM
equivalent to RGB16, RGBA, R8 and RG88. This way it's compatible with
DesktopGL, since GL_TEXTURE_2D is used and limit driver requirements.
With this we can virtually support all formats the glcolorconvert
supports.

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

8 years agobuild: Add dmabuf build condition.
Lubosz Sarnecki [Fri, 2 Oct 2015 11:31:39 +0000 (13:31 +0200)]
build: Add dmabuf build condition.

configure.ac: Build dmabuf when EGL and drm_fourcc.h is available.
gl: Link gst-allocators.

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

8 years agoglimagesink: Show error when video frame is not mapped.
Lubosz Sarnecki [Fri, 13 Nov 2015 16:09:13 +0000 (17:09 +0100)]
glimagesink: Show error when video frame is not mapped.

Adds more meaningful error than
"Failed to convert multiview video buffer", which is always used
when prepare_next_buffer() fails in gst_glimage_sink_prepare().

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

8 years agogstglcontext_egl: Expose gst_gl_context_egl_get_error_string.
Lubosz Sarnecki [Fri, 13 Nov 2015 16:05:11 +0000 (17:05 +0100)]
gstglcontext_egl: Expose gst_gl_context_egl_get_error_string.

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

8 years agoopencv: update opencvtextoverlay to GstOpencvVideoFilter
Luis de Bethencourt [Fri, 18 Dec 2015 16:56:04 +0000 (16:56 +0000)]
opencv: update opencvtextoverlay to GstOpencvVideoFilter

Update opencvtextoverlay to inherit from GstOpencvVideoFilter instead of
from GstElement. This means less code and more uniformity with other OpenCV
elements. The chain/transform function is now a third of the size than
before.

8 years agoopencv: update templatematch to GstOpencvVideoFilter
Luis de Bethencourt [Fri, 18 Dec 2015 16:18:52 +0000 (16:18 +0000)]
opencv: update templatematch to GstOpencvVideoFilter

Update pyramidsegment to inherit from GstOpencvVideoFilter instead of from
GstElement. This means less code and more uniformity with other OpenCV
elements.

8 years agoopencv: update pyramidsegment to GstOpencvVideoFilter
Luis de Bethencourt [Fri, 18 Dec 2015 15:48:16 +0000 (15:48 +0000)]
opencv: update pyramidsegment to GstOpencvVideoFilter

Update pyramidsegment to inherit from GstOpencvVideoFilter instead of from
GstElement. This means less code and more uniformity with other OpenCV
elements.

8 years agodecklinkvideosink: Made "auto" mode work according to caps
Vivia Nikolaidou [Thu, 17 Dec 2015 15:26:29 +0000 (17:26 +0200)]
decklinkvideosink: Made "auto" mode work according to caps

When the mode of decklinkvideosink is set to "auto", the sink claims to
support the full set of caps that it can support for all modes. Then, every
time new caps are set, the sink will automatically find the correct mode for
these caps and set it.

Caveat: We have no way to know whether a specific mode will actually work for
your hardware. Therefore, if you try sending 4K video to a 1080 screen, it
will silently fail, we have no way to know that in advance. Manually setting
that mode at least gave the user a way to double-check what they are doing.

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

8 years agoopencv: update motioncells to GstOpencvVideoFilter
Luis de Bethencourt [Fri, 18 Dec 2015 12:28:23 +0000 (12:28 +0000)]
opencv: update motioncells to GstOpencvVideoFilter

Update motioncells to inherit from GstOpencvVideoFilter instead of from
GstElement. This means less code and more uniformity with other OpenCV
elements.

8 years agodirectsoundsrc: add device property as it is done in directsoundsink
Thomas Roos [Fri, 18 Dec 2015 11:26:16 +0000 (12:26 +0100)]
directsoundsrc: add device property as it is done in directsoundsink

This allows selection of the device by GUID instead of the name. The name is
user-given and multiple devices can have the same name.

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

8 years agodirectsoundsrc: Convert header from (some) DOS line endings to UNIX
Sebastian Dröge [Fri, 18 Dec 2015 11:36:26 +0000 (12:36 +0100)]
directsoundsrc: Convert header from (some) DOS line endings to UNIX

A mix between different line endings in the same file is not a good idea,
and the .c files are both with UNIX line endings so let's use that.

8 years agoapplemedia: set -mmacosx-version-min to 10.8
Julien Isorce [Fri, 18 Dec 2015 10:30:25 +0000 (10:30 +0000)]
applemedia: set -mmacosx-version-min to 10.8

Otherwise qtkitvideosrc fails to build on OSX 10.10.4
because QTKit has been deprecated since OS X 10.9.

Also set -mmacosx-version-min=10.8 in front to allow
the user or cerbero to override the version.

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

8 years agoglmemory: add gst_gl_memory_allocator_get_default
Alessandro Decina [Fri, 18 Dec 2015 02:17:34 +0000 (13:17 +1100)]
glmemory: add gst_gl_memory_allocator_get_default

Add gst_gl_memory_allocator_get_default to get the default allocator based on
the opengl version. Allows us to stop hardcoding the PBO allocator which isn't
supported on gles2.

Fixes GL upload on iOS9 among other things.

8 years agoglimagesink: don't deadlock on resize
Matthew Waters [Fri, 18 Dec 2015 00:49:25 +0000 (11:49 +1100)]
glimagesink: don't deadlock on resize

Performing any GL function marshalling off the GL thread with glimagesink's
render lock is prone to deadlocks between the GL thread and the non-GL thread.

What can happen is this:
1. non-GL thread attempts to function marshal to the GL thread.
2. while 1 is happening, the winsys gives an event (say resize)
3. This calls back into glimagesink which taks the render lock.
4. As the GL function marshalling is attempting to run on the GL
   and already has glimagesink's render lock locked.  This deadlocks
   as the threads are waiting for each other.

8 years agoopencv: update edgedetect to GstOpencvVideoFilter
Luis de Bethencourt [Thu, 17 Dec 2015 18:16:44 +0000 (18:16 +0000)]
opencv: update edgedetect to GstOpencvVideoFilter

Update edgedetect to inherit from GstOpencvVideoFilter instead of from
GstElement. This means less code and more uniformity with other OpenCV
elements.

8 years agoopenjpegdec: Don't crash when decoding returns NULL data for any component
Sebastian Dröge [Thu, 17 Dec 2015 14:56:57 +0000 (15:56 +0100)]
openjpegdec: Don't crash when decoding returns NULL data for any component

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

8 years agoglbasememory: don't unconditionally add the alignment bytes to the size
Matthew Waters [Tue, 15 Dec 2015 03:14:36 +0000 (14:14 +1100)]
glbasememory: don't unconditionally add the alignment bytes to the size

e.g when wrapping a data pointer we don't want to map/unmap off the end of
pointer with the alignment bytes.

Instead track that information separately as maxsize is used for mapping by
GstMemory and thus represents a size without any alignment padding bytes.

8 years agoopencv: add blur and bilateral support in cvsmooth
Luis de Bethencourt [Thu, 17 Dec 2015 09:51:31 +0000 (10:51 +0100)]
opencv: add blur and bilateral support in cvsmooth

Adding the support for the two other OpenCV linear filters to smooth
images. The new API does support spatial sigma in the bilateral filter,
hence bringing that property back.

Adding reference to new documentation.

8 years agopnmenc: Fix wrong logic leading to memory mishandling
Vineeth TM [Wed, 16 Dec 2015 23:51:48 +0000 (08:51 +0900)]
pnmenc: Fix wrong logic leading to memory mishandling

While encoding the frame in ASCII mode, per component four bytes are needed
and after every 20 bytes, a \n will be added. So the calculation should be
size = size * (4 + 1 / 20). This should exclude the header being written.
Since header is also being included in the calculations, memory mishandlings
are happening.

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

8 years agoglbuffer: add a name to the allocator
Matthew Waters [Thu, 17 Dec 2015 04:50:40 +0000 (15:50 +1100)]
glbuffer: add a name to the allocator

8 years agogl*memory*: reverse the parameter order of user_data and destroy notify
Matthew Waters [Thu, 17 Dec 2015 04:23:13 +0000 (15:23 +1100)]
gl*memory*: reverse the parameter order of user_data and destroy notify

The convention is to have the destroy notify last after any user data

8 years agoapplemedia: fix build on iOS
Alessandro Decina [Thu, 17 Dec 2015 04:07:33 +0000 (15:07 +1100)]
applemedia: fix build on iOS

Fix build after 779dc3132c8f6dd560cb07cc2e2c3c72aeaa7845

8 years agoapplemedia: avfvideosrc: do fixate
Alessandro Decina [Thu, 17 Dec 2015 03:49:13 +0000 (14:49 +1100)]
applemedia: avfvideosrc: do fixate

8 years agoglmemorypbo: remove our own alloc()/wrapped()/etc functions
Matthew Waters [Wed, 16 Dec 2015 07:41:06 +0000 (18:41 +1100)]
glmemorypbo: remove our own alloc()/wrapped()/etc functions

replaced by equivalent functionality within gst_gl_base_memory_alloc()

8 years agoglmemory: document gst_gl_memory_init
Matthew Waters [Wed, 16 Dec 2015 07:39:32 +0000 (18:39 +1100)]
glmemory: document gst_gl_memory_init

8 years agoglbuffer: remove unneeded gst_gl_buffer_alloc()
Matthew Waters [Wed, 16 Dec 2015 07:38:19 +0000 (18:38 +1100)]
glbuffer: remove unneeded gst_gl_buffer_alloc()

Replaced by gst_gl_base_memory_alloc()

8 years agoglbasememory: document some functions
Matthew Waters [Wed, 16 Dec 2015 07:37:11 +0000 (18:37 +1100)]
glbasememory: document some functions

8 years agoglmemory: add a default copy implementation
Matthew Waters [Wed, 16 Dec 2015 07:36:13 +0000 (18:36 +1100)]
glmemory: add a default copy implementation

Subclasses still need to override this to copy into the correct memory type.

8 years agoglbufferpool: use gst_gl_base_memory_alloc as a generic GL allocation framework
Matthew Waters [Wed, 16 Dec 2015 07:32:40 +0000 (18:32 +1100)]
glbufferpool: use gst_gl_base_memory_alloc as a generic GL allocation framework

Requires the usage of GstGLVideoAllocationParams however any user can set their
own parameters along with an allocator which will be used to allocate the
correct memory type.

8 years agoglmemorypbo: implement GstGLBaseMemory:alloc
Matthew Waters [Wed, 16 Dec 2015 07:30:59 +0000 (18:30 +1100)]
glmemorypbo: implement GstGLBaseMemory:alloc

Uses the GstGLVideoAllocationParams parameters

8 years agoglbuffer: implements GstGLBaseMemory::alloc
Matthew Waters [Wed, 16 Dec 2015 07:23:31 +0000 (18:23 +1100)]
glbuffer: implements GstGLBaseMemory::alloc

Create GstGLBufferAllocationParams which is subclass of GstGLAllocationParams

8 years agoglmemory: implement GstGLBaseMemory::alloc
Matthew Waters [Wed, 16 Dec 2015 07:20:17 +0000 (18:20 +1100)]
glmemory: implement GstGLBaseMemory::alloc

- Create GstGLVideoAllocationParams which is a GstGLAllocationParams subclass.
- Make it possible to allocate glmemory objects directly if no frills are
  needed.

8 years agoglbasememory: add a generic interface for allocating GL memories
Matthew Waters [Wed, 16 Dec 2015 07:13:21 +0000 (18:13 +1100)]
glbasememory: add a generic interface for allocating GL memories

This is made possible by a subclassable GstGLAllocationParams that holds
the allocation parameters

Every allocation would now go through gst_gl_base_memory_alloc with the
allocation parameters now being specified in a single struct to allow
extension by different allocators.

8 years agorevert common submodule change
Matthew Waters [Thu, 17 Dec 2015 01:30:05 +0000 (12:30 +1100)]
revert common submodule change

8ae003326157438c12c45589e050c5f446723f61 contained a erroneous common change

8 years agoRevert "glbuffer: Don't pass allocation params"
Matthew Waters [Thu, 17 Dec 2015 00:06:34 +0000 (11:06 +1100)]
Revert "glbuffer: Don't pass allocation params"

This reverts commit 052f41e5c293ec17c038467ed1e7b92b04d494b0.

This is incorrect and will affect any other glbuffer user that needs/wants to
perform data alignment.

8 years agoopencv: add medianBlur support in cvsmooth
Luis de Bethencourt [Wed, 16 Dec 2015 19:21:24 +0000 (19:21 +0000)]
opencv: add medianBlur support in cvsmooth

With the deprecation of cvSmooth we have to handle the other smoothing
functions manually.

8 years agoopencv: switch deprecated cvSmooth for GaussianBlur
Luis de Bethencourt [Wed, 16 Dec 2015 18:37:37 +0000 (18:37 +0000)]
opencv: switch deprecated cvSmooth for GaussianBlur

The OpenCV cvSmooth function is deprecated [0] and the documentation
recommends to use GaussianBlur (). This makes the spatial property go
unused. Marking it as deprecated, making it non-functional and will remove
in the next cycle.

[0] http://docs.opencv.org/2.4/modules/imgproc/doc/filtering.html

8 years agoglbuffer: Don't pass allocation params
Nicolas Dufresne [Wed, 16 Dec 2015 16:56:08 +0000 (11:56 -0500)]
glbuffer: Don't pass allocation params

The imported memory has already been allocated, passing allocation
parameters with alignment confuses the memory which endup with a
size different from maxsize and lead to overrun when the memory
is being copied.

8 years agodashdemux: improve validation of UTCtiming element
Florin Apostol [Wed, 16 Dec 2015 13:59:18 +0000 (13:59 +0000)]
dashdemux: improve validation of UTCtiming element

gst_mpdparser_parse_utctiming_node does not validate the parsed values completely. The following scenarios are incorrectly accepted:
- elements with no schemeIdUri property should be rejected
- elements with unrecognized UTCTiming scheme should be rejected
- elements with empty values should be rejected

The last one triggers a division by 0 in gst_dash_demux_poll_clock_drift:
clock_drift->selected_url = clock_drift->selected_url % g_strv_length (urls);
because it urls is a valid pointer to an empty array.

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

8 years agodashdemux: clock_cond is not used and should be removed
Florin Apostol [Wed, 16 Dec 2015 10:41:47 +0000 (10:41 +0000)]
dashdemux: clock_cond is not used and should be removed

There are no threads waiting on clock_cond. It is just initialised and
signalled. It should be removed.

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

8 years agoadaptivedemux: fixed clock compensation in get_fragment_waiting_time
Florin Apostol [Wed, 16 Dec 2015 10:23:23 +0000 (10:23 +0000)]
adaptivedemux: fixed clock compensation in get_fragment_waiting_time

Clock compensation is calculated in usec but is added to a GstClockTime value.

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

8 years agoapplemedia: Link to IOSurface.framework for the IOSurface API
Sebastian Dröge [Wed, 16 Dec 2015 09:21:59 +0000 (10:21 +0100)]
applemedia: Link to IOSurface.framework for the IOSurface API

8 years agovideoparsers: Check for NULL return value of gst_pad_get_current_caps()
Dave Craig [Tue, 15 Dec 2015 17:10:00 +0000 (17:10 +0000)]
videoparsers: Check for NULL return value of gst_pad_get_current_caps()

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

8 years agoivtc: Fix value memory leak
Vineeth TM [Wed, 16 Dec 2015 05:32:20 +0000 (14:32 +0900)]
ivtc: Fix value memory leak

gvalue variable should be unset instead of reset.

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

8 years agocombdetect: Fix value memory leak
Vineeth TM [Wed, 16 Dec 2015 05:29:20 +0000 (14:29 +0900)]
combdetect: Fix value memory leak

gvalue variable should be unset instead of reset.

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

8 years agopnmdec: Fix scanner memory leak
Vineeth TM [Wed, 16 Dec 2015 04:08:22 +0000 (13:08 +0900)]
pnmdec: Fix scanner memory leak

For corrupted files, scanner memory is being leaked.

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

8 years agopnmdec: Fix buffer memory leak
Vineeth TM [Wed, 16 Dec 2015 04:06:45 +0000 (13:06 +0900)]
pnmdec: Fix buffer memory leak

In case of corrupted file, s->buf allocated is not being freed

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

8 years agopnmenc: Fix string memory leak
Vineeth TM [Wed, 16 Dec 2015 00:05:42 +0000 (09:05 +0900)]
pnmenc: Fix string memory leak

header being allocated is not freed resulting in leak

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

8 years agogdppay: Fix buffer memory leak
Vineeth TM [Tue, 15 Dec 2015 23:52:12 +0000 (08:52 +0900)]
gdppay: Fix buffer memory leak

outbuffer being allocated is not being pushed to queue for EOS event and hence
should be freed.

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

8 years agoapplemedia: Link to IOKit.framework for IOSurface related functions
Sebastian Dröge [Wed, 16 Dec 2015 08:39:03 +0000 (09:39 +0100)]
applemedia: Link to IOKit.framework for IOSurface related functions

8 years agodocs: update to git
Sebastian Dröge [Wed, 16 Dec 2015 08:33:12 +0000 (09:33 +0100)]
docs: update to git

8 years agoyadif: Fix illegal memory access
Vineeth TM [Tue, 15 Dec 2015 23:25:19 +0000 (08:25 +0900)]
yadif: Fix illegal memory access

When applying the spatial prediction, there is an illegal access of -1 index of array.
Hence adding a condition to avoid this.

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

8 years agoyadif: Fix gvalue memory leak
Vineeth TM [Tue, 15 Dec 2015 23:22:00 +0000 (08:22 +0900)]
yadif: Fix gvalue memory leak

gvalue variable should be unset instead of reset.

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

8 years agoapplemedia: vtdec: fix texture-target on iOS
Alessandro Decina [Wed, 16 Dec 2015 06:02:27 +0000 (17:02 +1100)]
applemedia: vtdec: fix texture-target on iOS

8 years agoapplemedia: vtdec: remove obsolete FIXME
Alessandro Decina [Wed, 16 Dec 2015 04:20:30 +0000 (15:20 +1100)]
applemedia: vtdec: remove obsolete FIXME

8 years agoapplemedia: avfvideosrc: rework GLMemory negotiation
Alessandro Decina [Wed, 16 Dec 2015 03:38:44 +0000 (14:38 +1100)]
applemedia: avfvideosrc: rework GLMemory negotiation

Only do GLMemory when a GstGLContext is available AND GLMemory is actually
negotiated with downstream.

8 years agoapplemedia: avfvideosrc: update after IOSurface changes
Alessandro Decina [Wed, 16 Dec 2015 02:47:00 +0000 (13:47 +1100)]
applemedia: avfvideosrc: update after IOSurface changes

Prefer GLMemory over sysmem. Also now when pushing GLMemory we push the
original formats (UYVY in OSX, BGRA in iOS) and leave it to downstream to
convert.

8 years agoapplemedia: vtdec: remove the internal GstGLColorConvert
Alessandro Decina [Mon, 14 Dec 2015 05:10:01 +0000 (16:10 +1100)]
applemedia: vtdec: remove the internal GstGLColorConvert

It was added back in the day to make texture sharing work by default with
glimagesink inside playbin. These days glimagesink accepts (and converts) YUV
internally so it's no longer needed.

8 years agoapplemedia: vtdec: decouple outputting textures from outputting RGBA
Alessandro Decina [Mon, 14 Dec 2015 03:23:20 +0000 (14:23 +1100)]
applemedia: vtdec: decouple outputting textures from outputting RGBA

We're going to be able to output NV12 textures soon.

8 years agoapplemedia: vtdec: switch to IOSurface on Mac
Alessandro Decina [Fri, 11 Dec 2015 02:20:05 +0000 (13:20 +1100)]
applemedia: vtdec: switch to IOSurface on Mac

Switch to using IOSurface instead of CVOpenGLTextureCache on OSX. The latter can't be
used anymore to do YUV => RGB with opengl3 on El Capitan as GL_YCBCR_422_APPLE
has been removed from the opengl3 driver. Also switch to NV12 from UYVY, which
was the only YUV format supported by CVOpenGLTextureCache.

8 years agoapplemedia: rename GstCoreVideoTextureCache to GstVideoTextureCache
Alessandro Decina [Thu, 10 Dec 2015 05:22:08 +0000 (16:22 +1100)]
applemedia: rename GstCoreVideoTextureCache to GstVideoTextureCache

First of a few commits to stop using CVOpenGLTextureCache on OSX and use
IOSurfaces directly instead. CVOpenGLTextureCache hasn't been updated for OpenGL
3 which is why texture sharing is currently disabled on OSX.

8 years agoRevert "vtdec: disable the texture cache on OSX"
Alessandro Decina [Tue, 17 Nov 2015 08:31:53 +0000 (19:31 +1100)]
Revert "vtdec: disable the texture cache on OSX"

This reverts commit f02425c4afcd85260a1b387aeddf863774257917.

8 years agoglupload: fix allocator name after GLMemory API changes
Alessandro Decina [Tue, 15 Dec 2015 03:17:16 +0000 (14:17 +1100)]
glupload: fix allocator name after GLMemory API changes

8 years agoqtsink: Add configured GL cflags to the build
Nicolas Dufresne [Wed, 16 Dec 2015 00:28:05 +0000 (19:28 -0500)]
qtsink: Add configured GL cflags to the build

We don't directly link to GL in the element, though we use GL headers.
For this reason we need to include the proper GL headers path. This
prevent this element from using a different GL header then libgstgl.

8 years agogl: Allow using non-system mesa with both GL and GLES
Nicolas Dufresne [Wed, 16 Dec 2015 00:25:16 +0000 (19:25 -0500)]
gl: Allow using non-system mesa with both GL and GLES

GCC automatically disable redundance warnings for system headers. As
soon as we start using a non-system installed mesa, we would start
having issues. The test for both wasn't setting any flags, so it would
work but then fail at runtime.

This is being fixed by disabling in the code (where needed only) that
GCC warning. The test is also fixed to avoid the false positive we had.

8 years agoopencv: pyramidsegment: fix example launch line
Luis de Bethencourt [Tue, 15 Dec 2015 15:59:30 +0000 (15:59 +0000)]
opencv: pyramidsegment: fix example launch line

Use videotestsrc and autovideosink in the example gst-launch-1.0 line and
not a useless fakesrc-fakesink example.

8 years agoopencv: add headers with example launch lines
Luis de Bethencourt [Tue, 15 Dec 2015 15:56:19 +0000 (15:56 +0000)]
opencv: add headers with example launch lines

Add description headers for all the OpenCV plugins missing them, so we can
have gst-launch-1.0 example launch lines for all of them.

8 years agoopengl: Use pkg-config if available
Nicolas Dufresne [Mon, 14 Dec 2015 21:48:45 +0000 (16:48 -0500)]
opengl: Use pkg-config if available

libMesa ships .pc files now for gl/egl/glesv2. This patch makes use
of it while keeping support for system without.

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

8 years agogeometrictransform: add headers with example launch lines
Luis de Bethencourt [Tue, 15 Dec 2015 11:59:00 +0000 (11:59 +0000)]
geometrictransform: add headers with example launch lines

Add description headers for all geometrictransform elements so we can have
gst-launch-1.0 example launch lines for all of them.

8 years agoplugins-bad: Fix example pipelines
Vineeth TM [Mon, 14 Dec 2015 02:09:46 +0000 (11:09 +0900)]
plugins-bad: Fix example pipelines

rename gst-launch --> gst-launch-1.0
replace old elements with new elements(ffmpegcolorspace -> videoconvert, ffenc_** -> avenc_**)
fix caps in examples

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

8 years agoignore: videoframe-audiolevel test
Nicolas Dufresne [Mon, 14 Dec 2015 20:01:09 +0000 (15:01 -0500)]
ignore: videoframe-audiolevel test

8 years agobad: Add g_autoptr() support to all types
Xavier Claessens [Mon, 14 Dec 2015 19:44:31 +0000 (14:44 -0500)]
bad: Add g_autoptr() support to all types

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

8 years agoglviewconvert: check pointer before dereferencing
Luis de Bethencourt [Mon, 14 Dec 2015 12:31:52 +0000 (12:31 +0000)]
glviewconvert: check pointer before dereferencing

priv->primary_out could be NULL, check before dereferencing it in
GST_BUFFER_FLAG_SET ()

CID 1308945

8 years agovideoframe-audiolevel: Fix possible division by zero
Vivia Nikolaidou [Mon, 14 Dec 2015 11:43:10 +0000 (13:43 +0200)]
videoframe-audiolevel: Fix possible division by zero

In update_rms_from_buffer(), division by "frames" wasn't checking whether
"frames" is zero.

CID 1341519.

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

8 years agoclutter: Fix compilation error in GL examples
Sebastian Dröge [Mon, 14 Dec 2015 08:38:41 +0000 (09:38 +0100)]
clutter: Fix compilation error in GL examples

Include gst/gl.h instead of specific headers to prevent such problems also in
the future.

In file included from ../../../../gst-libs/gst/gl/gl.h:47:0,
                 from ../../../../gst-libs/gst/gl/gstglbasememory.h:137,
                 from ../../../../gst-libs/gst/gl/gstglmemory.h:29,
                 from cluttershare.c:39:
../../../../gst-libs/gst/gl/gstglmemorypbo.h:51:20: error: field ‘mem’ has incomplete type
   GstGLMemory      mem;
                    ^
../../../../gst-libs/gst/gl/gstglmemorypbo.h:124:24: error: field ‘parent’ has incomplete type
   GstGLMemoryAllocator parent;
                        ^
../../../../gst-libs/gst/gl/gstglmemorypbo.h:134:29: error: field ‘parent_class’ has incomplete type
   GstGLMemoryAllocatorClass parent_class;
                             ^

8 years agoapplemedia: update for GLMemory API changes
Matthew Waters [Mon, 14 Dec 2015 08:18:14 +0000 (19:18 +1100)]
applemedia: update for GLMemory API changes

8 years agoamcvideodec: update for GLMemory API changes
Matthew Waters [Mon, 14 Dec 2015 08:15:14 +0000 (19:15 +1100)]
amcvideodec: update for GLMemory API changes

8 years agotests: update for glmemory api changes
Matthew Waters [Mon, 14 Dec 2015 07:41:30 +0000 (18:41 +1100)]
tests: update for glmemory api changes

8 years agoglbuffer: bind/unbind on map/unmap for GL mappings
Matthew Waters [Mon, 14 Dec 2015 07:20:23 +0000 (18:20 +1100)]
glbuffer: bind/unbind on map/unmap for GL mappings

Bind the handle to the GL target on map/unmap to save the caller from
handling this themselves.

8 years agoglbuffer: remove buffer specific transfer flags
Matthew Waters [Mon, 14 Dec 2015 07:19:37 +0000 (18:19 +1100)]
glbuffer: remove buffer specific transfer flags

Instead rely on GstGLBaseMemory's transfer handling

8 years agoglmemorypbo: map/unmap pbo memory correctly for state tracking
Matthew Waters [Mon, 14 Dec 2015 07:18:20 +0000 (18:18 +1100)]
glmemorypbo: map/unmap pbo memory correctly for state tracking

Otherwise some downloads will fail to occur from the PBO.

8 years agotests/glmemory: include the generic gl header
Matthew Waters [Mon, 14 Dec 2015 07:15:42 +0000 (18:15 +1100)]
tests/glmemory: include the generic gl header

Including gstglmemory.h directly results in the compiler complaining
about incomplete types.

8 years agoglformat: add compatibility definitions for OES/rectangle textures
Matthew Waters [Mon, 14 Dec 2015 06:05:31 +0000 (17:05 +1100)]
glformat: add compatibility definitions for OES/rectangle textures

8 years agoglbasebuffer: remove unsed memory subclass
Matthew Waters [Mon, 14 Dec 2015 02:49:18 +0000 (13:49 +1100)]
glbasebuffer: remove unsed memory subclass

The functionality has been split into GstGLBaseMemory and GstGLBuffer.

8 years agoglmemory: base classify and add the pbo memory on top
Matthew Waters [Mon, 14 Dec 2015 02:43:59 +0000 (13:43 +1100)]
glmemory: base classify and add the pbo memory on top

The base class is useful for having multiple backing memory types other
than the default.  e.g. IOSurface, EGLImage, dmabuf?

The PBO transfer logic is now inside GstGLMemoryPBO which uses GstGLBuffer
to manage the PBO memory.

This also moves the format utility functions into their own file.

8 years agogl: add a GL buffer based GstMemory
Matthew Waters [Mon, 14 Dec 2015 02:08:10 +0000 (13:08 +1100)]
gl: add a GL buffer based GstMemory

Heavily based on GstGLBaseBuffer that is a subclass of GstGLBaseMemory.
Provides GPU and CPU accessible GL buffer objects by GL handle or by
sysmem data pointer.