platform/upstream/gstreamer.git
6 years agobaseparse: avg_bitrate calculation critical warning fix
Philippe Normand [Thu, 30 Aug 2018 16:44:07 +0000 (17:44 +0100)]
baseparse: avg_bitrate calculation critical warning fix

The avg_bitrate is an unsigned int, so the gst_util_uin64_scale() function can't
be used for it, as it expects signed integers for the fraction parts arguments.

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

6 years agoinput-selector: Bring latency handling in sync with GstPad code
Sebastian Dröge [Fri, 31 Aug 2018 09:15:16 +0000 (12:15 +0300)]
input-selector: Bring latency handling in sync with GstPad code

6 years agoRevert "pad: Don't drop LATENCY queries with default implementation"
Sebastian Dröge [Fri, 31 Aug 2018 09:12:13 +0000 (12:12 +0300)]
Revert "pad: Don't drop LATENCY queries with default implementation"

This reverts commit 794944f779f954375fc74a3fffcc2067bba6a3e5.

Accumulating non-live latency values generally makes no sense and often
gives invalid results with min>max

6 years agoRevert "pad: Accumulate live/non-live latency values separately"
Sebastian Dröge [Fri, 31 Aug 2018 09:12:09 +0000 (12:12 +0300)]
Revert "pad: Accumulate live/non-live latency values separately"

This reverts commit f5783e1cacb09867d81ba089b229faa7dd0edd0c.

6 years agomeson: Maintain macOS ABI through dylib versioning
Nirbheek Chauhan [Tue, 28 Aug 2018 20:33:28 +0000 (02:03 +0530)]
meson: Maintain macOS ABI through dylib versioning

Requires Meson 0.48, but the feature will be ignored on older versions
so it's safe to add it without bumping the requirement.

Documentation:
https://github.com/mesonbuild/meson/blob/master/docs/markdown/Reference-manual.md#shared_library

6 years agoinput-selector: Apply GstPad default latency handler fixes here too
Sebastian Dröge [Fri, 31 Aug 2018 08:47:03 +0000 (11:47 +0300)]
input-selector: Apply GstPad default latency handler fixes here too

6 years agopad: Accumulate live/non-live latency values separately
Sebastian Dröge [Fri, 31 Aug 2018 08:41:47 +0000 (11:41 +0300)]
pad: Accumulate live/non-live latency values separately

And only ever use the non-live values if all pads are non-live,
otherwise only use the results of all live pads.

It's unclear what one would use the values for in the non-live case, but
by this we at least pass them through correctly then.

This is a follow-up for 794944f779f954375fc74a3fffcc2067bba6a3e5, which
causes wrong latency calculations if the first pad is non-live but a
later pad is actually live. In that case the live values would be
accumulated together with the values of the non-live first pad,
generally causing wrong min/max latencies to be calculated.

6 years agoconcat: Improve debug output a bit by printing pad names
Sebastian Dröge [Wed, 29 Aug 2018 16:26:04 +0000 (19:26 +0300)]
concat: Improve debug output a bit by printing pad names

6 years agofilesink: Flush buffers before directly writing out buffers with the SYNC_AFTER flag
Sebastian Dröge [Tue, 28 Aug 2018 11:22:16 +0000 (14:22 +0300)]
filesink: Flush buffers before directly writing out buffers with the SYNC_AFTER flag

Otherwise we write out the SYNC_AFTER buffer immediately, and the
previously queued up buffers afterwards which then breaks the order of
data.

Also add various debug output.

6 years agogstsegment: Add check for gst_segment_offset_running_time()
Jan Schmidt [Mon, 27 Aug 2018 12:32:01 +0000 (22:32 +1000)]
gstsegment: Add check for gst_segment_offset_running_time()

Add a check for gst_segment_offset_running_time() that values
are taken directly from the segment base if possible.

6 years agogstsegment: Handle positions before the segment properly
Jan Schmidt [Thu, 23 Aug 2018 12:34:47 +0000 (22:34 +1000)]
gstsegment: Handle positions before the segment properly

