Commit graph

5140 commits

Author SHA1 Message Date
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
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
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
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
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
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
Tim-Philipp Müller
17f0faa368 hlsdemux: put boolean values into gboolean variables
And remove superfluous assignments.
2016-01-06 15:25:04 +00:00
Thiago Santos
bf57be7fc7 hlsdemux: fix reverse playback seek with snap flags
Properly handle snap flags during reverse seeking. In this case
the before/after are also reversed, so handle those as such.

For example: with a sequence of 1s fragments:

|-- 0 --|-- 1 --|-- 2 --|-- 3 --|

If you seek to 1.5s it is inside fragment 1. With reverse and

snap-before: should play from the end of fragment 1
snap-after: should play from the end of fragment 0
2016-01-06 10:23:13 -03:00
Thiago Santos
5d87f68f6c hlsdemux: simplify snap flags checking
Replace:
if (boolean) var = true;

with:
var = (boolean);
2016-01-06 10:23:13 -03:00
Thiago Santos
b8e0c365c4 hlsdemux: respect keyunit flag for position
Set the segment start position when keyunit flag is active
2016-01-06 10:23:13 -03:00
Matthew Waters
519280204c glcolorconvert: implement usage of a buffer pool
Saves unnecessary glGenTextures and glDeleteTextures which may have a
non-trivial cost.
2016-01-06 16:48:33 +11:00
Reynaldo H. Verdejo Pinochet
8c78a79c67 rtmp: refer to both elements in the README 2015-12-30 18:00:47 -08:00
Reynaldo H. Verdejo Pinochet
00587eb561 rtmpsrc: check for failed RTMP context alloc
Avoids an unlikely crash.

Arguably, if allocation fails we have no chance of
recovering but nonetheless, RTMP_Alloc can fail and
librtmp's RTMP_init() (called next) assumes a non-NULL
pointer is passed without checking.

Additionally, unify exit path on error.
2015-12-30 17:22:54 -08:00
Reynaldo H. Verdejo Pinochet
17da1ad409 rtmpsink: check for failed RTMP context alloc
Avoids an unlikely crash.

Arguably, if allocation fails we have no chance of
recovering but nonetheless, RTMP_Alloc can fail and
librtmp's RTMP_init() (called next) assumes a non-NULL
pointer is passed without checking.

Additionally, unify exit path on error.
2015-12-30 17:22:42 -08:00
Reynaldo H. Verdejo Pinochet
4b93a7167f rtmp: correct librtmp log-level mappings
Additionally, move to a switch in _set_debug_level()
to make easier to follow and compare with the
mappings in _log_callback()
2015-12-30 16:12:27 -08:00
Matthew Waters
8c02a47741 gleffects: fix shader compilation with legacy opengl
All the gleffects shaders can be run against a gles2 or a legacy opengl glsl
compiler but weren't being advertised as such.

Fixes gleffects under desktop opengl < 3.2.
2015-12-30 12:16:29 +11:00
Florin Apostol
ef06d2a855 dashdemux: removed unnecessary space trimming in gst_dash_demux_parse_http_head
sscanf has removed all spaces when it has constructed zone string. There is
no need to search for leading spaces.

https://bugzilla.gnome.org/show_bug.cgi?id=759743
2015-12-28 14:10:58 +02:00
Florin Apostol
09b21eacae dashdemux: accept 2 or 4 digit year when using HTTP HEAD for calculating clock compensation
Convert year from 2 digits to 4 digits in gst_dash_demux_parse_http_head

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

Also updated references to Rfc822 to Rfc5322
2015-12-28 14:10:58 +02:00
Florent Thiéry
15a28c8024 glshader: fix usage doc
The property location has been changed in favor of vertex/fragment
string properties; the doc had not been updated and was still referring
to the previous property; also, now the #version header has become mandatory

https://bugzilla.gnome.org/show_bug.cgi?id=759902
2015-12-28 10:43:56 +02:00
Florent Thiéry
c68e842ed0 glimagesink: Post unhandled navigation events on the bus
Based off xvimagesink implementation

https://bugzilla.gnome.org/show_bug.cgi?id=759869
2015-12-28 10:04:33 +02:00
Reynaldo H. Verdejo Pinochet
77b7864670 motioncells: fix splitting of RGB color string
No need to attempt splitting the RGB string in 255 tokens
if we only expect 3.

Left max_tokens at 4 to preserve the current logic (which
allows for extra stuff at the end) and added a warning on
parsing failure instead of silently discarding the value.
2015-12-27 23:26:50 -08:00
Reynaldo H. Verdejo Pinochet
5515a96167 motioncells: fix typo in header 2015-12-27 23:26:50 -08:00
Reynaldo H. Verdejo Pinochet
c0ced1590d motioncells: fix misleading warning message
calculate_motion != FALSE means the motion computation
logic is disabled, not a mapping error.
2015-12-27 23:26:50 -08:00
Reynaldo H. Verdejo Pinochet
8f3392ba44 motioncells: rework property descriptions 2015-12-27 23:26:50 -08:00
Reynaldo H. Verdejo Pinochet
c788678059 motioncells: use NULL instead of g_strdup(NULL) 2015-12-27 23:26:50 -08:00
Alex Ashley
f6bff8f5f5 hlsdemux: unquote all the quoted-string attributes
The URI attribute from the EXT-X-KEY tag and the URI attribute from the
EXT-X-I-FRAMES-ONLY tag are both quoted-string attibutes that have their
quotation marks removed during parsing. The CODECS attribute of the
EXT-X-STREAM-INF is also a quoted-string attribute, but this attribute
was not being un-quoted.

This commit changes the parser to always unquote all quoted-string
attributes and adjusts the unit tests to this new bevahiour for the
CODECS attribute.

An additional test is added to check that parsing of all of the fields
in the EXT-X-STREAM tag is correct, including those that contain comma
characters.

https://bugzilla.gnome.org/show_bug.cgi?id=758384
2015-12-22 11:15:32 -03:00
Thiago Santos
a072101441 hlsdemux: make sure every bad update_playlist return sets an error
Otherwise it segfaults when reporting the error in the bus
2015-12-22 10:16:16 -03:00
Sebastian Dröge
11729cde80 teletextdec: Use NULL instead of g_strdup('\0')
Which is equivalent to g_strdup(NULL).

https://bugzilla.gnome.org/show_bug.cgi?id=759728
2015-12-21 13:57:04 +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
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
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
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
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