Commit graph

20336 commits

Author SHA1 Message Date
Matt Crane
eba01f84e5 shmsink: fix possible deadlock in _render()/ _allocator_free()
Drop object lock before unrefing memory, otherwise the object
lock might be taken again from the allocator and then things
deadlock.

https://bugzilla.gnome.org/show_bug.cgi?id=760551
2016-01-16 21:46:28 +00:00
Sebastian Dröge
3184175dae glfilter: First make caps writable in fixate_caps(), then truncate them
Truncating requires writable caps.
2016-01-16 17:14:54 +02:00
Sebastian Dröge
c08c795bb4 glcolorconvert: Caps passed to fixate_caps() are not owned by us and guaranteed to be fixed
So don't try to fixate them, which takes ownership and steals them from
basetransform.

https://bugzilla.gnome.org/show_bug.cgi?id=760696
2016-01-16 17:12:29 +02:00
Sebastian Dröge
2018167ee2 Revert "glpool: fix caps refcount issue"
This reverts commit 3bdcdedfa0.

gst_caps_replace() takes a new reference already, if there is a problem then
it is elsewhere. And there are a few problems, see
https://bugzilla.gnome.org/show_bug.cgi?id=760696
2016-01-16 16:55:42 +02:00
Luis de Bethencourt
63ffe374ab rtph265depay: fix unneeded sub-buffer creation
We create a sub-buffer just to copy over its metas and then throw it
away immediately, just use the original input buffer directly.
2016-01-15 16:10:04 +00:00
Luis de Bethencourt
6f8f82164a rtph265pay: add "send VPS/SPS/PPS with every key frame" mode
It's not enough to have timeout or event based VPS/SPS/PPS information
sent in RTP packets. There are some scenarios when key frames may appear
more frequently than once a second, in which case the minimum timeout
for "config-interval" of 1 second for sending VPS/SPS/PPS isn't enough.
It might also be desirable in general to make sure the VPS/SPS/PPS is
available with every keyframe (packet loss aside), so receivers can
actually pick up decoding immediately from the first keyframe if
VPS/SPS/PPS is not signaled out of band.

This commit adds the possibility to send VPS/SPS/PPS with every key frame.
This mode can be enabled by setting "config-interval" property to -1. In
this case the payloader will add VPS, SPS and PPS before every key (IDR)
frame.

https://bugzilla.gnome.org/show_bug.cgi?id=757892
2016-01-15 15:57:41 +00:00
Luis de Bethencourt
31a7ad77b6 rtph265pay: change config-interval property type from uint to int
This way we can use -1 as special value, which is nicer than MAXUINT.

https://bugzilla.gnome.org/show_bug.cgi?id=757892
2016-01-15 15:19:47 +00:00
Thiago Santos
b7a0be23c6 adaptivedemux: replace ghostpad with a standard pad
Handling the ghostpad and its internal pad was causing more issues
than helping because of their coupled activation/deactivation
actions.

As we have to install custom chain,event and query functions it is
better to use a floating sink pad internally in the demuxer and just
use those pad functions to push through a standard pad in the demuxer

https://bugzilla.gnome.org/show_bug.cgi?id=757951
2016-01-15 11:32:37 -03:00
Florin Apostol
d92f11b819 adaptivedemux: do not flush the input pad
gst_adaptive_demux_stream_clear_eos_and_flush_state() function will do
all the necessary cleaning.

https://bugzilla.gnome.org/show_bug.cgi?id=757951
2016-01-15 11:32:37 -03:00
Luis de Bethencourt
3fd44b2dde videosegmentclip: fail to set_caps if problem in caps structure
gst_video_segment_clip_set_caps () should return FALSE if there was a
problem reading the framerate values from the caps structure.
2016-01-15 11:51:15 +00:00
Matthew Waters
a8b4c6c4ff glquery: provide compat definition for GL_QUERY_RESULT
e.g. android doesn't have it

While we're here move a state specific assertion after the supported check.
Removes an assertion on GLES
2016-01-15 17:00:55 +11:00
Matthew Waters
6b6b591370 gl: add compatibility definition of GLint64
e.g. anrdoid doesn't have it
2016-01-15 16:07:27 +11:00
Sergey Borovkov
155f0acfab qml: Mark material dirty when texture buffer is updated
Qt might not redraw the scene otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=758286
2016-01-15 14:11:52 +11:00
Matthew Waters
3bdcdedfa0 glpool: fix caps refcount issue
The caps are from an allocation query which are transfer none but were being
treated as transfer full.
2016-01-15 14:00:56 +11:00
Matthew Waters
eb7ac03a91 glmemory: log the time for glTexSubImage/glReadPixels 2016-01-15 13:21:56 +11:00
Matthew Waters
5437874596 gl: add a gstglquery object for arbitrary GL queries
Currently only GL_TIME_ELAPSED and GL_TIMESTAMP are supported
2016-01-15 13:21:56 +11:00
Matthew Waters
2ef124dac6 gldebug: implement a delayed debug system
The messages are stored by gst_gl_async_debug_store_log_msg() and output later
by a corresponding store(), output() or an unset()/free().

