platform/upstream/gstreamer.git
8 years agoFix code indentation
Tim-Philipp Müller [Fri, 6 Nov 2015 19:23:09 +0000 (19:23 +0000)]
Fix code indentation

8 years agortponviftimestamp: use stream time for timestamp
Branko Subasic [Thu, 22 Oct 2015 11:40:36 +0000 (13:40 +0200)]
rtponviftimestamp: use stream time for timestamp

The Onvif Streaming Specification specifies that the NTP timestamps
in the Onvif extension header indicaes the absolute UTC time associated
with the access unit. But by using running time we can not achieve that,
since a frame's running time depends on the played interval, whether a
non-flushing is done, etc. Instead we have to use the stream time.

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

8 years agortponviftimestamp: Update ntp-offset and d/e-bits with a GstEvent
Linus Svensson [Fri, 6 Nov 2015 08:44:57 +0000 (09:44 +0100)]
rtponviftimestamp: Update ntp-offset and d/e-bits with a GstEvent

It is now possible to update the currently used ntp-offset with a
custom serialized downstream event. The element will read the ntp-offset
property when doing the state transition from READY to PAUSED and
use that offset until it receives a "GstNtpOffset" event, which also
has a "ntp-offset" attribute in that it's structure. In case the
property is not set and no event has been received, the element will
guess the npt-offset with help of the clock. If no clock can be
retrieved, the element will error out and stop the data flow.

The same event is also used for updating the D/E-bits in the RTP
extension header. The discont flag in a buffer can be set whenver a
live/network source looses a frame, but that is not the type of
discontinuity that the onvif extension header should reflect. The
header is mainly used for playback of a track concept, in which
gaps can be present, and it's those kind of gaps that should be
highlighted with the D- and E-bits.

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

8 years agortponviftimestamp: Do not rearange order of data
Linus Svensson [Fri, 6 Nov 2015 08:44:16 +0000 (09:44 +0100)]
rtponviftimestamp: Do not rearange order of data

If a buffer or a buffer list is cached, no events serialized with the
data stream should get through. The cached buffers and events should
be purged when we stop flushing.

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

8 years agortponvif: split unit tests in several files
Branko Subasic [Tue, 13 Oct 2015 12:21:47 +0000 (14:21 +0200)]
rtponvif: split unit tests in several files

Split the unit tests for rtponviftimestamp and rtponvifparse
elements in separate files.
Setup and cleanup the element and pads in fixures. Make the tests work
with CK_FORK=no as well, by cleaning up the 'buffers' list when needed.
Make unit tests work when run in valgrind by unreffing all buffers,
and by not allocating any payload in RTP buffers. Since we're not
doing anything with the payload part, but we're memcmp-aring the
complete buffer memory, valgrind complained about non-initialized
memory being used.

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

8 years agoadaptivedemux: improved bitrate estimations
Philippe Normand [Fri, 4 Sep 2015 07:59:06 +0000 (09:59 +0200)]
adaptivedemux: improved bitrate estimations

Bitrate estimation is now handled through a queue2 element added after
the source element used to download fragments.

Original hlsdemux patch by Duncan Palmer <dpalmer@digisoft.tv>
https://bugzilla.gnome.org/show_bug.cgi?id=733959

8 years agodshow: fix GList leak
Tim-Philipp Müller [Fri, 6 Nov 2015 12:59:51 +0000 (12:59 +0000)]
dshow: fix GList leak

_remove_link() would not free the actual list nodes.

8 years agoglshader, tsdemux: simplify code
Tim-Philipp Müller [Fri, 6 Nov 2015 12:31:09 +0000 (12:31 +0000)]
glshader, tsdemux: simplify code

Jus use _delete_link() instead of _remove_link() + _free1()

8 years agoglmixerbin: fix minor leak
Tim-Philipp Müller [Fri, 6 Nov 2015 12:30:12 +0000 (12:30 +0000)]
glmixerbin: fix minor leak

Don't leak removed list node.

8 years agofaac: Initialize debug category soon enough
Thibault Saunier [Fri, 6 Nov 2015 09:22:42 +0000 (10:22 +0100)]
faac: Initialize debug category soon enough

Avoiding assertions

