platform/upstream/gstreamer.git
8 years agoRevert "tools: gst-launch: return non-0 exit code on async error"
Nicolas Dufresne [Fri, 4 Dec 2015 15:45:25 +0000 (10:45 -0500)]
Revert "tools: gst-launch: return non-0 exit code on async error"

This reverts commit 2ee4cba2485d7f1646d48e4559426aed4ba99c85.

8 years agotools: gst-launch: return non-0 exit code on async error
Tim-Philipp Müller [Fri, 4 Dec 2015 15:09:39 +0000 (15:09 +0000)]
tools: gst-launch: return non-0 exit code on async error

When an error happens in playing state, still return a
non-0 exit code.

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

8 years agohelpers: really fix install race
Ross Burton [Fri, 4 Dec 2015 14:39:29 +0000 (14:39 +0000)]
helpers: really fix install race

My previous fix for #758029 wasn't quite right and simply made the race rarer.
Some of the files are installed by install-exec and others by install-exec, so
the hooks need to be split too.

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

8 years agoquery: fix docs
Wim Taymans [Fri, 4 Dec 2015 10:56:45 +0000 (11:56 +0100)]
query: fix docs

The allocation query has parameters with the meta API, not flags.

8 years agoDrop usage of deprecated g-ir-scanner --strip-prefix flag
Reynaldo H. Verdejo Pinochet [Wed, 2 Dec 2015 23:02:25 +0000 (15:02 -0800)]
Drop usage of deprecated g-ir-scanner --strip-prefix flag

8 years agomultiqueue: Fix set/get property
Edward Hervey [Wed, 2 Dec 2015 15:28:23 +0000 (16:28 +0100)]
multiqueue: Fix set/get property

Blame it on the rebasing :)

8 years agopad: Implement GstPadEventFullFunction
Edward Hervey [Thu, 12 Nov 2015 16:15:37 +0000 (17:15 +0100)]
pad: Implement GstPadEventFullFunction

API: GstPadEventFullFunction

Returns a GstFlowReturn, allows asynchronous elements to properly
propagate flow returns

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

8 years agomultiqueue: Use signed clock values for running time calculation
Edward Hervey [Mon, 30 Nov 2015 16:09:43 +0000 (17:09 +0100)]
multiqueue: Use signed clock values for running time calculation

This improves the accuracy of queue levels and when to push buffers
for buffers falling outside of the segment

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

8 years agomultiqueue: Add an extra cache time for unlinked streams
Edward Hervey [Fri, 27 Nov 2015 08:45:29 +0000 (09:45 +0100)]
multiqueue: Add an extra cache time for unlinked streams

When synchronizing the output by time, there are some use-cases (like
allowing gapless playback downstream) where we want the unlinked streams
to stay slightly behind the linked streams.

The "unlinked-cache-time" property allows the user to specify by how
much time the unlinked streams should wait before pushing again.

8 years agomultiqueue: Optimize multiqueue sizes based on interleave
Edward Hervey [Mon, 26 Oct 2015 07:06:01 +0000 (08:06 +0100)]
multiqueue: Optimize multiqueue sizes based on interleave

Multiqueue should only be used to cope with:
* decoupling upstream and dowstream threading (i.e. having separate threads
  for elementary streams).
* Ensuring individual queues have enough space to cope with upstream interleave
  (distance in stream time between co-located samples). This is to guarantee
  that we have enough room in each individual queues to provide new data in
  each, without being blocked.
* Limit the queue sizes to that interleave distance (and an extra minimal
  buffering size). This is to ensure we don't consume too much memory.

Based on that, multiqueue now continuously calculates the input interleave
(per incoming streaming thread). Based on that, it calculates a target
interleave (currently 1.5 x real_interleave + 250ms padding).

If the target interleave is greater than the current max_size.time, it will
update it accordingly (to allow enough margin to not block).
If the target interleave goes down by more than 50%, we re-adjust it once
we know we have gone past a safe distance (2 x current max_size.time).

This mode can only be used for incoming streams that are guaranteed to be
properly timestamped.

Furthermore, we ignore sparse streams when calculating interleave and maximum
size of queues.

For the simplest of use-cases (single stream), multiqueue acts as a single
queue with a time limit of 250ms.
If there are multiple inputs, but each come from a different streaming thread,
the maximum time limit will also end up being 250ms.

On regular files (more than one input stream from the same upstream streaming
thread), it can reduce the total memory used as much as 10x, ending up with
max_size.time around 500ms.

Due to the adaptive nature, it can also cope with changing interleave (which
can happen commonly on some files at startup/pre-roll time)