Fixes for gst_segment_position_from_running_time_full() when
converting running_times that precede the segment start (or
stop in a negative rate segment)

The return value was incorrectly negated in those cases.

Add some more unit test checks for those cases, and especially
for segments with offsets.

6 years agotests: meta: fix msvc compiler warnings
Tim-Philipp Müller [Sat, 25 Aug 2018 22:45:45 +0000 (00:45 +0200)]
tests: meta: fix msvc compiler warnings

gstmeta.c(167): warning C4090: 'function': different 'const' qualifiers
gstmeta.c(172): warning C4090: 'function': different 'const' qualifiers
gstmeta.c(211): warning C4090: 'function': different 'const' qualifiers
gstmeta.c(216): warning C4090: 'function': different 'const' qualifiers

6 years agocheck: testclock: fix deprecation guards
Tim-Philipp Müller [Sat, 25 Aug 2018 22:34:44 +0000 (00:34 +0200)]
check: testclock: fix deprecation guards

Make our own deprecation marker for libgstcheck,
since the function declaration must contain the
right API export decorator (GST_CHECK_API) and
not the one for GStreamer core.

6 years agobitwriter: fix compiler warning
Tim-Philipp Müller [Sat, 25 Aug 2018 22:16:51 +0000 (00:16 +0200)]
bitwriter: fix compiler warning

Don't return a value from a function that doesn't
return a value using the returned value from a
function that also doesn't return a value.

gstbitwriter.h(265): warning C4098: 'gst_bit_writer_align_bytes_unchecked': 'void' function returning a value

6 years agofilesink: Use SYNC_AFTER flag in seeking test
Sebastian Dröge [Fri, 17 Aug 2018 14:24:59 +0000 (17:24 +0300)]
filesink: Use SYNC_AFTER flag in seeking test

Otherwise it's not guaranteed that buffers are actually on disk after
pushing them, and reading the file via g_file_get_contents() might not
include them yet.

6 years agofilesink: Consider the current buffer size when checking the current position
Sebastian Dröge [Fri, 17 Aug 2018 14:24:19 +0000 (17:24 +0300)]
filesink: Consider the current buffer size when checking the current position

6 years agofilesink: Reset the current buffer size to NULL and clear the buffer on close and...
Sebastian Dröge [Fri, 17 Aug 2018 14:23:52 +0000 (17:23 +0300)]
filesink: Reset the current buffer size to NULL and clear the buffer on close and FLUSH_STOP

6 years agomeson: host_system is 'ios' when building for iOS
Nirbheek Chauhan [Thu, 16 Aug 2018 21:24:00 +0000 (02:54 +0530)]
meson: host_system is 'ios' when building for iOS

The cross file sets this value, and we use 'ios' in Cerbero.

6 years agofilesink: Implement buffering internally
Sebastian Dröge [Tue, 14 Aug 2018 08:28:00 +0000 (11:28 +0300)]
filesink: Implement buffering internally

We use writev() so every call ends up going to the kernel but for small
buffers we generally would prefer to do as few write calls as possible.

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

6 years agofilesink: Remove buffer, deprecate line-buffer mode and don't use fflush()
Sebastian Dröge [Tue, 14 Aug 2018 07:58:26 +0000 (10:58 +0300)]
filesink: Remove buffer, deprecate line-buffer mode and don't use fflush()

fflush() has no effect because we use writev() directly, so fsync()
should be used instead which is actually flushing the kernel-side
buffers.

As a next step, a non-line-buffered buffering mode is to be added.

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

6 years agoaggregator: Fixup for previous commit to prevent infinite loop if no events are pending
Sebastian Dröge [Tue, 14 Aug 2018 09:30:19 +0000 (12:30 +0300)]
aggregator: Fixup for previous commit to prevent infinite loop if no events are pending

6 years agoaggregator: Return an error directly if negotiation of a sink pad failed
Sebastian Dröge [Mon, 13 Aug 2018 11:50:57 +0000 (14:50 +0300)]
aggregator: Return an error directly if negotiation of a sink pad failed

And don't give buffers to subclasses in that case.

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

