Commit graph

18590 commits

Author SHA1 Message Date
Tim-Philipp Müller 4aef0fca96 docs: libs: move all includes to canonical single header includes
And fix up bogus libs/ prefix for controller lib includes.

https://bugzilla.gnome.org/show_bug.cgi?id=797165
2018-09-19 15:08:34 +01:00
Linus Svensson 2e6089f0c5 docs: Update include directive for gstreamer-base components
Change to always include gst/libs/base.h in order to also
include base-prelude.h, but also because it's the right
thing for people to include anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=797165
2018-09-19 14:56:42 +01:00
Tim-Philipp Müller 09dac522ca meson: add glib-checks option to disable API guards and such
We want this enabled by default, also in releases, but people
may want to disable this for performance-critical workloads or
on embedded devices.
2018-09-19 11:32:16 +01:00
Tim-Philipp Müller 8f9339ef78 meson: fix missing closing bracket in option descriptions 2018-09-19 11:25:24 +01:00
Jan Schmidt 01758dcf6a tests: Use a different rate in a segment test.
Using a rate of 1.1 in the test is causing the test to
fail on 32-bit because ceil(1.1 * 10) can round to 12.

Instead use a rate 2.0 that can be expressed as floating
point number and doesn't trigger the problem.

https://bugzilla.gnome.org/show_bug.cgi?id=797154
2018-09-17 22:13:22 +10:00
Nicolas Dufresne c81b2f6207 filesink: Fix wrong printf format
We add a guint64 and a guint, the result is a guint64. On 64bit
architecture, this is the same, but on 32bit architecture, it's not.

https://bugzilla.gnome.org/show_bug.cgi?id=797127
2018-09-11 21:33:51 -04:00
Philippe Normand 616d588b52 bin: Fix use-after-free issue in gst_bin_add()
gst_element_post_message() takes ownership of the message so we need to increase
its refcount until we no longer require access to its data (context_type).

https://bugzilla.gnome.org/show_bug.cgi?id=797099
2018-09-08 19:15:41 +01:00
Nirbheek Chauhan cbd02b9584 meson: Always use a dependency object for dependencies
Fixes a configure error with gst-build:

subprojects/gst-plugins-base/meson.build:235:2: ERROR:  Fetched variable 'gst_check_dep' in the subproject 'gstreamer' is not a dependency object.
2018-09-05 16:33:43 +05:30
Philippe Normand 30a3fe53fa utils: Set default values for position and duration query results
https://bugzilla.gnome.org/show_bug.cgi?id=797066
2018-09-03 12:06:35 +01:00
Philippe Normand d7c87910c2 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
2018-08-31 15:35:35 +01:00
Sebastian Dröge 95fcced84d input-selector: Bring latency handling in sync with GstPad code 2018-08-31 12:16:43 +03:00
Sebastian Dröge e6e22af828 Revert "pad: Don't drop LATENCY queries with default implementation"
This reverts commit 794944f779.