8 years agoconfigure.ac: Added --with-hls-crypto=auto|nettle|libgcrypt|openssl option to build...
Julian Bouzas [Thu, 5 Nov 2015 10:12:41 +0000 (10:12 +0000)]
configure.ac: Added --with-hls-crypto=auto|nettle|libgcrypt|openssl option to build the source using the desired cryptographic library for HLS

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

8 years agohls: m3u8: don't leak GList nodes when matching up variant lists after master list...
Tim-Philipp Müller [Fri, 6 Nov 2015 00:48:42 +0000 (00:48 +0000)]
hls: m3u8: don't leak GList nodes when matching up variant lists after master list update

9 years agoaggregator: use GST_STIME_FORMAT for GstClockTimeDiff
Luis de Bethencourt [Thu, 5 Nov 2015 12:36:48 +0000 (12:36 +0000)]
aggregator: use GST_STIME_FORMAT for GstClockTimeDiff

No need to manually handle negative value of deadline, GST_STIME_FORMAT does
exactly this.

9 years agoresindvd: use GST_STIME_FORMAT for GstClockTimeDiff
Luis de Bethencourt [Thu, 5 Nov 2015 12:17:00 +0000 (12:17 +0000)]
resindvd: use GST_STIME_FORMAT for GstClockTimeDiff

No need to use G_GINT64_FORMAT for potentially negative values of
GstClockTimeDiff. Since 1.6 these can be handled with GST_STIME_FORMAT.
Plus it creates more readable values in the logs.

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

9 years agoopusdec: Update sink pad templates
Sebastian Dröge [Thu, 5 Nov 2015 11:11:19 +0000 (12:11 +0100)]
opusdec: Update sink pad templates

We always require the channel-mapping-field. If it's 0 we require nothing
else, otherwise we need channels, stream-count and coupled count to be
available.

9 years agoaggregator: don't compare templ instance pointers
Stefan Sauer [Wed, 4 Nov 2015 03:09:33 +0000 (19:09 -0800)]
aggregator: don't compare templ instance pointers

One can pass the PadTemplate from the element_class or the one from the factory.
While they have the same content, the addresses are different.

9 years agoopus: Remove invalid unit test
Sebastian Dröge [Tue, 3 Nov 2015 22:12:52 +0000 (00:12 +0200)]
opus: Remove invalid unit test

Opus headers should never be in-band, so don't test for correct
handling of that.

9 years agoopusenc: Create an empty taglist if there is none
Sebastian Dröge [Tue, 3 Nov 2015 22:12:22 +0000 (00:12 +0200)]
opusenc: Create an empty taglist if there is none

There always have to be 2 buffers in the streamheaders, even if
the comment buffer is basically empty.

9 years agoaggregator: Set to running in a single place
Olivier Crête [Tue, 3 Nov 2015 19:41:57 +0000 (14:41 -0500)]
aggregator: Set to running in a single place

Only set to running when the thread is actually started.

9 years agoaggregator: Document more locking
Olivier Crête [Tue, 3 Nov 2015 19:37:26 +0000 (14:37 -0500)]
aggregator: Document more locking

9 years agotsdemux: Don't create an incomplete OpusHead but set all the other caps fields instead
Sebastian Dröge [Tue, 3 Nov 2015 17:53:00 +0000 (19:53 +0200)]
tsdemux: Don't create an incomplete OpusHead but set all the other caps fields instead

OpusHead is optional, the other fields are not.

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

9 years agotsmux: Simplify Opus caps parsing by using codecutils helpers
Sebastian Dröge [Tue, 3 Nov 2015 17:51:03 +0000 (19:51 +0200)]
tsmux: Simplify Opus caps parsing by using codecutils helpers

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

9 years agoopus: Add proper support for multichannel audio
Sebastian Dröge [Tue, 3 Nov 2015 12:50:53 +0000 (14:50 +0200)]
opus: Add proper support for multichannel audio

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

9 years agoopusparse: Fix up pre-skip in OpusHead if upstream using GstAudioClippingMeta
Sebastian Dröge [Tue, 3 Nov 2015 09:41:07 +0000 (11:41 +0200)]
opusparse: Fix up pre-skip in OpusHead if upstream using GstAudioClippingMeta

Makes transmuxing from e.g. MPEG-TS to Ogg sample accurate.

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

9 years agotsdemux/mux: Add support for GstAudioClippingMeta for Opus
Sebastian Dröge [Mon, 2 Nov 2015 16:02:55 +0000 (18:02 +0200)]
tsdemux/mux: Add support for GstAudioClippingMeta for Opus

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