6 years agowin32: remove .def file with exports
Tim-Philipp Müller [Sun, 12 Aug 2018 21:57:41 +0000 (22:57 +0100)]
win32: remove .def file with exports

They're no longer needed, symbol exporting is now explicit
via GST_*_API export decorators in all cases, that is
autotools and meson, incl. MSVC.

6 years agoautotools: stop controlling symbol visibility with -export-symbols-regex
Tim-Philipp Müller [Sun, 12 Aug 2018 18:04:51 +0000 (19:04 +0100)]
autotools: stop controlling symbol visibility with -export-symbols-regex

Instead, use -fvisibility=hidden and explicit exports via GST_EXPORT.
This should result in consistent behaviour for the autotools and
Meson builds where this is done already, and will allow us to drop
the win32 .def files.

6 years agobitwriter: fix g-i scanner warning
Tim-Philipp Müller [Sun, 12 Aug 2018 19:07:02 +0000 (20:07 +0100)]
bitwriter: fix g-i scanner warning

gstbitwriter.h:45: Warning: GstBase: "@bit_capacity" parameter unexpected at this location:
 * @bit_capacity: Capacity of the allocated @data

6 years agomeson: add options to disable gobject cast checks and glib asserts
Tim-Philipp Müller [Sat, 11 Aug 2018 17:17:29 +0000 (18:17 +0100)]
meson: add options to disable gobject cast checks and glib asserts

And match what we do for autotools here currently.

6 years agomeson: define G_DISABLE_DEPRECATED for development versions
Tim-Philipp Müller [Fri, 10 Aug 2018 08:22:51 +0000 (09:22 +0100)]
meson: define G_DISABLE_DEPRECATED for development versions

Like in autotools.

6 years agomeson: add option to disable build of GStreamer unit test library
Tim-Philipp Müller [Fri, 10 Aug 2018 00:23:35 +0000 (01:23 +0100)]
meson: add option to disable build of GStreamer unit test library

6 years agomeson: add memory-alignment option
Tim-Philipp Müller [Thu, 9 Aug 2018 23:33:58 +0000 (00:33 +0100)]
meson: add memory-alignment option

6 years agomeson: add option to disable command-line option parsing
Tim-Philipp Müller [Thu, 9 Aug 2018 23:18:55 +0000 (00:18 +0100)]
meson: add option to disable command-line option parsing

6 years agomeson: add option to disable parse-launch pipeline string parser
Tim-Philipp Müller [Thu, 9 Aug 2018 23:08:43 +0000 (00:08 +0100)]
meson: add option to disable parse-launch pipeline string parser

6 years agomeson: add options to disable tests, examples, benchmarks and tools
Tim-Philipp Müller [Thu, 9 Aug 2018 22:32:49 +0000 (23:32 +0100)]
meson: add options to disable tests, examples, benchmarks and tools

And remove duplicate option 'poisoning' and unused 'build_tools' one.

6 years agoconfigure: Enable poisoning by default for non-release builds
Sebastian Dröge [Fri, 3 Aug 2018 10:18:12 +0000 (13:18 +0300)]
configure: Enable poisoning by default for non-release builds

6 years agogst: Add poisoning to more types
Sebastian Dröge [Fri, 3 Aug 2018 10:16:21 +0000 (13:16 +0300)]
gst: Add poisoning to more types

6 years agomeson: fix setting of extra checks option
Tim-Philipp Müller [Fri, 3 Aug 2018 09:36:21 +0000 (10:36 +0100)]
meson: fix setting of extra checks option

It's checked for with #ifdef so setting it to 0 or 1
will always enable it.

6 years agomeson: add option to enable poisoning of deallocated objects
Tim-Philipp Müller [Fri, 3 Aug 2018 09:35:07 +0000 (10:35 +0100)]
meson: add option to enable poisoning of deallocated objects

6 years agotypefindhelper: Mark gst_type_find_helper_get_range_full() as Since 1.14.3
Sebastian Dröge [Thu, 2 Aug 2018 07:55:40 +0000 (10:55 +0300)]
typefindhelper: Mark gst_type_find_helper_get_range_full() as Since 1.14.3