8 years agomultiqueue: use new stream-start event sparse flag to avoid overreading subtitles
Vincent Penquerc'h [Tue, 8 Jan 2013 21:16:42 +0000 (21:16 +0000)]
multiqueue: use new stream-start event sparse flag to avoid overreading subtitles

This will mean a much lower delay before a subtitles track changes take
effect. Also avoids excessive memory usage in many cases.

This will also consider sparse streams as (individually) never full, so
as to avoid blocking all playback due to one sparse stream.

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

8 years agomultiqueue: Fix high_time computation
Edward Hervey [Fri, 30 Oct 2015 09:22:20 +0000 (10:22 +0100)]
multiqueue: Fix high_time computation

* Avoid the computation completely if we know we don't need it (not in
  sync time mode)
* Make sure we don't override highest time with GST_CLOCK_TIME_NONE on
  unlinked pads
* Ensure the high_time gets properly updated if all pads are not linked
* Fix the comparision in the loop whether the target high time is the same
  as the current time
* Split wake_up_next_non_linked method to avoid useless calculation

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

8 years agoqueue2: Don't report 0% unless empty
Jan Schmidt [Thu, 5 Nov 2015 16:02:42 +0000 (03:02 +1100)]
queue2: Don't report 0% unless empty

When preparing a buffering message, don't report 0% if there
is any bytes left in the queue at all. We still have something
to push, so don't tell the app to start buffering - maybe
we'll get more data before actually running dry.

8 years agogstclock: Fix GST_STIME_ARGS
Edward Hervey [Mon, 30 Nov 2015 16:11:33 +0000 (17:11 +0100)]
gstclock: Fix GST_STIME_ARGS

It wasn't properly handling GST_CLOCK_STIME_NONE and always use the
sign marker (+/-) to make it easier to identify signed values in
logs

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

8 years agocontrolsource: Annotate get_value[_array] as (method)
Thibault Saunier [Mon, 30 Nov 2015 22:08:50 +0000 (23:08 +0100)]
controlsource: Annotate get_value[_array] as (method)

As the names clash with gst_object_get_value[_array]

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

8 years agoplugin: Add prefix support to dependencies
Nicolas Dufresne [Fri, 13 Nov 2015 22:32:57 +0000 (17:32 -0500)]
plugin: Add prefix support to dependencies

This adds a new flags, GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_PREFIX,
which allow using the names as prefix for plugin depencies.

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

8 years agoplugin: Allow device nodes as dependency
Nicolas Dufresne [Fri, 13 Nov 2015 21:32:31 +0000 (16:32 -0500)]
plugin: Allow device nodes as dependency

This is useful for feature that are produced after probing a specific
node. You want to reload this plugin if the specific node(s) have been
removed, added, or reloaded.

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

8 years agoplugin: Don't do lossy shift on hash
Nicolas Dufresne [Fri, 13 Nov 2015 21:20:42 +0000 (16:20 -0500)]
plugin: Don't do lossy shift on hash

In plugin is responsible for calculating a hash of the dependencies
in order to determine if the cache should be invalidated or not.
Currently, the hash combining method removes a bit of the original
have before combining with an addition. As we use 32bits for our hash
and shift 1 bit for each file and directory, that resulting hash only
account for the last 32 files. And is more affected by the last file.

Rotating technique (shifting, and adding back the ending bit), can be
use to make the addition non-commutative. In a way that different order
gives different hashes. In this case, I don't preserve this behaviour
because the order in which the files are provided by the OS is
irrelevant.

In most cases, the XOR operation is used to combine hashes. In this
code we use the addition. I decided to preserve the addition because
we make use of non-random hash ((guint) -1) in the algorithm for
matching files that are not really part of the hash (symlinks, special
files). Doing successive XOR on this value, will simply switch from
full ones, to full zero. The XOR used with whitelist has been preserved
as it's based on a fairly randomized hash (g_str_hash).

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

8 years agoinfo: fix compiler warning with -Wpedantic and gcc 5
Lukasz Forynski [Mon, 23 Nov 2015 21:40:34 +0000 (21:40 +0000)]
info: fix compiler warning with -Wpedantic and gcc 5

Gstreamer compiled with gcc 5.2 and -Wpedantic produces the
following warning:

'ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
  const char *s = __FUNCTION__;'

Since gcc 5 enables C99 by default, use __func__ if it's available
instead of the non-standard __FUNCTION__ (as suggested in [2]).

[1]: https://gcc.gnu.org/gcc-5/changes.html
[2]: https://gcc.gnu.org/gcc-5/porting_to.html

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