9 years agoopusdec: Handle GstAudioClippingMeta instead of the pre-skip field in the OpusHead
Sebastian Dröge [Mon, 2 Nov 2015 15:33:53 +0000 (17:33 +0200)]
opusdec: Handle GstAudioClippingMeta instead of the pre-skip field in the OpusHead

oggdemux is outputting the meta now, and only outputs if it should really
apply to the current buffer. Previously we would skip N samples also if we
started the decoder in the middle of the stream.

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

9 years agoopusenc: Add GstAudioClippingMeta to buffers that need to be clipped
Sebastian Dröge [Mon, 2 Nov 2015 14:52:28 +0000 (16:52 +0200)]
opusenc: Add GstAudioClippingMeta to buffers that need to be clipped

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

9 years agoopusenc: Disable granule position calculations by the base class
Sebastian Dröge [Mon, 2 Nov 2015 08:30:52 +0000 (10:30 +0200)]
opusenc: Disable granule position calculations by the base class

It is doing the wrong thing because of the Opus pre-skip: while the timestamps
are shifted by the pre-skip, the granule positions are not shifted.

oggmux is doing the right thing here already.

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

9 years agoopusenc: Add some FIXME comments about calculating padding with LPC
Sebastian Dröge [Sat, 31 Oct 2015 13:02:50 +0000 (15:02 +0200)]
opusenc: Add some FIXME comments about calculating padding with LPC

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

9 years agoopusenc: Encode exactly the amount of samples we got as input and put correct timesta...
Sebastian Dröge [Fri, 30 Oct 2015 18:57:37 +0000 (20:57 +0200)]
opusenc: Encode exactly the amount of samples we got as input and put correct timestamps on it

The first frame has lookahead less samples, the last frame might have some
padding or we might have to encode another frame of silence to get all our
input into the encoded data.

This is because of a) the lookahead at the beginning of the encoding, which
shifts all data by that amount of samples and b) the padding needed to fill
the very last frame completely.

Ideally we would use LPC to calculate something better than silence for the
padding to make the encoding as smooth as possible.

With this we get exactly the same amount of samples again in an
opusenc ! opusdec pipeline.

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

9 years agoopusenc: Put lookahead/pre-skip into the OpusHead header
Sebastian Dröge [Fri, 30 Oct 2015 18:47:20 +0000 (20:47 +0200)]
opusenc: Put lookahead/pre-skip into the OpusHead header

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

9 years agotsmux: Add support for Opus
Sebastian Dröge [Sun, 25 Oct 2015 15:27:39 +0000 (17:27 +0200)]
tsmux: Add support for Opus

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

9 years agotsdemux: Add support for Opus
Sebastian Dröge [Sat, 24 Oct 2015 11:27:43 +0000 (14:27 +0300)]
tsdemux: Add support for Opus

Code partially based on
  https://git.videolan.org/?p=ffmpeg.git;a=commit;h=74141f693ded2fbf75af56fff309d2db35183635
and based on the spec draft at
  https://wiki.xiph.org/OpusTS

Makes it possible to demux
  http://www.obe.tv/Downloads/opus.ts

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

9 years agotsmux: Don't leak buffer in error cases
Sebastian Dröge [Sun, 25 Oct 2015 17:31:51 +0000 (19:31 +0200)]
tsmux: Don't leak buffer in error cases

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

9 years agotsmux: Call prepare function for each collected buffer
Sebastian Dröge [Sun, 25 Oct 2015 17:29:53 +0000 (19:29 +0200)]
tsmux: Call prepare function for each collected buffer

Not when clipping buffers, as that doesn't happen for every buffer.

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

9 years agompegtsdescriptor: Add API for creating extended descriptors and fix writing them
Sebastian Dröge [Sun, 25 Oct 2015 16:09:24 +0000 (18:09 +0200)]
mpegtsdescriptor: Add API for creating extended descriptors and fix writing them

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

9 years agoopencv: cast paramspec flags to fix the build for c++
Stefan Sauer [Tue, 3 Nov 2015 05:16:15 +0000 (21:16 -0800)]
opencv: cast paramspec flags to fix the build for c++

All the other elements in this plugin do this already.