6 years agoinputselector: Forward LATENCY query to all sinkpads
Sebastian Dröge [Tue, 31 Jul 2018 16:25:03 +0000 (19:25 +0300)]
inputselector: Forward LATENCY query to all sinkpads

Otherwise downstream will consider the pipeline not live if the active
pad is live, even though some inactive pads might be live and might
require a non-zero latency configuration.

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

6 years agopad: Update pad offsets on the current event if the offset changed in pad probes
Sebastian Dröge [Tue, 31 Jul 2018 13:46:25 +0000 (16:46 +0300)]
pad: Update pad offsets on the current event if the offset changed in pad probes

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

6 years agopad: Ensure that the pad is blocked for IDLE probes if they are called from the strea...
Sebastian Dröge [Mon, 30 Jul 2018 15:51:35 +0000 (18:51 +0300)]
pad: Ensure that the pad is blocked for IDLE probes if they are called from the streaming thread too

IDLE probes that are directly called when being added will increase /
decrease the "number of IDLE probes running" counter around the call,
but when running from the streaming thread this won't happen.

This has the effect that when running from a streaming thread it is
possible to push serialized events or data out of the pad without
problems, but otherwise it would deadlock because serialized data would
wait for the IDLE probe to finish first (it is blocking after all!).

With this change it will now always consistently deadlock instead of
just every once in a while, which should make it obvious why this
happens and prevent racy deadlocks in application code.

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

6 years agotypefind: Add new gst_type_find_helper_get_range_full() that returns flow return
Sebastian Dröge [Mon, 30 Jul 2018 15:10:31 +0000 (18:10 +0300)]
typefind: Add new gst_type_find_helper_get_range_full() that returns flow return

And make use of it in the typefind element. It's useful to distinguish
between the different errors why typefinding can fail, and especially to
not consider GST_FLOW_FLUSHING as an actual error.

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

6 years agoaggregator: annotate GstAggregatorClass::update_src_caps
Mathieu Duponchelle [Fri, 27 Jul 2018 21:22:42 +0000 (23:22 +0200)]
aggregator: annotate GstAggregatorClass::update_src_caps

6 years agomeson: Add feature options for optional deps
Nirbheek Chauhan [Wed, 25 Jul 2018 02:04:19 +0000 (07:34 +0530)]
meson: Add feature options for optional deps

Everything should be behind an option now.

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

6 years agoaggregator: Don't leak peer pad of inactive pads when (not) forwarding QoS events...
Sebastian Dröge [Wed, 25 Jul 2018 23:31:05 +0000 (02:31 +0300)]
aggregator: Don't leak peer pad of inactive pads when (not) forwarding QoS events to them

6 years agomeson: Install bash completion helper in prefix
Nicolas Dufresne [Wed, 25 Jul 2018 22:51:58 +0000 (18:51 -0400)]
meson: Install bash completion helper in prefix

A regression was causing the helpers to be installed in /share which
would lead to permission denied error or PolicyKit to promtp for
permission. See:

  054fa3aa2 meson: Use new define_variable: feature instead of run_command()

6 years agomeson: host_machine.system() is darwin even on iOS
Nirbheek Chauhan [Wed, 25 Jul 2018 10:30:28 +0000 (16:00 +0530)]
meson: host_machine.system() is darwin even on iOS

Also use host_system everywhere.

6 years agomeson: Don't add static printf library to executables
Nirbheek Chauhan [Wed, 25 Jul 2018 08:55:07 +0000 (14:25 +0530)]
meson: Don't add static printf library to executables

They should only need to link to libgstreamer.

6 years agomeson: Use new define_variable: feature instead of run_command()
Nirbheek Chauhan [Wed, 25 Jul 2018 02:00:52 +0000 (07:30 +0530)]
meson: Use new define_variable: feature instead of run_command()

6 years agomeson: Small cleanup, unused variable
Nirbheek Chauhan [Wed, 25 Jul 2018 01:59:51 +0000 (07:29 +0530)]
meson: Small cleanup, unused variable