8 years agocontroller: fix annotation to make g-ir-scanner happy
Tim-Philipp Müller [Fri, 20 Nov 2015 19:45:39 +0000 (19:45 +0000)]
controller: fix annotation to make g-ir-scanner happy

gstinterpolationcontrolsource.h:59: Warning: GstController: missing ":" at column 51:
 * @GST_INTERPOLATION_MODE_CUBIC_MONO: (Since 1.8) monotonic cubic interpolation, will not
gstinterpolationcontrolsource.h:59: Warning: GstController: unknown annotation: since

8 years agotags: add GST_TAG_PRIVATE_DATA
Ravi Kiran K N [Mon, 29 Sep 2014 08:33:13 +0000 (14:03 +0530)]
tags: add GST_TAG_PRIVATE_DATA

Can be used to represent private data that may be
contained in tags, such as ID3v2 PRIV frames.

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

8 years agoRevert "baseparse: do not overwrite header buffer timestamps"
Thiago Santos [Thu, 19 Nov 2015 03:51:44 +0000 (00:51 -0300)]
Revert "baseparse: do not overwrite header buffer timestamps"

This reverts commit 2c475a035543efc0202ecdc52070295a421ed4b4.

This causes issues with h264parse. It breaks timestamps as
there are headers in the middle of the stream and this patch
makes the timestamps for those differ from the ones that
are adjusted, creating a discontinuity and leading to sync
issues.

8 years agoRevert "baseparse: simplify code a bit"
Thiago Santos [Tue, 17 Nov 2015 21:47:48 +0000 (18:47 -0300)]
Revert "baseparse: simplify code a bit"

This reverts commit 3984f7159a72c2eebe01905ee53716e3b2abcb30.

8 years agoqueue2: don't print criticals when receiving custom events in ring buffer mode
Tim-Philipp Müller [Wed, 18 Nov 2015 11:46:45 +0000 (11:46 +0000)]
queue2: don't print criticals when receiving custom events in ring buffer mode

Downgrade from g_warning to GST_WARNING log message.

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

8 years agoptp-helper: Disable multicast loopback
Sebastian Dröge [Wed, 18 Nov 2015 07:21:23 +0000 (09:21 +0200)]
ptp-helper: Disable multicast loopback

We're not really interested in our own packets and ignore them anyway.

8 years agodebugutils: Fix string memory leak
Vineeth TM [Tue, 17 Nov 2015 00:17:58 +0000 (09:17 +0900)]
debugutils: Fix string memory leak

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

8 years agobaseparse: simplify code a bit
Thiago Santos [Mon, 16 Nov 2015 11:22:14 +0000 (08:22 -0300)]
baseparse: simplify code a bit

Avoid repeated checks for testing if a buffer is a header

8 years agocollectpads: handle buffer with dts-only when mapping to running time
Thiago Santos [Fri, 13 Nov 2015 23:44:57 +0000 (20:44 -0300)]
collectpads: handle buffer with dts-only when mapping to running time

Otherwise the buffer was left with the original values and later would
be compared with other buffers that were converted to runninn time,
leading to bad interleaving of multiple streams.

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

8 years agobaseparse: do not overwrite header buffer timestamps
Thiago Santos [Fri, 13 Nov 2015 19:31:06 +0000 (16:31 -0300)]
baseparse: do not overwrite header buffer timestamps

baseparse tries to preserve timestamps from upstream if
it is running on a time segment and write that to
output buffers. It assumes the first DTS is going to be
segment.start and sets that to the first buffers. In case
the buffer is a header buffer, it had no timestamps and
will have only the DTS set due to this mechanism.

This patch prevents this by skipping this behavior for
header buffers.

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

8 years agoidentity: add drop-buffer-flags property
Aleix Conchillo Flaqué [Thu, 18 Jun 2015 20:56:53 +0000 (13:56 -0700)]
identity: add drop-buffer-flags property

New property drop-buffer-flags that will discard buffers that have the
given flags set.

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

8 years agohelpers: fix install race
Ross Burton [Thu, 12 Nov 2015 19:46:44 +0000 (19:46 +0000)]
helpers: fix install race

The install hook needs to be a install-data-hook not an install-exec-hook as the
helpers are installed into helperdir which is considered data (only path
variables with "exec" in are considered executables).