Accumulating non-live latency values generally makes no sense and often
gives invalid results with min>max
2018-08-31 12:16:43 +03:00
Sebastian Dröge 5c4317c399 Revert "pad: Accumulate live/non-live latency values separately"
This reverts commit f5783e1cac.
2018-08-31 12:16:43 +03:00
Nirbheek Chauhan c389c59b22 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
2018-08-31 14:40:14 +05:30
Sebastian Dröge 7c179e3f58 input-selector: Apply GstPad default latency handler fixes here too 2018-08-31 11:47:03 +03:00
Sebastian Dröge f5783e1cac 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 794944f779, 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.
2018-08-31 11:44:34 +03:00
Sebastian Dröge 6fc136ad84 concat: Improve debug output a bit by printing pad names 2018-08-29 19:26:04 +03:00
Sebastian Dröge b324e4b802 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.
2018-08-28 14:23:32 +03:00
Jan Schmidt 4aeac4b551 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.
2018-08-28 01:54:02 +10:00
Jan Schmidt 260b9791fc 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.
2018-08-28 01:54:02 +10:00
Tim-Philipp Müller f87d38c186 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
2018-08-26 11:45:58 +02:00
Tim-Philipp Müller 04deaac7a4 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.
2018-08-26 11:45:58 +02:00
Tim-Philipp Müller f7b5151b58 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
2018-08-26 11:45:58 +02:00
Sebastian Dröge 3ee4896bef 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.
2018-08-17 17:26:17 +03:00
Sebastian Dröge 035045c981 filesink: Consider the current buffer size when checking the current position 2018-08-17 17:26:17 +03:00
Sebastian Dröge cbcad53b45 filesink: Reset the current buffer size to NULL and clear the buffer on close and FLUSH_STOP 2018-08-17 17:26:17 +03:00
Nirbheek Chauhan 0a84fae16c meson: host_system is 'ios' when building for iOS
The cross file sets this value, and we use 'ios' in Cerbero.
2018-08-17 02:55:43 +05:30
Sebastian Dröge 6b4fc62b7b 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
2018-08-16 17:01:07 +03:00
Sebastian Dröge e975e0cae8 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
2018-08-14 13:56:08 +03:00
Sebastian Dröge 49d212e908 aggregator: Fixup for previous commit to prevent infinite loop if no events are pending 2018-08-14 12:30:19 +03:00
Sebastian Dröge 08bd835f09 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
2018-08-14 10:23:23 +03:00
Tim-Philipp Müller 29ef9a81aa 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.
2018-08-12 23:26:25 +01:00
Tim-Philipp Müller de8fe283d6 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.
2018-08-12 23:26:25 +01:00
Tim-Philipp Müller 88bd7c61a7 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
2018-08-12 20:07:02 +01:00
Tim-Philipp Müller fffc312893 meson: add options to disable gobject cast checks and glib asserts
And match what we do for autotools here currently.
2018-08-11 18:17:29 +01:00
Tim-Philipp Müller e839f312fe meson: define G_DISABLE_DEPRECATED for development versions
Like in autotools.
2018-08-10 09:22:51 +01:00
Tim-Philipp Müller 6d34f57cb6 meson: add option to disable build of GStreamer unit test library 2018-08-10 01:23:35 +01:00
Tim-Philipp Müller fcbd110810 meson: add memory-alignment option 2018-08-10 00:34:29 +01:00
Tim-Philipp Müller d11450f238 meson: add option to disable command-line option parsing 2018-08-10 00:18:55 +01:00
Tim-Philipp Müller ce4698487e meson: add option to disable parse-launch pipeline string parser 2018-08-10 00:08:43 +01:00
Tim-Philipp Müller e5ad55d649 meson: add options to disable tests, examples, benchmarks and tools
And remove duplicate option 'poisoning' and unused 'build_tools' one.
2018-08-09 23:32:49 +01:00
Sebastian Dröge 7ef5b28e40 configure: Enable poisoning by default for non-release builds 2018-08-03 14:31:34 +03:00
Sebastian Dröge 942fc7f79e gst: Add poisoning to more types 2018-08-03 14:31:34 +03:00
Tim-Philipp Müller 69400c9fcf meson: fix setting of extra checks option
It's checked for with #ifdef so setting it to 0 or 1
will always enable it.
2018-08-03 10:36:21 +01:00
Tim-Philipp Müller 463663d4b4 meson: add option to enable poisoning of deallocated objects 2018-08-03 10:35:07 +01:00
Sebastian Dröge c31ef7fa51 typefindhelper: Mark gst_type_find_helper_get_range_full() as Since 1.14.3 2018-08-02 10:57:28 +03:00
Sebastian Dröge ef9619200b 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
2018-08-01 14:23:04 +03:00
Sebastian Dröge babd0e5f5d pad: Update pad offsets on the current event if the offset changed in pad probes
https://bugzilla.gnome.org/show_bug.cgi?id=796898
2018-08-01 14:23:04 +03:00
Sebastian Dröge c3d3cf074e 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
2018-08-01 14:23:04 +03:00
Sebastian Dröge 41f1a40704 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
2018-08-01 14:23:04 +03:00