6 years agomeson: Use copy: true for configure_file()
Nirbheek Chauhan [Wed, 25 Jul 2018 01:34:11 +0000 (07:04 +0530)]
meson: Use copy: true for configure_file()

Fixes a warning.

6 years agotypefindhelper: Mark extension in gst_type_find_helper_get_range() as allow-none
Sebastian Dröge [Tue, 24 Jul 2018 22:12:49 +0000 (01:12 +0300)]
typefindhelper: Mark extension in gst_type_find_helper_get_range() as allow-none

It always allowed NULL and even said so in the documentation.

6 years agotypefind: Add _with_extension() variants for typefinding data or a buffer
Sebastian Dröge [Tue, 24 Jul 2018 14:28:45 +0000 (17:28 +0300)]
typefind: Add _with_extension() variants for typefinding data or a buffer

And make use of that in the typefind element to also be able to make use
of the extension in push mode. It previously only did that in pull mode
and this potentially speeds up typefinding and might also prevent false
positives.

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

6 years agogst: Simplify some boolean expressions
Sebastian Dröge [Tue, 24 Jul 2018 06:58:31 +0000 (09:58 +0300)]
gst: Simplify some boolean expressions

(!x || (x && y)) is the same as (!x || y)

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

6 years agoRevert "pad: Handle changing sticky events in pad probes"
Sebastian Dröge [Mon, 23 Jul 2018 20:17:54 +0000 (23:17 +0300)]
Revert "pad: Handle changing sticky events in pad probes"

This reverts commit 11e0f451eb498e92d05d8208f7217625dc62848b.

When pushing a sticky event out of a pad with a pad probe or pad offset,
those should not be applied to the event that is actually stored in the
event but only in the event sent downstream. The pad probe and pad
offsets are conceptually *after* the pad, added by external code and
should not affect any internal state of pads/elements.

Also storing the modified event has the side-effect that a re-sent event
would arrive with any previous modifications done by the same pad probe
again inside that pad probe, and it would have to check if its
modifications are already applied or not.

For sink pads and generally for events arriving in a pad, some further
changes are still needed and those are tracked in
  https://bugzilla.gnome.org/show_bug.cgi?id=765049

In addition, the commit also had a refcounting problem with events,
causing already destroyed events to be stored inside pads.

6 years agobus: add missing (out) annotation to get_poll_fd()
Mathieu Duponchelle [Fri, 20 Jul 2018 21:51:44 +0000 (23:51 +0200)]
bus: add missing (out) annotation to get_poll_fd()

6 years agobasetransform: Do not check if NULL is an emtpy caps
Thibault Saunier [Thu, 19 Jul 2018 01:13:57 +0000 (21:13 -0400)]
basetransform: Do not check if NULL is an emtpy caps

gst_base_transform_transform_caps can return NULL in various conditions
thus we should not treat its result as valid caps.

In all other places NULL is properly handled.

6 years agosink: Only add processing latency if upstream is live
Olivier Crête [Mon, 16 Jul 2018 15:51:05 +0000 (11:51 -0400)]
sink: Only add processing latency if upstream is live

Only add it if upstream is live, otherwise leave the latency at 0.

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

6 years agopipeline tests: Add test for processing latency
Olivier Crête [Mon, 16 Jul 2018 15:50:36 +0000 (11:50 -0400)]
pipeline tests: Add test for processing latency

6 years agogst-inspect: Sort properties names
Thibault Saunier [Fri, 13 Jul 2018 12:53:53 +0000 (08:53 -0400)]
gst-inspect: Sort properties names

Making it simpler to find properties you are looking for when reading.

6 years agobasesink: Minor GI warning fix.
Thibault Saunier [Fri, 13 Jul 2018 12:52:55 +0000 (08:52 -0400)]
basesink: Minor GI warning fix.

6 years agosample: Set buffer/caps/buffer-lists to NULL correctly when replacing them with NULL
Sebastian Dröge [Tue, 10 Jul 2018 06:48:47 +0000 (08:48 +0200)]
sample: Set buffer/caps/buffer-lists to NULL correctly when replacing them with NULL