Some wrapper macros are provided to avoid callers explicitly using __FILE__,
GST_FUNCTION and __LINE__
2016-01-15 12:19:02 +11:00
Matthew Waters
ad2f0cf619 gldebug: use gst_info_vasprintf in insert_debug_marker()
Allows expansion of GST_PTR_FORMAT and GST_SEGMENT_FORMAT arguments.
2016-01-15 12:19:02 +11:00
Matthew Waters
0b9ae1f1d6 gl: add a videoflip element
Behaves exactly the same as the non-GL videoflip element
2016-01-15 12:05:03 +11:00
Matthew Waters
8e77cf1030 glfilter: recreate the fbo on caps changes
The width/height may change which requires recreating the depth buffer.
2016-01-15 12:05:03 +11:00
Matthew Waters
3e16a6a2e7 glbasefilter: add a class function on set_caps (from GL)
This is simply a convenience to avoid duplicating the thread marshalling on
set_caps.
2016-01-15 12:05:03 +11:00
Matthew Waters
198d451f31 gltransformation: always build a valid mvp matrix
The default case is to build an identity matrix.
2016-01-15 12:05:02 +11:00
Matthew Waters
f721499371 gltransformation: support negative scales
A scale of -1.0 means to flip the video.
2016-01-15 12:05:02 +11:00
Matthew Waters
12f013c8d7 gltransformation: implement passthrough handling 2016-01-15 12:05:02 +11:00
Matthew Waters
066f0dcda0 gltransformation: implement navigation events
Reverses the transformation applied through the properties and forwards the
event.

The process for finding the coordinates on the video are as follows:
1. Convert the given pointer_x and pointer_y to model space at the near and far planes
2. Get the equation of the video plane
3. Find where the ray in 1 intersects the plane
4. Profit!
2016-01-15 12:04:59 +11:00
Matthew Waters
4cfb6b9166 glimagesink: remove reduntant glimagesink from debug logging 2016-01-14 17:52:23 +11:00
Matthew Waters
82bb5d4e22 gl/x11/navigation: add button press to the selected event mask
Otherwise we won't get the button press events and GstNavigation fails.
2016-01-14 17:52:23 +11:00
Alessandro Decina
bef0a46c5d glcolorconvert: try harder to passthrough
This makes a pipeline like:

... ! video/x-raw(memory:GLMemory),format=UYVY ! glcolorconvert !
video/x-raw(memory:GLMemory),format={UYVY, NV12} ! ...

passthrough instead of converting UYVY => NV12. The conversion would happen
before this change since the element (and basetransform) transform the src caps
to format={NV12, UYVY} (since NV12 comes first in the glcolorconvert:src
template) and then the default caps fixate func would fixate to NV12. Blah.

Also there's no need to intersect against the template caps in ::transform_caps
since basetransform does that right after calling the vfunc.
2016-01-14 16:38:07 +11:00
Matthew Waters
1bb2985777 gl: implement a colorbalance element
It performs the exact same operation as videobalance but with opengl shaders and
was tested with glvideomixer by comparing frames from videobalance and
glcolorbalance.
2016-01-13 12:00:03 +11:00
Matthew Waters
ceec4ad873 glvideomixer: implement glBlendFunc and glBlendEquation
Allows more blending options than just A over B

e.g. frame comparisons are now possible.
  glvideomixer name=m
    sink_0::zorder=0
    sink_1::zorder=1
    sink_1::blend-equation-rgb={subtract,reverse-subtract}
    sink_1::blend-function-src-rgb=src-color
    sink_1::blend-function-dst-rgb=dst-color
  ! glimagesinkelement
  videotestsrc pattern=checkers-4 ! m.sink_0
  videotestsrc pattern=checkers-8 ! m.sink_1
2016-01-13 12:00:03 +11:00
Matthew Waters
0be9c9f960 gldebug: add a specific category for the debug spam from the driver 2016-01-13 12:00:03 +11:00
Tim Sheridan
95a14fd470 sbc: sbcdec: Fix frame length calculation
SBC frame length calculation wasn't being rounded up to the nearest byte
(as specified in the A2DP 1.0 specification, section 12.9). This could
cause 'stereo' and 'joint stereo' mode SBC streams to have incorrectly
calculated frame lengths.