9 years agodvbsrc: use GST_STIME_ARGS for GstClockTimeDiff
Luis de Bethencourt [Tue, 3 Nov 2015 15:05:20 +0000 (15:05 +0000)]
dvbsrc: use GST_STIME_ARGS for GstClockTimeDiff

No need to use G_GINT64_FORMAT for potentially negative values of
GstClockTimeDiff. Since 1.6 these can be handled with GST_STIME_ARGS.
Plus it creates more readable values in the logs.

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

9 years agoamcvideodec: use GST_STIME_ARGS for GstClockTimeDiff
Luis de Bethencourt [Tue, 3 Nov 2015 15:00:01 +0000 (15:00 +0000)]
amcvideodec: use GST_STIME_ARGS for GstClockTimeDiff

No need to manually handle negative value of deadline, GST_STIME_ARGS does
exactly this.

9 years agowaylandsink: Add exception code for setting wl_surface
Hyunil Park [Tue, 3 Nov 2015 10:42:40 +0000 (10:42 +0000)]
waylandsink: Add exception code for setting wl_surface

Waylandsink needs exception code in gst_wayland_sink_set_window_handle().
After making sink->window, User can call
gst_wayland_sink_set_window_handle(). It is the user's fault, but
Waylandsink needs to handle the exception, if not then sink->window is
changed and rendering fails.

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

9 years agowaylandsink: Add exception code for setting wl_display
Hyunil Park [Thu, 9 Apr 2015 04:17:01 +0000 (13:17 +0900)]
waylandsink: Add exception code for setting wl_display

Waylandsink needs exception code in gst_wayland_sink_set_context(). After
calling gst_wayland_sink_set_context(), below code is set.
GST_ELEMENT_CLASS (parent_class)->set_context (element, context); but, If
user can call onemore. It is user's fault. but waylandsink need to
exception.

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

9 years agoaggregator: Hold object lock while manipulating the segment
Olivier Crête [Tue, 3 Nov 2015 01:10:35 +0000 (20:10 -0500)]
aggregator: Hold object lock while manipulating the segment

Make sure the object lock is held when aggregator->segment is
modified.

9 years agoaudioaggregator: Improve log messages
Olivier Crête [Tue, 3 Nov 2015 00:40:28 +0000 (19:40 -0500)]
audioaggregator: Improve log messages

Make the level of log messages saner and improve some.

9 years agoaggregator: Remove dead code
Olivier Crête [Tue, 3 Nov 2015 00:05:01 +0000 (19:05 -0500)]
aggregator: Remove dead code

This code will never be called as max>=min in all cases. If the upstream
latency query returned min>max, the function already returned and all
values that are added to those have max>= min.

9 years agompegtsmux: use GST_STIME_ARGS for GstClockTimeDiff
Luis de Bethencourt [Mon, 2 Nov 2015 17:02:47 +0000 (17:02 +0000)]
mpegtsmux: use GST_STIME_ARGS for GstClockTimeDiff

No need to manually handle negative values of best->dts in
GST_DEBUG_OBJECT. Use GST_STIME_ARGS for this.

9 years agovideoaggregator: use GST_STIME_ARGS for GstClockTimeDiff
Luis de Bethencourt [Mon, 2 Nov 2015 16:58:57 +0000 (16:58 +0000)]
videoaggregator: use GST_STIME_ARGS for GstClockTimeDiff

No need to manually handle negative values of diff, GST_STIME_ARGS does
exactly this.

9 years agodashdemux: remove unreachable code
Florin Apostol [Mon, 2 Nov 2015 11:17:29 +0000 (11:17 +0000)]
dashdemux: remove unreachable code

The stream->cur_seg_template is set to the lowest available segment
template (representation or adaptation or period, in this order).
Because the template elements are inherited, the lowest template will
have all the elements the parents had, so there is no need to check the
parent for an element that is not found in the child (eg initialisation
or index).

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

9 years agotests: add a test for MPD file duration parsing
Vincent Penquerc'h [Mon, 2 Nov 2015 10:48:11 +0000 (10:48 +0000)]
tests: add a test for MPD file duration parsing

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

9 years agompdparser: add some checks to duration parsing
Vincent Penquerc'h [Mon, 2 Nov 2015 10:25:38 +0000 (10:25 +0000)]
mpdparser: add some checks to duration parsing

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

9 years agodashdemux: added duration format validation
Florin Apostol [Tue, 29 Sep 2015 08:32:02 +0000 (09:32 +0100)]
dashdemux: added duration format validation

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