6 years agobufferlist: Prevent gst_buffer_list_foreach() from modifying non-writeable lists
Sebastian Dröge [Fri, 29 Jun 2018 05:16:28 +0000 (07:16 +0200)]
bufferlist: Prevent gst_buffer_list_foreach() from modifying non-writeable lists

Previously gst_buffer_list_foreach() could modify (drop or replace)
buffers in non-writable lists, which could cause all kinds of problems
if other code also has a reference to the list and assumes that it stays
the same.

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

6 years agobuffer: Add test to ensure that memories in a non-writable buffer are not writable
Sebastian Dröge [Fri, 29 Jun 2018 05:16:28 +0000 (07:16 +0200)]
buffer: Add test to ensure that memories in a non-writable buffer are not writable

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

6 years agobufferlist: Add test to ensure that buffers in an non-writable list are not writable
Sebastian Dröge [Thu, 28 Jun 2018 12:13:39 +0000 (14:13 +0200)]
bufferlist: Add test to ensure that buffers in an non-writable list are not writable

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

6 years agominiobject: Add parent pointers to the miniobject to influence writability
Sebastian Dröge [Tue, 3 Jul 2018 17:07:31 +0000 (20:07 +0300)]
miniobject: Add parent pointers to the miniobject to influence writability

Every container of miniobjects now needs to store itself as parent in
the child object, and remove itself again at a later time.

A miniobject is only writable if there is at most one parent, and that
parent is writable itself, and if the reference count of the miniobject
is 1.

GstBuffer (for memories), GstBufferList (for buffers) and GstSample (for
caps, buffer, bufferlist) was updated accordingly.

Without this it was possible to have e.g. a bufferlist with refcount 2
in two places, modifying the same buffer with refcount 1 at the same
time.

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

6 years agocheck: Add a fail_unless_equals_clocktime macro for convenience
Thibault Saunier [Mon, 9 Jul 2018 00:52:08 +0000 (20:52 -0400)]
check: Add a fail_unless_equals_clocktime macro for convenience

6 years agobase: Add processing deadline API to win32 def
Nicolas Dufresne [Sat, 7 Jul 2018 13:15:58 +0000 (09:15 -0400)]
base: Add processing deadline API to win32 def

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

6 years agobasesink: Add processing deadline
Olivier Crête [Mon, 4 May 2015 21:30:17 +0000 (17:30 -0400)]
basesink: Add processing deadline

The processing deadline is the acceptable amount of time to process the media
in a live pipeline before it reaches the sink. This is on top of the algorithmic
latency that is normally reported by the latency query. This should make
pipelines such as "v4lsrc ! xvimagesink" not claim that all frames are late
in the QoS events. Ideally, this should replace max_lateness for most applications.

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

6 years agogstreamer: fix install dir for configure files
Bastian Köcher [Sun, 1 Apr 2018 14:06:26 +0000 (16:06 +0200)]
gstreamer: fix install dir for configure files

Nixos installs into a non-standard includedir.

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

6 years agostructure: Update doc error in ARRAY/LIST helpers
Nicolas Dufresne [Wed, 4 Jul 2018 18:00:35 +0000 (14:00 -0400)]
structure: Update doc error in ARRAY/LIST helpers

6 years agoprotection: Release decryptors list, even if it's empty
Philippe Normand [Fri, 22 Jun 2018 14:35:42 +0000 (15:35 +0100)]
protection: Release decryptors list, even if it's empty

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

6 years agoUpdate for g_type_class_add_private() deprecation in recent GLib
Tim-Philipp Müller [Sat, 23 Jun 2018 15:01:09 +0000 (17:01 +0200)]
Update for g_type_class_add_private() deprecation in recent GLib

https://gitlab.gnome.org/GNOME/glib/merge_requests/7

6 years agoconcat: Properly forward the SEGMENT seqnum
Edward Hervey [Mon, 18 Jun 2018 14:29:18 +0000 (16:29 +0200)]
concat: Properly forward the SEGMENT seqnum