The explicit dependency on install-helpersPROGRAMS was an attempt at solving
this, but this causes occasional races where install-helpersPROGRAMS can run
twice in parallel (once via install-all, once via the hook's dependency).

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

8 years agosystemclock: Add test for gst_clock_get_resolution
Heinrich Fink [Thu, 12 Nov 2015 15:14:18 +0000 (16:14 +0100)]
systemclock: Add test for gst_clock_get_resolution

In a series of time measurements, the diff between now and previous
timestamps is either 0 or at least as long as get_resolution returned.

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

8 years agosystemclock: Use mach_time on Apple platforms
Heinrich Fink [Thu, 12 Nov 2015 10:26:56 +0000 (11:26 +0100)]
systemclock: Use mach_time on Apple platforms

On iOS/OSX g_get_current_time was used by default. However, mach_time is
the preferred high-resolution monotonic clock to be used on Apple
platforms.

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

8 years agotracers: log: add missing hooks
Thiago Santos [Wed, 11 Nov 2015 14:11:23 +0000 (11:11 -0300)]
tracers: log: add missing hooks

Log all possible hooks

8 years agotracer: add element-change-state-pre/post hook
Thiago Santos [Thu, 29 Oct 2015 11:40:32 +0000 (08:40 -0300)]
tracer: add element-change-state-pre/post hook

Helps catching when a state change is starting and ending.

It is also possible to track the end of state changes by checking the
async-done or state-change messages.
This is particularly important for elements that do async state changes.

8 years agopad: test for checking the order of the probe calls
Miguel París Díaz [Wed, 11 Nov 2015 13:32:44 +0000 (14:32 +0100)]
pad: test for checking the order of the probe calls

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

8 years agocontext: fix some copy and paste leftover in docs
Thiago Santos [Tue, 10 Nov 2015 17:41:35 +0000 (14:41 -0300)]
context: fix some copy and paste leftover in docs

8 years agocontext: add some more documentation
Thiago Santos [Tue, 10 Nov 2015 17:37:27 +0000 (14:37 -0300)]
context: add some more documentation

Add a short paragraph on what means for a context to be persistent

8 years agoutils: use 'static inline' instead of 'inline static' for gtk-doc
Tim-Philipp Müller [Mon, 9 Nov 2015 18:02:09 +0000 (18:02 +0000)]
utils: use 'static inline' instead of 'inline static' for gtk-doc

gtk-doc doesn't seem to recognise the former variant.

8 years agodocs: remove dummy function declarations with G_INLINE_FUNCTION for gtk-doc
Tim-Philipp Müller [Mon, 9 Nov 2015 17:59:16 +0000 (17:59 +0000)]
docs: remove dummy function declarations with G_INLINE_FUNCTION for gtk-doc

gtk-doc can handle static inline functions just fine these days,
there's no need for this stuff any more.

8 years agoqueue2: Add the avg-in-rate property.
Duncan Palmer [Mon, 23 Feb 2015 03:16:19 +0000 (13:16 +1000)]
queue2: Add the avg-in-rate property.

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

8 years agoqueue2: add overrun signal
Philippe Normand [Wed, 4 Nov 2015 11:02:51 +0000 (12:02 +0100)]
queue2: add overrun signal

Notifies that the queue2 is full, same as queue does

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

8 years agopad: tests for accept-caps handling with proxy pads
Thiago Santos [Wed, 30 Sep 2015 00:14:19 +0000 (21:14 -0300)]
pad: tests for accept-caps handling with proxy pads

Adds 3 new tests for testing accept-caps behavior with
proxy-caps pads.

1) A scenario where there is no proxy. The caps should be compared to the
template caps of the pad

2) A scenario where there is a compatible pad. The caps should be compared
to the proxied pad caps (and also with the template)

3) A scenario where there is an incompatible proxy pad. No caps should be
possible at all.

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

8 years agopad: check template caps for proxy pads in accept-caps
Thiago Santos [Thu, 5 Nov 2015 19:15:22 +0000 (16:15 -0300)]
pad: check template caps for proxy pads in accept-caps

Validate that the proxy pad indeed accepts the caps by also
comparing with the pad template caps, otherwise when the pad
had no internally linked pads it would always return true.

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

8 years agoFix build with -Werror=maybe-uninitialized
Thibault Saunier [Fri, 6 Nov 2015 11:58:42 +0000 (12:58 +0100)]
Fix build with -Werror=maybe-uninitialized

8 years agopreset: Add a GST_PRESET_PATH env variable for presets to be usable uninstalled
Thibault Saunier [Fri, 6 Nov 2015 11:05:18 +0000 (12:05 +0100)]
preset: Add a GST_PRESET_PATH env variable for presets to be usable uninstalled

And start setting the various uninstalled presets paths.

8 years agofilesink: continue element cleanup even if fclose fails
Anton Bondarenko [Thu, 5 Nov 2015 07:56:43 +0000 (08:56 +0100)]
filesink: continue element cleanup even if fclose fails

