Commit graph

20206 commits

Author SHA1 Message Date
Sebastian Dröge f156c65c21 configure: Use -Bsymbolic-functions if available
While this is more useful for libraries, some of our plugins with multiple
files and some internal API can also benefit from this.
2015-12-21 12:33:25 +01:00
Sebastian Dröge 4a626d92d2 glcolorconvert: Fix name of testsuite 2015-12-21 12:19:11 +01:00
Sebastian Dröge 626bcccff9 glcontext: Signal context creation from inside the context loop and use g_thread_join() instead of a custom condition variable
Also protect against spurious condition variable wakeups during context
creation.
2015-12-21 12:16:35 +01:00
Sebastian Dröge d81eea5de1 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.
2015-12-21 11:27:09 +01:00
Sebastian Dröge 0952b3f986 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.
2015-12-21 11:09:04 +01:00
Haihua Hu 62d79ae326 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
2015-12-21 10:42:41 +01:00
Tim-Philipp Müller 384987341b assrender, dvbsuboverlay: fix example pipelines in docs 2015-12-19 21:25:49 +00:00
Tim-Philipp Müller d5e115171b hlsdemux: reflow update_playlist a bit
Reduce indentation by erroring out directly on failure.
2015-12-19 21:12:17 +00:00
Tim-Philipp Müller 8be5551dff 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.
2015-12-19 21:06:02 +00:00
Luis de Bethencourt d59413ba06 opencv: remove unneeded sink_event function in pyramidsegment 2015-12-19 12:05:59 +00:00
Luis de Bethencourt 83b5fe74c2 opencv: remove unneeded sink_event function in textoverlay 2015-12-19 12:04:01 +00:00
Thiago Santos fa2c220693 templatematch: remove useless function 2015-12-18 18:52:12 -03:00
Thiago Santos 29de588e2f 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
2015-12-18 18:52:03 -03:00
Nicolas Dufresne 937e249b44 glconvert: Fix compilation of GRAY16_LE/BE shader 2015-12-18 15:56:34 -05:00
Nicolas Dufresne 420a175b4f 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
2015-12-18 15:56:34 -05:00
Nicolas Dufresne 7b335c4dd5 eglimagememory: Also import BGR16, ABGR, xBGR, AYUV, GRAY16_LE/BE and Y444
https://bugzilla.gnome.org/show_bug.cgi?id=743345
2015-12-18 15:56:34 -05:00
Nicolas Dufresne b17a732d5f eglimagememory: Add RGB/BGR DMABuf importation support
https://bugzilla.gnome.org/show_bug.cgi?id=743345
2015-12-18 15:56:34 -05:00
Lubosz Sarnecki 1cd9786598 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
2015-12-18 15:56:34 -05:00
Lubosz Sarnecki 41738ca83b 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
2015-12-18 15:56:34 -05:00
Lubosz Sarnecki ebeae8bcdb 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
2015-12-18 15:56:34 -05:00
Lubosz Sarnecki eb73cf3c2e gstglcontext_egl: Expose gst_gl_context_egl_get_error_string.
https://bugzilla.gnome.org/show_bug.cgi?id=743345
2015-12-18 15:56:33 -05:00
Luis de Bethencourt fa1775acee 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.
2015-12-18 16:56:18 +00:00
Luis de Bethencourt 8b6ea95bee 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.
2015-12-18 16:18:56 +00:00
Luis de Bethencourt cdaedd74db 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.
2015-12-18 15:48:29 +00:00
Vivia Nikolaidou fafc8e564c 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
2015-12-18 16:08:02 +01:00
Luis de Bethencourt 40d0c1aec0 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.
2015-12-18 12:42:25 +00:00
Thomas Roos f9464ce354 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
2015-12-18 12:39:03 +01:00
Sebastian Dröge d4920948aa 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.
2015-12-18 12:39:03 +01:00
Julien Isorce 89229bcfed 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
2015-12-18 10:30:25 +00:00
Alessandro Decina 6961945110 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.
2015-12-18 14:25:32 +11:00
Matthew Waters a3ebe19d87 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.
2015-12-18 11:57:07 +11:00
Luis de Bethencourt ae0b8e060e 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.
2015-12-17 18:27:01 +00:00
Sebastian Dröge 9b4611ccae openjpegdec: Don't crash when decoding returns NULL data for any component
https://bugzilla.gnome.org/show_bug.cgi?id=758943
2015-12-17 15:57:57 +01:00
Matthew Waters d8dacd50bf 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.
2015-12-18 01:02:25 +11:00
Luis de Bethencourt 98784aa72c 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.
2015-12-17 10:15:48 +00:00
Vineeth TM 10ed707b60 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
2015-12-17 10:26:48 +01:00
Matthew Waters 4d88848fae glbuffer: add a name to the allocator 2015-12-17 15:50:40 +11:00
Matthew Waters 5dcd500257 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
2015-12-17 15:44:22 +11:00
Alessandro Decina 491e2eefcb applemedia: fix build on iOS
Fix build after 779dc3132c
2015-12-17 15:07:33 +11:00
Alessandro Decina 4f550ff50f applemedia: avfvideosrc: do fixate 2015-12-17 14:49:13 +11:00
Matthew Waters 779dc3132c glmemorypbo: remove our own alloc()/wrapped()/etc functions
replaced by equivalent functionality within gst_gl_base_memory_alloc()
2015-12-17 13:49:56 +11:00
Matthew Waters 78fb4326eb glmemory: document gst_gl_memory_init 2015-12-17 13:49:56 +11:00
Matthew Waters 9fa1dd2e29 glbuffer: remove unneeded gst_gl_buffer_alloc()
Replaced by gst_gl_base_memory_alloc()
2015-12-17 13:49:56 +11:00
Matthew Waters b8b4d8db51 glbasememory: document some functions 2015-12-17 13:49:56 +11:00
Matthew Waters 3aaec5b1d6 glmemory: add a default copy implementation
Subclasses still need to override this to copy into the correct memory type.
2015-12-17 13:49:56 +11:00
Matthew Waters 7c90b0435d 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.
2015-12-17 13:49:56 +11:00
Matthew Waters d2c5fc3e87 glmemorypbo: implement GstGLBaseMemory:alloc
Uses the GstGLVideoAllocationParams parameters
2015-12-17 13:49:56 +11:00
Matthew Waters bfb4c446bc glbuffer: implements GstGLBaseMemory::alloc
Create GstGLBufferAllocationParams which is subclass of GstGLAllocationParams
2015-12-17 13:49:56 +11:00
Matthew Waters 650e5c4fe5 glmemory: implement GstGLBaseMemory::alloc
- Create GstGLVideoAllocationParams which is a GstGLAllocationParams subclass.
- Make it possible to allocate glmemory objects directly if no frills are
  needed.
2015-12-17 13:49:55 +11:00
Matthew Waters bd61e1274c 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.
2015-12-17 13:49:55 +11:00