https://bugzilla.gnome.org/show_bug.cgi?id=742446
2016-01-12 21:45:05 +00:00
Matthew Waters
ffba31b7b2 nvenc: update for recent GL api changes
Specifically the GstGLMemoryPBO addition (which was the unadorned GstGLMemory).
2016-01-12 23:36:54 +11:00
Alessandro Decina
05ccc2f6ea applemedia: avfvideosrc: optionally get the GL context from gst_element_set_context
Allow setting the GL context with gst_element_set_context. When available, the
local context obtained via the context query still has the precedence.
2016-01-12 14:36:02 +11:00
Alessandro Decina
45b40b8467 applemedia: iosurfacememory: remove NO_SHARE flag
The full memory can be safely shared. Sharing a sub region can't be done and
will fail in the base allocator, triggering a copy.
2016-01-12 14:05:01 +11:00
Thiago Santos
f94079c1a9 frei0rmixer: replace accept-caps with caps query
It wants to check if upstream can produce a certain format,
accept-caps might only check if the next element can produce it.
2016-01-11 17:00:17 -03:00
Matthew Waters
04ec728722 glbasememory: Free the actual memory object when requested
Otherwise we are leaking ~400B on each GstMemory allocation.

Freeing in the base class matches the GObject semantics.
2016-01-11 20:40:39 +11:00
Matthew Waters
3423e108d4 glmemorypbo: don't double read pixels
The optimistic download_transfer was not setting the required flag to not
perform glReadPixels on subsequent map (READ). resulting in glReadPixels
happening twice.
2016-01-11 20:40:39 +11:00
Matthew Waters
e8a251db4b glmemory: expose gst_gl_memory_texsubimage
Removes extremely similar code from glmemorypbo.
2016-01-11 20:40:39 +11:00
Matthew Waters
0ebd719644 glfeature add a specific debug category
Saves having to trawl through the 'default' category when function retrieval
goes wrong.
2016-01-11 20:40:39 +11:00
Bob Holcomb
cb520dce26 mpegtsmux: fix reserve bits so they are 1's
The MPEG standard (ISO-13880-1) says the reserve bits need to be set
to one (2.1.64). This is causing transport streams to fail validation
on some systems.

https://bugzilla.gnome.org/show_bug.cgi?id=760127
2016-01-09 16:38:04 +00:00
Luis de Bethencourt
8c7ea6fb87 opencv: remove check for OpenCV version
After commit 64080e632, configure checks for all the header files that
should be available in OpenCV 2.3 and later. If any of these files isn't
there the OpenCV elements won't be part of the build.

No need to recheck for opencv2/legacy/legacy.hpp again in
gstpyramidsegment.h. Minimum supported OpenCV version must have this header
and configure already checks for it. Removing check.
2016-01-08 17:12:04 +00:00
Luis de Bethencourt
94c07ed229 opencv: always do cvsmooth in place
After the update to new OpenCV API the transform function using an out
buffer is not necessary. We can always do the transformation in place.
2016-01-08 15:01:52 +00:00
Luis de Bethencourt
14dd6b7088 opencv: do pyramidsegment's transformation in place
Run the transform function of pyramidsegment in place, reusing the image
data as both source and destination in cvPyrSegmentation. This avoids
copying the image back and forth and the extra memory.
2016-01-08 12:39:55 +00:00
Thiago Santos
a4980a33a1 tests: hlsdemux: add test for updating segment stop
Add a test for seeking that only updates stop position and verifies
that start is unmodified
2016-01-07 15:46:01 -03:00
Thiago Santos
16a2f7f5c0 adaptivedemux: fix seeking that just updates stop position
Fixed adaptivedemux seeking without flushing that just wants
to update stop position. This required protecting the segment
variables with a new mutex so that the seeking thread and the
download threads could safely manipulate the segment and
events related to it.

This contention is only locked/unlocked when starting a new
download, when the first fragment of a segment is received and
when seeking so, hopefully, it won't damage performance.
2016-01-07 15:46:01 -03:00
Thiago Santos
eaace4922c adaptivedemux: fix segment update on seeks
Fixes typo on reverse rate check and also only update the
position when the start/stop was actually changed.
2016-01-07 15:45:56 -03:00
Sebastian Dröge
b6696122a0 mxftypes: Don't store pointers in stack allocated guints
This works usually in this place, unless the compiler optimizes things in
interesting ways in which case it causes stack corruption and crashes later.

The compiler in question here is clang with -O1, which seems to pack the stack
a bit more and causes writing to the guint as pointer to overwrite map.memory,
which then later crashes during unmapping of the memory.
2016-01-07 18:13:08 +02:00
Sebastian Dröge
5a1953b31f mxfmetadata: Initialize boolean to FALSE to fix valgrind warning
Seems to be a false warning though.
2016-01-07 18:13:08 +02:00
Matthew Waters
11fb4fff80 glsyncmeta: only flush with a shared context
The wait code will flush for us for single context pipelines.
2016-01-07 14:11:13 +11:00