Sometimes filesink cleanup during stop may fail due to fclose error.
In this case object left partial cleanup with no file opened
but still holding old file descriptor.

It's not possible to change location property in a such state,
so next start will cause old file overwrite if 'append' does not set.

According to man page and POSIX standard about fclose behavior(extract):
------------------------------------------------------------------------
The fclose() function shall cause the stream pointed to by stream
to be flushed and the associated file to be closed.
...
Whether or not the call succeeds, the stream shall be disassociated
from the file and any buffer set by the setbuf() or setvbuf()
function shall be disassociated from the stream.
...
The fclose() function shall perform the equivalent of a close()
on the file descriptor that is associated with the stream
pointed to by stream.

After the call to fclose(), any use of stream results
in undefined behavior.
------------------------------------------------------------------------

So file is in 'closed' state no matter if fclose succeed or not.
And cleanup could be continued.

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

8 years agopad: Mark sticky events as sent on not-linked
Jan Schmidt [Sat, 31 Oct 2015 13:04:27 +0000 (00:04 +1100)]
pad: Mark sticky events as sent on not-linked

Instead of re-sending sticky events over and over to a not-linked
pad, mark them as sent the first time. If the not-linked came from
downstream, it already received the events. If the pad is actually
not-linked, the sticky events will be rescheduled when the
pad is linked anyway.

8 years agoghostpad: Allow deactivation with no peer.
Jan Schmidt [Thu, 29 Oct 2015 07:53:29 +0000 (18:53 +1100)]
ghostpad: Allow deactivation with no peer.

Allow deactivation in pull-mode, since that implies we
had a peer, activated in pull mode, then the peer disa-peer-ed ;)

8 years agoelement: emit tracer's element-new hook from 'constructed'
Thiago Santos [Wed, 28 Oct 2015 20:31:07 +0000 (17:31 -0300)]
element: emit tracer's element-new hook from 'constructed'

It allows to properly emitting it for all newly created elements

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

8 years agostats: log the element-new hook properly
Thiago Santos [Wed, 28 Oct 2015 09:03:39 +0000 (06:03 -0300)]
stats: log the element-new hook properly

To be able to get the time the elements were created instead of
just logging them without a time

8 years agopad: Unblock blocking pad probes when receiving FLUSH_START in send_event() too
Sebastian Dröge [Wed, 28 Oct 2015 16:04:46 +0000 (18:04 +0200)]
pad: Unblock blocking pad probes when receiving FLUSH_START in send_event() too

Without this, flushing might not unblock the streaming thread and cause deadlocks.

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

8 years agopad: Document the order in which pad probes are called
Sebastian Dröge [Wed, 28 Oct 2015 11:04:25 +0000 (13:04 +0200)]
pad: Document the order in which pad probes are called

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

8 years agopad: Append hooks instead of prepending to call them in the order they were added
Sebastian Dröge [Tue, 27 Oct 2015 16:05:05 +0000 (18:05 +0200)]
pad: Append hooks instead of prepending to call them in the order they were added

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

8 years agonetaddressmeta: gst_buffer_get_net_address_meta() as function
Stian Selnes [Mon, 26 Oct 2015 11:50:12 +0000 (12:50 +0100)]
netaddressmeta: gst_buffer_get_net_address_meta() as function

Implement gst_buffer_get_net_address_meta() as a function instead
of a macro in order to get gobject-introspection to work.

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

8 years agobuffer: flesh out docs for gst_buffer_make_writable() a little
Nirbheek Chauhan [Mon, 26 Oct 2015 12:37:11 +0000 (18:07 +0530)]
buffer: flesh out docs for gst_buffer_make_writable() a little

There is a similar explanation in gst_caps_make_writable, but the existing
documentation can be misleading since it does not define what 'is already
writable' means.

Also note when this function is meant to be used.

8 years agocaps: clarify docs for a few functions that they don't update things in-place
Nirbheek Chauhan [Mon, 26 Oct 2015 12:05:34 +0000 (17:35 +0530)]
caps: clarify docs for a few functions that they don't update things in-place

It is not necessarily clear from the existing introspection tags and
documentation alone.

8 years agoqueue/queue2: Use GST_BUFFER_DTS_OR_PTS
Edward Hervey [Tue, 27 Oct 2015 07:48:07 +0000 (08:48 +0100)]
queue/queue2: Use GST_BUFFER_DTS_OR_PTS

The input of queue/queue2 might have DTS set, in which cas we want
to take that into account (instead of the PTS) to calculate position
and queue levels.

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