9 years agodashdemux: fix memory leak
Luis de Bethencourt [Mon, 2 Nov 2015 11:21:14 +0000 (11:21 +0000)]
dashdemux: fix memory leak

Free new_mpd, allocated with g_slice_new(), before going out of scope in
goto error.

CID 1338050

9 years agoRevert "vtenc: free input buffer ASAP"
Alessandro Decina [Mon, 2 Nov 2015 09:14:11 +0000 (20:14 +1100)]
Revert "vtenc: free input buffer ASAP"

This reverts commit 6101fc57b8afac4f4e4aa742892f0d9c99d38a8c.

GstVideoEncoder assumes that the input buffer is available until _finish_frame.

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

9 years agoopusdec: Assume 48kHz if no sample rate is given in the header
Sebastian Dröge [Sun, 1 Nov 2015 21:34:32 +0000 (23:34 +0200)]
opusdec: Assume 48kHz if no sample rate is given in the header

9 years agoopusenc: Place 48kHz first in the caps
Sebastian Dröge [Fri, 30 Oct 2015 18:59:41 +0000 (20:59 +0200)]
opusenc: Place 48kHz first in the caps

For all the other sample rates the encoder will have to resample internally.

9 years agogstglutils: fix shader compilation on Mountain Lion
Alessandro Decina [Mon, 2 Nov 2015 01:10:44 +0000 (12:10 +1100)]
gstglutils: fix shader compilation on Mountain Lion

Make gst_gl_context_gen_shader/_compile_shader assume GST_GLSL_PROFILE_ES |
GST_GLSL_PROFILE_COMPATIBILITY as the profile. Without this, the shader compiler
doesn't inject the #version tag resulting in a compilation error on Mountain
Lion.

This is a workaround for old code using gst_gl_context_gen_shader. New code
should use the gst_glsl_stage_* API directly which allows the caller to
explicitly specify version/profile.

9 years agoksvideosrc: don't try to align current timestamp on previous timestamp
Philippe Renon [Sat, 31 Oct 2015 17:47:39 +0000 (18:47 +0100)]
ksvideosrc: don't try to align current timestamp on previous timestamp

this causes frames to be dropped.

Based on a patch by Sebastian Dröge

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

9 years agoglbufferpool: explicitly initialize a possibly uninitialized variable
Matthew Waters [Sat, 31 Oct 2015 12:28:20 +0000 (23:28 +1100)]
glbufferpool: explicitly initialize a possibly uninitialized variable

The ret variable may be uninitialized and so its contents were undefined and
the results were erratic (failing with glvideomixer, succeeding in other cases)