6 years agoevent: Unset SNAP flags when creating a new seek event without KEY_UNIT flag
Sebastian Dröge [Mon, 11 Jun 2018 07:22:39 +0000 (10:22 +0300)]
event: Unset SNAP flags when creating a new seek event without KEY_UNIT flag

The SNAP flags only make sense in combination with the KEY_UNIT flag,
and without they expose all kinds of unexpected behaviour in various
elements that don't expect this from happening.

Also warn if this ever happens.

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

6 years agoevent: Require writable events for setting the running-time-offset and sequence number
Sebastian Dröge [Mon, 18 Jun 2018 06:17:36 +0000 (09:17 +0300)]
event: Require writable events for setting the running-time-offset and sequence number

Otherwise multiple code paths with the same event could change the
values on each other.

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

6 years agogst_structure_to_string: display actual value of pointers
Guillaume Desmottes [Thu, 15 Mar 2018 11:43:56 +0000 (12:43 +0100)]
gst_structure_to_string: display actual value of pointers

We used to always display "NULL" which was pretty confusing when
debugging.

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

6 years agostream: Add some missing API safe guards
Thibault Saunier [Wed, 13 Jun 2018 20:27:24 +0000 (16:27 -0400)]
stream: Add some missing API safe guards

6 years agopoll: minor docs clarification
Tim-Philipp Müller [Fri, 8 Jun 2018 16:58:43 +0000 (17:58 +0100)]
poll: minor docs clarification

'Not implemented' could be misinterpreted to mean that
the API doesn't even exist there.

6 years agowin32: update for new API
Tim-Philipp Müller [Fri, 8 Jun 2018 16:57:01 +0000 (17:57 +0100)]
win32: update for new API

6 years agopoll: add API to watch for POLLPRI
Guillaume Desmottes [Thu, 5 Apr 2018 10:40:09 +0000 (12:40 +0200)]
poll: add API to watch for POLLPRI

Windows doesn't seem to have an equivalent of POLLPRI so disabled those
functions on this platform.

This API can be used, for example, to wait for video4linux events which
are using POLLPRI.

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

6 years agopoll: stop treating on POLLPRI as 'read'
Guillaume Desmottes [Thu, 5 Apr 2018 10:19:39 +0000 (12:19 +0200)]
poll: stop treating on POLLPRI as 'read'

Current code was considering "can read" as having either POLLIN or POLLPRI being
set.
This may lead to client being awaken because of POLLPRI, starting a blocking
read and getting stuck because there is actually nothing to read.

This patch removes POLLPRI handling in read code and I'll add specific
API to wait for POLLPRI.

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

6 years agobaseparse: Ensure seqnum consistency
Edward Hervey [Tue, 5 Jun 2018 15:02:18 +0000 (17:02 +0200)]
baseparse: Ensure seqnum consistency

We need all relevant events of a segment to have consistent seqnum:
* GST_EVENT_SEGMENT
* GST_EVENT_EOS

If we are push-based and create a new segment, use the same seqnum
as the upstream event.

If we are pull-based, use the seqnum of that newly created segment
event everywhere

6 years agomessage: Only allow setting valid seqnum on messages
Edward Hervey [Tue, 5 Jun 2018 15:01:05 +0000 (17:01 +0200)]
message: Only allow setting valid seqnum on messages

If we want to make sure we never end up with invalid seqnum on
messages let's forbid setting them.

6 years agoevent: Only allow setting valid seqnum on events
Edward Hervey [Tue, 5 Jun 2018 14:59:50 +0000 (16:59 +0200)]
event: Only allow setting valid seqnum on events

If we want to make sure we never end up with invalid seqnum on
events let's forbid setting them.

6 years agobin: Make sure we don't use invalid seqnums on messages
Edward Hervey [Tue, 5 Jun 2018 14:58:21 +0000 (16:58 +0200)]
bin: Make sure we don't use invalid seqnums on messages

There is a possibility that the accumlation functions don't set
a seqnum. Make sure we only set/override the seqnum of the new
messages if we *have* a valid upstream seqnum to use