8 years agomultiqueue: Use buffer DTS if present, else PTS
Edward Hervey [Tue, 13 Oct 2015 15:20:26 +0000 (17:20 +0200)]
multiqueue: Use buffer DTS if present, else PTS

In order to accurately determine the amount (in time) of data
travelling in queues, we should use an increasing value.

If buffers are encoded and potentially reordered, we should be
using their DTS (increasing) and not PTS (reordered)

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

8 years agocollectpads: Use GST_BUFFER_DTS_OR_PTS
Edward Hervey [Tue, 27 Oct 2015 07:33:41 +0000 (08:33 +0100)]
collectpads: Use GST_BUFFER_DTS_OR_PTS

Simplifies code a bit

8 years agobuffer: Add a GST_BUFFER_DTS_OR_PTS macro
Edward Hervey [Mon, 26 Oct 2015 06:59:54 +0000 (07:59 +0100)]
buffer: Add a GST_BUFFER_DTS_OR_PTS macro

API: GST_BUFFER_DTS_OR_PTS

Many scenarios/elements require dealing with streams of buffers that
might have DTS set (i.e. encoded data, potentially reordered)

To simplify getting the increasing "timestamp" of those buffers, create
a macro that will return the DTS if valid, and if not the PTS

8 years agodoc: add GST_{PTR,SEGMENT}_FORMAT
Guillaume Desmottes [Tue, 6 Oct 2015 10:21:04 +0000 (12:21 +0200)]
doc: add GST_{PTR,SEGMENT}_FORMAT

Very useful formats in debug output so best to have them in the
generated doc.

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

8 years agosegment: Return -1 if gst_segment_to_stream_time_full() considers the position not...
Sebastian Dröge [Mon, 26 Oct 2015 08:53:35 +0000 (10:53 +0200)]
segment: Return -1 if gst_segment_to_stream_time_full() considers the position not inside the segment

Fixes GstPipeline unit test.

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

8 years agouri: fix behaviour for merging uris ending in .. without following /
Florin Apostol [Sat, 24 Oct 2015 15:52:44 +0000 (16:52 +0100)]
uri: fix behaviour for merging uris ending in .. without following /

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

8 years agouri: tests: added unit test for streams ending in .. without following /
Florin Apostol [Sat, 24 Oct 2015 15:43:59 +0000 (16:43 +0100)]
uri: tests: added unit test for streams ending in .. without following /

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

8 years agodebug: Dump pad properties values
Thibault Saunier [Thu, 27 Aug 2015 10:43:28 +0000 (12:43 +0200)]
debug: Dump pad properties values

Currently we only show element properties values, we should also show
pad properties values

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

8 years agosegment: Remove leftover debug g_print()
Sebastian Dröge [Fri, 23 Oct 2015 17:04:42 +0000 (20:04 +0300)]
segment: Remove leftover debug g_print()

8 years agosegment: Add _full variants of all stream/running_time from/to segment position functions
Vivia Nikolaidou [Thu, 15 Oct 2015 11:49:37 +0000 (14:49 +0300)]
segment: Add _full variants of all stream/running_time from/to segment position functions

See formula clarifications in design docs for calculation details.

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

8 years agogst-uninstalled: Added env var for uninstalled PTP helper
Vivia Nikolaidou [Fri, 25 Sep 2015 22:29:07 +0000 (01:29 +0300)]
gst-uninstalled: Added env var for uninstalled PTP helper

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

8 years agobasesink: rename argument of PREROLL_{COND,LOCK} macros
Guillaume Desmottes [Thu, 22 Oct 2015 10:00:42 +0000 (12:00 +0200)]
basesink: rename argument of PREROLL_{COND,LOCK} macros

They take a GstBaseSink instance as argument at not a GstPad. Rename the
argument to 'obj' which is not miss leading and in line with
GST_BASE_SINK_PAD(obj).

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

8 years agogstcontrolsource: Add missing (out) annotation
Mathieu Duponchelle [Thu, 22 Oct 2015 08:05:14 +0000 (10:05 +0200)]
gstcontrolsource: Add missing (out) annotation

8 years agoAutomatic update of common submodule
Tim-Philipp Müller [Wed, 21 Oct 2015 13:34:47 +0000 (14:34 +0100)]
Automatic update of common submodule

From b99800a to b319909

8 years agopad: Fix docs/annotation of gst_pad_probe_info_get_buffer_list()
Sebastian Dröge [Wed, 21 Oct 2015 11:49:49 +0000 (14:49 +0300)]
pad: Fix docs/annotation of gst_pad_probe_info_get_buffer_list()