P.S. No idea why gcc/clang et al never picked up on this like they normally do
(probably due to some optimisation pass figuring out it's only set once...)

9 years agompdparser: make durations unsigned where appropriate
Vincent Penquerc'h [Thu, 29 Oct 2015 11:38:35 +0000 (11:38 +0000)]
mpdparser: make durations unsigned where appropriate

The standard does not seem to make any particular explicit not
implicit reference to the signedness of durations, and the code
does not rely on such, nor on the negativity of the -1 value
that's used as a placeholder when a duration property is not
present in the XML.

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

9 years agodashdemux: inherit bitstreamSwitching from Period to AdaptationSet
Florin Apostol [Fri, 30 Oct 2015 15:55:19 +0000 (15:55 +0000)]
dashdemux: inherit bitstreamSwitching from Period to AdaptationSet

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

9 years agodashdemux: marked PROP_BANDWIDTH_USAGE property as deprecated
Florin Apostol [Thu, 20 Aug 2015 17:14:36 +0000 (18:14 +0100)]
dashdemux: marked PROP_BANDWIDTH_USAGE property as deprecated

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

9 years agodashdemux: unit testing reproducing inherited segment duration overflow
Florin Apostol [Fri, 30 Oct 2015 15:02:35 +0000 (15:02 +0000)]
dashdemux: unit testing reproducing inherited segment duration overflow

unit test reproducing https://bugzilla.gnome.org/show_bug.cgi?id=751832

9 years agodashdemux: inherited segment URLs are ignored if they are defined again in a lower...
Florin Apostol [Fri, 30 Oct 2015 14:31:21 +0000 (14:31 +0000)]
dashdemux: inherited segment URLs are ignored if they are defined again in a lower SegmentList

According to the standard:
"SegmentBase, SegmentTemplate and SegmentList shall inherit
attributes and elements from the same element on a higher level.
If the same attribute or element is present on both levels,
the one on the lower level shall take precedence over the one
on the higher level."

gst_mpdparser_parse_segment_list_node will now discard any inherited
segment URLs if the parsed element defines some too.

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

9 years agoadaptivedemux: tests: added test for fragment download error
Florin Apostol [Tue, 20 Oct 2015 16:21:00 +0000 (17:21 +0100)]
adaptivedemux: tests: added test for fragment download error

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

9 years agoadaptivedemux: tests: made adaptive demux test thread safe
Florin Apostol [Tue, 20 Oct 2015 14:46:36 +0000 (15:46 +0100)]
adaptivedemux: tests: made adaptive demux test thread safe

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

9 years agoadaptivedemux: tests: added query test
Florin Apostol [Fri, 16 Oct 2015 15:20:34 +0000 (16:20 +0100)]
adaptivedemux: tests: added query test

Testing if adaptive demux responds to queries.

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

9 years agodashdemux: tests: added test for multiple BaseURL entries
Florin Apostol [Wed, 28 Oct 2015 11:21:14 +0000 (11:21 +0000)]
dashdemux: tests: added test for multiple BaseURL entries

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

9 years agodashdemux: tests: added unit test for 6d1eda9391d3143b5fc633edfd94b89dbba209ab
Florin Apostol [Wed, 16 Sep 2015 09:40:33 +0000 (10:40 +0100)]
dashdemux: tests: added unit test for 6d1eda9391d3143b5fc633edfd94b89dbba209ab

Commit 6d1eda9391d3143b5fc633edfd94b89dbba209ab fixed the period start
time scaling. This patch updates the unit tests to cover that scenario.

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

9 years agoadaptivedemux: tests: added download error test
Florin Apostol [Fri, 16 Oct 2015 16:10:11 +0000 (17:10 +0100)]
adaptivedemux: tests: added download error test

Tests adaptive demux behaviour when the uri is wrong and download does
not happen.

9 years agoadaptivedemux: stop task on multiple download errors
Florin Apostol [Fri, 30 Oct 2015 12:49:20 +0000 (12:49 +0000)]
adaptivedemux: stop task on multiple download errors

On multiple download errors, we stop the download task and change the src
element state to NULL.

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

9 years agoadaptivedemux: fix a missing lock in write to stream->last_ret
Vincent Penquerc'h [Fri, 30 Oct 2015 12:24:22 +0000 (12:24 +0000)]
adaptivedemux: fix a missing lock in write to stream->last_ret

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

9 years agoadaptivedemux: return error if src element cannot start
Florin Apostol [Wed, 7 Oct 2015 22:20:51 +0000 (23:20 +0100)]
adaptivedemux: return error if src element cannot start

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

9 years agoadaptivedemux: fixed waiting for fragment updates
Florin Apostol [Thu, 8 Oct 2015 10:45:25 +0000 (11:45 +0100)]
adaptivedemux: fixed waiting for fragment updates

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

9 years agoadaptivedemux: fix header redownload in case of errors
Florin Apostol [Thu, 8 Oct 2015 11:35:44 +0000 (12:35 +0100)]
adaptivedemux: fix header redownload in case of errors

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

9 years agoadaptivedemux: release manifest lock before sending flush stop event
Florin Apostol [Fri, 30 Oct 2015 00:04:12 +0000 (00:04 +0000)]
adaptivedemux: release manifest lock before sending flush stop event

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

9 years agoadaptivedemux: reset download_finished before starting the src element
Florin Apostol [Thu, 29 Oct 2015 23:41:46 +0000 (23:41 +0000)]
adaptivedemux: reset download_finished before starting the src element

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

9 years agoadaptivedemux: release manifest lock before changing element state
Florin Apostol [Thu, 29 Oct 2015 23:23:05 +0000 (23:23 +0000)]
adaptivedemux: release manifest lock before changing element state

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

9 years agovtdec: fix compilation error
Matthew Waters [Fri, 30 Oct 2015 05:38:17 +0000 (16:38 +1100)]
vtdec: fix compilation error

Undefined symbols for architecture x86_64:
  "__gl_target_to_gst", referenced from:
      __do_get_gl_buffer in libgstapplemedia_la-corevideotexturecache.o

9 years agogl/tests: update for glmemory api changes
Matthew Waters [Fri, 30 Oct 2015 04:00:23 +0000 (15:00 +1100)]
gl/tests: update for glmemory api changes

9 years agoglcolorconvert: remove unused ret variable
Matthew Waters [Fri, 30 Oct 2015 03:43:23 +0000 (14:43 +1100)]
glcolorconvert: remove unused ret variable

9 years agoglslstage: remove typedefs from the header
Matthew Waters [Fri, 30 Oct 2015 03:40:35 +0000 (14:40 +1100)]
glslstage: remove typedefs from the header

They are already defined in the forward decleration header and defining them
more than once will give an error with OSX's clang about typedef redefinition
being a C11 feature.

9 years agoglcolorconvert: follow the correct texture target names
Matthew Waters [Fri, 30 Oct 2015 03:38:05 +0000 (14:38 +1100)]
glcolorconvert: follow the correct texture target names

9 years agoglupload: explicitly configure the texture target on the gl buffer pool
Matthew Waters [Thu, 29 Oct 2015 14:42:42 +0000 (01:42 +1100)]
glupload: explicitly configure the texture target on the gl buffer pool

If we don't, then the pool could end up allocating 2D textures when the
caps explictly state they should be rectangle textures.

9 years agoglbufferpool: add bufferpool options for the various texture targets
Matthew Waters [Thu, 29 Oct 2015 14:27:36 +0000 (01:27 +1100)]
glbufferpool: add bufferpool options for the various texture targets

This was chosen over relying solely on the caps as glupload needs to propose an
allocation and set the texture target based on the output caps.  Setting the
caps in the config is currently pointless as they are overwritten in a lot of
element's decide_allocation functions.

This provides a mechanism for the buffer pool to be configured for a certain
texture target when none has been configured.

9 years agoglcolorconvert: add support for converting texture targets
Matthew Waters [Thu, 29 Oct 2015 02:04:31 +0000 (13:04 +1100)]
glcolorconvert: add support for converting texture targets

Solved with a simple shader templating mechanism and string replacements
of the necessary sampler types/texture accesses and texture coordinate
mangling for rectangular and external-oes textures.

9 years agoglmemory: add support for rectangle textures
Matthew Waters [Wed, 28 Oct 2015 13:44:26 +0000 (00:44 +1100)]
glmemory: add support for rectangle textures

Add the various tokens/strings for the differnet texture types (2D, rect, oes)

Changes the GLmemory api to include the GstGLTextureTarget in all relevant
functions.

Update the relevant caps/templates for 2D only textures.

9 years agoglcolorconvert: order the caps template so that RGBA is first
Matthew Waters [Thu, 29 Oct 2015 14:45:13 +0000 (01:45 +1100)]
glcolorconvert: order the caps template so that RGBA is first

glcolorconvert ! glcolorconvert would sometimes negotiated RGB
(the first list entry) otherwise.

9 years agoglbufferpool: move typedef's into the forward decleration file
Matthew Waters [Thu, 29 Oct 2015 14:16:02 +0000 (01:16 +1100)]
glbufferpool: move typedef's into the forward decleration file

Otherwise, for example, clang will warn about typedef redefinitions
being a C11 feature.

9 years agotests: fixed fake soup http src plugin
Florin Apostol [Fri, 16 Oct 2015 17:36:20 +0000 (18:36 +0100)]
tests: fixed fake soup http src plugin

The soup http src changed the way it interprets the seek segment stop value.
Previously it was inclusive, now it is not (see commit
21c6da6764c0cd015e9f3c5eecba36e297187deb,
bug https://bugzilla.gnome.org/show_bug.cgi?id=748316)

Updated fake soup http src to also consider segment stop not inclusive.

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

9 years agoadaptivedemux: tests: added unit test for adaptivedemux
Florin Apostol [Fri, 9 Oct 2015 13:10:52 +0000 (14:10 +0100)]
adaptivedemux: tests: added unit test for adaptivedemux

Created a unit test for dashdemux. It relies on a fake SOUP HTTP src plugin
that will feed data to dashdemux. The test controls the data to be
generated and checks the correct data was received for each expected
stream.

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

9 years agotests: added fake http src plugin
Alex Ashley [Fri, 9 Oct 2015 20:23:20 +0000 (21:23 +0100)]
tests: added fake http src plugin

Added a fake http src plugin capable of generating data buffers for a
request of a http url. Can be used in tests to simulate http accesses.

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

9 years agodashdemux: provide a default suggestedPresentationDelay
Alex Ashley [Tue, 7 Jul 2015 14:38:08 +0000 (15:38 +0100)]
dashdemux: provide a default suggestedPresentationDelay

If MPD@suggestedPresentationDelay is not present in the manifest,
dashdemux selects the fragment closest to the most recently generated
fragment. This causes a playback issue because this choice does not allow
the DASH client to build up any buffer of downloaded fragments without
pausing playback. This is because by definition new fragments appear on
the server in real-time (e.g. if segment duration is 4 seconds, a new
fragment will appear on the server every 4 seconds). If the starting
playback position was n*segmentDuration seconds behind "now", the DASH
client could download up to 'n' fragments faster than realtime before it
reached the point where it needed to wait for fragments to appear on the
server.

The MPD@suggestedPresentationDelay attribute allows a content publisher
to provide a suggested starting position that is behind the current
"live" position.

If the MPD@suggestedPresentationDelay attribute is not present, provide
a suitable default value as a property of the dashdemux element. To
allow the default presentation delay to be specified either using
fragments or seconds, the property is a string that contains a number
and a unit (e.g. "10 seconds", "4 fragments", "2500ms").

9 years agoivfparse: Add vp9 support
Sreerenj Balachandran [Thu, 29 Oct 2015 13:02:38 +0000 (15:02 +0200)]
ivfparse: Add vp9 support

Differentiate the vp8/vp9 bitstream based on fourcc.

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

9 years agodashdemux: improve detection of stream language
Florin Apostol [Wed, 9 Sep 2015 13:09:43 +0000 (14:09 +0100)]
dashdemux: improve detection of stream language

Improved the detection of stream's language if the AdaptationSet
contains more than 1 ContentComponent

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

9 years agodash_mpd: restrict segment template format strings to %0[0-9]*d as per spec
Vincent Penquerc'h [Thu, 29 Oct 2015 12:04:31 +0000 (12:04 +0000)]
dash_mpd: restrict segment template format strings to %0[0-9]*d as per spec

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

9 years agodashdemux: segment template parsing: added support for %d
Florin Apostol [Wed, 9 Sep 2015 11:36:10 +0000 (12:36 +0100)]
dashdemux: segment template parsing: added support for %d

Added support for %d in template identifier.
Added testcases for %d, %3d, %0-4d identifier formats.

9 years agodashdemux: corrected parsing of segment templates
Florin Apostol [Thu, 29 Oct 2015 11:54:34 +0000 (11:54 +0000)]
dashdemux: corrected parsing of segment templates

Corrected the parsing of a segment template string.
Added unit tests to test the segment template parsing.
All reported problems are now correctly handled.

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

9 years agodahsdemux: task is signaled to stop without stop condition being set
Florin Apostol [Thu, 29 Oct 2015 11:17:48 +0000 (11:17 +0000)]
dahsdemux: task is signaled to stop without stop condition being set

The gst_adaptive_demux_stream_free function is trying to stop the stream's
download task. For this, it signals the task. But it fails to also set the
stream->download_finished = TRUE, so the task will go back to sleep and
only exit when the download is finished.

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

9 years agodashdemux: fixed crash when segment timeline list is greater than segment url list
Florin Apostol [Wed, 28 Oct 2015 17:02:51 +0000 (17:02 +0000)]
dashdemux: fixed crash when segment timeline list is greater than segment url list

When building the media segment list using a SegmentList node, the
gst_mpd_client_setup_representation function will iterate through the
list of S nodes and will expect to find a matching SegmentUrl node. If
one does not exist, the code made an illegal memory access.

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

9 years agodashdemux: unit test for missing profiles
Florin Apostol [Fri, 11 Sep 2015 09:59:15 +0000 (10:59 +0100)]
dashdemux: unit test for missing profiles

9 years agompdparser: do not dereference profiles is absent
Vincent Penquerc'h [Fri, 11 Sep 2015 09:57:26 +0000 (10:57 +0100)]
mpdparser: do not dereference profiles is absent

These are used to apply restrictions on what the MPD file may
use, so no profile means no restrictions.

Besides, nothing actually uses the profiles (yet) anyway.

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