6 years agoqueue2: use GstQueueArray
Dimitrios Katsaros [Sat, 2 Jun 2018 12:02:19 +0000 (14:02 +0200)]
queue2: use GstQueueArray

When using queue2 as a queue it was using GQueue with
individually allocated queue items, so two allocs for
each item. With GstQueueArray we can avoid those.

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

6 years agodataqueue: add some missing introspection annotations
Mike Wey [Sun, 3 Jun 2018 17:37:40 +0000 (19:37 +0200)]
dataqueue: add some missing introspection annotations

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

6 years agobaseparse: Documentation improvements
Edward Hervey [Wed, 30 May 2018 12:06:06 +0000 (14:06 +0200)]
baseparse: Documentation improvements

* Remove references to old functions and methods
* Use proper #ClassName.vmethod() decorator for vmethod

6 years agomeson: Add an option to activate extra checks
Thibault Saunier [Tue, 22 May 2018 14:30:58 +0000 (16:30 +0200)]
meson: Add an option to activate extra checks

And activate them by default as with autotools

6 years agomeson: rename gtkdoc option to gtk_doc
Tim-Philipp Müller [Mon, 21 May 2018 22:10:21 +0000 (23:10 +0100)]
meson: rename gtkdoc option to gtk_doc

6 years agodatetime: Update/fix documentation
Edward Hervey [Mon, 21 May 2018 09:37:00 +0000 (11:37 +0200)]
datetime: Update/fix documentation

6 years agosample: Update documentation
Edward Hervey [Mon, 21 May 2018 09:36:42 +0000 (11:36 +0200)]
sample: Update documentation

6 years agogst: Add an example to GST_STATIC_PAD_TEMPLATE macro
Edward Hervey [Mon, 21 May 2018 09:16:29 +0000 (11:16 +0200)]
gst: Add an example to GST_STATIC_PAD_TEMPLATE macro

6 years agogst: add some GIR array annotations
Mark Nauwelaerts [Mon, 21 May 2018 07:14:37 +0000 (09:14 +0200)]
gst: add some GIR array annotations

6 years agomeson: add 'nls' option to disable translations
Tim-Philipp Müller [Sun, 20 May 2018 13:07:15 +0000 (14:07 +0100)]
meson: add 'nls' option to disable translations

And enable by default. Was implicitly disabled because
ENABLE_NLS was not defined.

6 years agowin32: update for new aggregator API
Tim-Philipp Müller [Wed, 16 May 2018 22:25:26 +0000 (23:25 +0100)]
win32: update for new aggregator API

Fixes make distcheck.

6 years agoaggregator: Add get_next_time function for live streams
Olivier Crête [Sat, 5 May 2018 08:46:09 +0000 (10:46 +0200)]
aggregator: Add get_next_time function for live streams

Add a function to do the right thing for live streams.

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

6 years agopad: Fix race condition causing the same probe to be called multiple times
Sebastian Dröge [Wed, 9 May 2018 21:05:51 +0000 (00:05 +0300)]
pad: Fix race condition causing the same probe to be called multiple times

Probes were remembering a cookie that was used to check if the probe was
already called this time before the probes list changed. However the
same probes could've been called by another thread in between and thus
gotten a new cookie, and would then be called a second time.

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

6 years agogst: Use memcpy() instead of strncpy() where appropriate
Edward Hervey [Fri, 4 May 2018 07:29:22 +0000 (09:29 +0200)]
gst: Use memcpy() instead of strncpy() where appropriate

strncpy() is assumed to be for strings so the compiler assumes that
it will need an extra byte for the string-terminaning NULL.

For cases where we know it's actually "binary" data, just copy it
with memcpy.

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

6 years agobitwriter: Fix build error
Seungha Yang [Mon, 7 May 2018 01:47:00 +0000 (10:47 +0900)]
bitwriter: Fix build error

Fix implicit-function-declaration warning for meemst and memcpy

gstbitwriter.h:166:3: error: implicit declaration of function ‘memset’
   memset (bitwriter->data + clear_pos, 0, (new_bit_size >> 3) - clear_pos);
   ^

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