It's not get_bufferlist(). Because of that it was ignored by the docs and
G-I, leading to crashes because of broken ownership transfer.

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

8 years agoUse new GST_ENABLE_EXTRA_CHECKS #define
Sebastian Dröge [Tue, 20 Oct 2015 14:29:42 +0000 (17:29 +0300)]
Use new GST_ENABLE_EXTRA_CHECKS #define

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

8 years agoAutomatic update of common submodule
Sebastian Dröge [Wed, 21 Oct 2015 11:25:40 +0000 (14:25 +0300)]
Automatic update of common submodule

From 9aed1d7 to b99800a

8 years agostats: always free log
Luis de Bethencourt [Tue, 20 Oct 2015 12:46:24 +0000 (13:46 +0100)]
stats: always free log

We always want to free the open file log if fopen() succeeded. Independently
of if fgets() succeeds or fails.

CID 1326055

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

8 years agosegment: Correct stream_time calc for negative applied rate
Vivia Nikolaidou [Mon, 19 Oct 2015 13:50:51 +0000 (16:50 +0300)]
segment: Correct stream_time calc for negative applied rate

Updated gst_segment_position_from_stream_time and gst_segment_to_stream_time to reflect correct calculations for the case when the applied rate is negative.

Pasting from design docs:

===============================
Stream time is calculated using the buffer times and the preceding SEGMENT
event as follows:

    stream_time = (B.timestamp - S.start) * ABS (S.applied_rate) + S.time

For negative rates, B.timestamp will go backwards from S.stop to S.start,
making the stream time go backwards.
===============================

Therefore, the calculation for applied_rate < 0 should be:

    stream_time = (S.stop - B.timestamp) * ABS (S.applied_rate) + S.time

and the reverse:

    B.timestamp = S.stop - (stream_time - S.time) / ABS (S.applied_rate)

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

8 years agotracer: rename the envvar to GST_TRACER_PLUGINS
Stefan Sauer [Mon, 19 Oct 2015 19:39:19 +0000 (21:39 +0200)]
tracer: rename the envvar to GST_TRACER_PLUGINS

The subsystem reused the GST_TRACE var that is allready in use by the alloc tracer.
Fixes #756760

8 years agomultiqueue: Improve incoming SEGMENT handling
Edward Hervey [Thu, 15 Oct 2015 14:32:42 +0000 (16:32 +0200)]
multiqueue: Improve incoming SEGMENT handling

Previously this code was just blindly setting the cached flow return
of downstream to GST_FLOW_OK when we get a SEGMENT.

The problem is that this can not be done blindly. If downstream was
not linked, the corresponding sinqlequeue source pad thread might be
waiting for the next ID to be woken up upon.

By blindly setting the cached return value to GST_FLOW_OK, and if that
stream was the only one that was NOT_LINKED, then the next time we
check (from any other thread) to see if we need to wake up a source pad
thread ... we won't even try, because none of the cached flow return
are equal to GST_FLOW_NOT_LINKED.

This would result in that thread never being woken up

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

8 years agogstutils: Fix build with clang -Werror=cast-align
Ting-Wei Lan [Sat, 26 Sep 2015 10:16:07 +0000 (18:16 +0800)]
gstutils: Fix build with clang -Werror=cast-align

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

8 years agobin: Make sure to free all cached messages when going to NULL
Sebastian Dröge [Sat, 17 Oct 2015 19:13:08 +0000 (22:13 +0300)]
bin: Make sure to free all cached messages when going to NULL

An ASYNC READY->PAUSED might have failed without the bin code noticing during
the state change, in which case we will never get PAUSED->READY and would leak
messages.

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

8 years agodocs: mention xdot utility to view .dot files directly
Tim-Philipp Müller [Fri, 16 Oct 2015 14:59:49 +0000 (15:59 +0100)]
docs: mention xdot utility to view .dot files directly

8 years agoalloctrace: show details of events and messages leaked
Tim-Philipp Müller [Fri, 16 Oct 2015 11:00:50 +0000 (12:00 +0100)]
alloctrace: show details of events and messages leaked

So it's clearer what leaked.

8 years agodocs: manual: improve advanced metadata example a bit
Tim-Philipp Müller [Fri, 16 Oct 2015 10:54:18 +0000 (11:54 +0100)]
docs: manual: improve advanced metadata example a bit

Accept both filename and a URI as argument, and print
the error from the error message if there's an error.

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

8 years agomemory: fix typo in documentation
Thiago Santos [Thu, 15 Oct 2015 22:05:21 +0000 (19:05 -0300)]
memory: fix typo in documentation

It should be 1.2 unless this is a flag from the future

8 years agomultiqueue: Accept STREAM_START after EOS
Edward Hervey [Tue, 15 Sep 2015 16:08:18 +0000 (18:08 +0200)]
multiqueue: Accept STREAM_START after EOS

In the same way core now allows STREAM_START to remove the flushing
state from pads, we need to do the same thing in multiqueue

8 years agosegment: Convert function to macro in unit test to get proper line numbers on failures
Sebastian Dröge [Wed, 14 Oct 2015 08:03:22 +0000 (11:03 +0300)]
segment: Convert function to macro in unit test to get proper line numbers on failures

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

8 years agobaseparse: Update internal position even if not linked
Edward Hervey [Mon, 12 Oct 2015 15:29:26 +0000 (17:29 +0200)]
baseparse: Update internal position even if not linked

Our current position has nothing to do with being linked or not.

Avoids having stray segment updates fired every 2s

8 years agopad: fix memory leak when sending events to an EOS pad
Florin Apostol [Wed, 7 Oct 2015 21:55:44 +0000 (22:55 +0100)]
pad: fix memory leak when sending events to an EOS pad

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

8 years agotracers: Only link against libgstprintf.la if the debugging system is enabled
Sebastian Dröge [Wed, 7 Oct 2015 11:01:16 +0000 (12:01 +0100)]
tracers: Only link against libgstprintf.la if the debugging system is enabled

It does not exist otherwise and linking will fail.

8 years agogst-ptp-helper: #include <sys/socket.h> to fix net/if.h include on OSX 10.6
Sebastian Dröge [Wed, 7 Oct 2015 10:25:52 +0000 (11:25 +0100)]
gst-ptp-helper: #include <sys/socket.h> to fix net/if.h include on OSX 10.6

In file included from gst-ptp-helper.c:40:0:
   /usr/include/net/if.h:265:19: error: field 'ifru_addr' has incomplete type
      struct sockaddr ifru_addr;

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

8 years agoRevert "tracers: Only build getrusage() tracer if RUSAGE_THREAD is available"
Stefan Sauer [Wed, 7 Oct 2015 10:22:34 +0000 (12:22 +0200)]
Revert "tracers: Only build getrusage() tracer if RUSAGE_THREAD is available"

This reverts commit 8ddbf76626a48420306869db1d171f854cc25310.

8 years agotracers/rusage: ifdef the RUSAGE_THREAD usage
Stefan Sauer [Wed, 7 Oct 2015 10:21:56 +0000 (12:21 +0200)]
tracers/rusage: ifdef the RUSAGE_THREAD usage

Some versions of andoid don't seem to have it.

8 years agotracers: Only build getrusage() tracer if RUSAGE_THREAD is available
Sebastian Dröge [Wed, 7 Oct 2015 10:11:30 +0000 (11:11 +0100)]
tracers: Only build getrusage() tracer if RUSAGE_THREAD is available

8 years agowin32: remove gst_tracer_quark_id_get_type
Stefan Sauer [Tue, 6 Oct 2015 19:46:55 +0000 (21:46 +0200)]
win32: remove gst_tracer_quark_id_get_type

Revert addition from 777bbeea605051ae3d2fa7e02ad8589001e78ce0.

8 years agotracer: move prototype to the right header
Stefan Sauer [Tue, 6 Oct 2015 16:52:38 +0000 (18:52 +0200)]
tracer: move prototype to the right header

Fixes the build when the tracing subsystem is disabled.

8 years agotracer: mark GstTracerQuarkId as non GEnum
Stefan Sauer [Tue, 6 Oct 2015 16:49:46 +0000 (18:49 +0200)]
tracer: mark GstTracerQuarkId as non GEnum

This reverts 72ca02b1de4066eeae35c891e275386770117778 and marks the enum
accordingly.

8 years agotracers: disable the log tracer if debug logging is disabled
Stefan Sauer [Tue, 6 Oct 2015 16:46:24 +0000 (18:46 +0200)]
tracers: disable the log tracer if debug logging is disabled

8 years agomakefile.am: Remove obsolete Android build cruft
Stefan Sauer [Tue, 6 Oct 2015 16:45:41 +0000 (18:45 +0200)]
makefile.am: Remove obsolete Android build cruft

This is not needed any longer.

8 years agotracer: fix the build with debug (tracer) disabled
Stefan Sauer [Tue, 6 Oct 2015 12:01:03 +0000 (14:01 +0200)]
tracer: fix the build with debug (tracer) disabled

Sync the macro definitions. The dummy defines has argument mismatches.