Commit graph

19036 commits

Author SHA1 Message Date
Sebastian Dröge
2334f5451f Add some missing nullable annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/699>
2020-11-05 15:48:50 +00:00
Jonathan Matthew
39df723ba5 queue2: Fix modes in scheduling query handling
Create a new query to send upstream and copy the flags across from it,
rather than reusing the same query, as this allows us to prevent use
of pull mode when we don't have a download file.

Fixes: #629
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/696>
2020-11-04 10:00:18 +00:00
Chris White
e231f1d3af gstinfo: colorize PIDs in log messages
The PIDs on log lines were supposed to be colorized before, but the
escape sequence was incorrect.  With this change, the code uses the
correct sequence to colorize those PIDs.  E.g., instead of `\033[334m`
(incorrect), use `\033[34m` (correct).

This makes the log messages easier to read.  It also reduces the chance
that a buggy terminal will choke on the invalid escape sequence.

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/624

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/691>
2020-11-02 11:55:30 +00:00
Jan Schmidt
34b4a03f01 harness: Handle element not being set cleanly.
If a harness is created with gst_harness_new_empty(), there
might not be an internal element to unref on cleanup.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/687>
2020-10-30 15:01:25 +00:00
Jan Schmidt
882175dc43 bin: When removing a sink, check if the EOS status changed.
Removing a sink that hasn't posted EOS might change the bin itself
to EOS if it's the last remaining non-EOSed sink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/685>
2020-10-30 12:41:36 +00:00
Nicolas Dufresne
c983df161c aggregator: Include min-upstream-latency in buffering time
While we can fixe the upstream latency using the min-upstream-latency, we
are now forced to use queues (hence more thread) in order to store the pending
data whenever we have an upstream source that has lower latency.

This fixes the issue by allowing to buffer the fixed upstream latency. This is
particularly handy on single core systems were having too many threads can
cause serious performance issues.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/684>
2020-10-29 17:53:53 +00:00
Tim-Philipp Müller
6493920826 Back to development 2020-10-27 12:33:56 +00:00
Tim-Philipp Müller
29a8099d1d Release 1.18.1 2020-10-26 11:08:37 +00:00
Mathieu Duponchelle
6ae7d4ec91 aggregator: make peek() has() pop() drop() buffer API threadsafe
Enforce that the last buffer that was peeked (or had its existence
checked) on a pad is the one that gets popped / dropped, resetting
at the end of each aggregation cycle.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/603

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/675>
2020-10-14 14:06:54 +01:00
Mathieu Duponchelle
a613240c57 gstvalue: don't write to const char *
Our various deserializing functions require NULL terminators
to not over consume substrings (eg fields of an array). Instead
of writing a NULL terminator to the passed-in string, which may
result in segfaults, make a copy of the substring we're interested
in.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/446

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/673>
2020-10-13 12:03:06 +01:00
Seungha Yang
9526b56cfd meson: Disallow DbgHelp for UWP build
Most symbols in DbgHelp.h are not allowed for UWP

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/670>
2020-10-12 12:54:32 +01:00
Seungha Yang
41eaa6bf42 info: Fix build on Windows ARM64 device
gstinfo.c(3086): error C2094: label 'done' was undefined

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/668>
2020-10-10 11:46:09 +00:00
Matthew Waters
11e16ee62f build: use cpu_family for arch checks
e.g. on 32-bit arm, we may have armv6, armv7l, armv7hf, etc which all
generally have the same layouts.  cpu_family() groups all of these into
just 'arm' that the ABI check table is expecting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/667>
2020-10-10 11:20:23 +00:00
Jan Alexander Steffens (heftig)
33f2263a0b basetransform: Fix in/outbuf confusion of _default_transform_meta
The default implementation doesn't actually use its buffer parameters,
but this error might have been the cause of some actual confusion in
the plugins code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/666>
2020-10-10 11:44:59 +01:00
Víctor Manuel Jáquez Leal
f97a4e2300 padtemplate: add missing annotation
Adds missing "transfer full" annotation for caps parameter in
gst_pad_template_set_documentation_caps()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/660>
2020-10-03 16:04:41 +00:00
Mathieu Duponchelle
e149981a1c gstmeta: intern registered impl string
Subsequent lookups in the hashtable are probably better done
on memory we're confident is allocated to us :)

It was easy to trigger invalid reads by calling gst_meta_register
with dynamically allocated memory, freeing that memory, then
calling gst_meta_get_info()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/657>
2020-10-03 14:37:53 +00:00
Seungha Yang
ca4edf6741 info: Load DbgHelp.dll using g_module_open()
... and update meson file so that enable it only using required headers.

"dependency(...)" is unlikely successful for Windows SDK libraries
since it doesn't ship pkg-config file. So it needs to be changed
to "find_library()" to link corresponding .lib file. That would
result to most MSVC build system will link dbghelp.dll. However,
one drawback of the change is that gstreamer-1.0.dll will mandate
dbghelp.dll although it should be optional. So g_module_open() way
can be the most safe way in this case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/659>
2020-10-03 01:31:01 +00:00
Matthew Waters
14228b63bf padtemplate: mark documentation caps as may be leaked
The template itself is already marked as such and the caps, the
documentation caps are a logical extension of those two.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/658>
2020-10-03 01:07:54 +00:00
Sebastian Dröge
b2b1610907 aggregator: Hold SRC_LOCK while unblocking via SRC_BROADCAST()
Otherwise the clock id we access might not be a valid pointer anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/656>
2020-10-02 23:57:48 +00:00
Tom Schoonjans
30151e6f40 ptp_helper_post_install.sh: deal with none
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/655>
2020-10-03 00:00:06 +01:00
Xℹ Ruoyao
ef4b61496d skip elements/leak.c if tracer is not available
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/654>
2020-10-02 01:02:25 +01:00
Sebastian Dröge
56d696200a aggregator: Wake up source pad in PAUSED<->PLAYING transitions
When going to PLAYING we will now have a clock and can stop waiting on
the condition variable and instead start waiting on the clock if
necessary for the current configuration.

In the other direction when going to PAUSED the clock might have
disappeared and we might need to wait on the condition variable again
instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/653>
2020-10-01 01:12:04 +01:00
Sebastian Dröge
bc81eaf103 input-selector: Wake up blocking pads when releasing them
Otherwise deactivating them will cause a deadlock as they're blocking
inside the streaming thread.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/601

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/652>
2020-09-30 15:54:39 +01:00
Sebastian Dröge
4b0bac94ec ptp: Also handle gnu/kfreebsd
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/651>
2020-09-30 10:33:35 +01:00
Tim-Philipp Müller
55d6981db5 Back to development 2020-09-08 17:44:00 +01:00
Tim-Philipp Müller
96148da56f Release 1.18.0 2020-09-08 00:01:35 +01:00
Tim-Philipp Müller
07fd4878c7 meson: dist pot file in tarballs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/618>
2020-09-07 22:23:18 +01:00
Sebastian Dröge
dccae68eaf aggregator: Document that samples_selected() must only be called from the aggregate() function
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/607>
2020-08-25 15:50:25 +03:00
Sebastian Dröge
070f663ae1 aggregator: Don't automatically adjust segment if subclass provided one
On the first buffer the base class would update the segment position
based on the start-time-selection. If the subclass provides its own
segment this will caused unexpected behaviour and override segment
information that was explicitly set by the subclass.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/600>
2020-08-24 18:19:21 +00:00
Tim-Philipp Müller
e97c520f06 Release 1.17.90 2020-08-20 16:08:27 +01:00
Mathieu Duponchelle
f0da248d37 aggregator: fix documentation for samples-selected and buffer-consumed
GI expects the instance parameter to be documented, omitting it
leads to a msismatched output in the gir.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/592>
2020-08-10 22:42:54 +02:00
Sebastian Dröge
84385bdd86 aggregator: Add optional GstStructure info parameter to "samples-selected" signal
Subclasses can use this to provide more information, for example
audioaggregator could provide the offset into the output buffer where
the next data is going to be filled.

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/805

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/590>
2020-08-07 19:15:34 +03:00
Mathieu Duponchelle
e243e152f0 aggregator: add segment, pts, dts and duration to samples-selected
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/588>
2020-08-05 19:05:34 +02:00
Xavier Claessens
9961398d25 Meson: Override gst-tester-1.0 program to find it in other modules
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/586>
2020-08-04 11:23:42 +00:00
Jordan Petridis
c12c7afd06 fix clang 10 warnings
the typesystem checks in g_atomic_pointer_compare_and_exchange
seem to trigger some false positives with clang 10

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/584>
2020-08-04 10:44:16 +00:00
Mathieu Duponchelle
ed90b5dc55 aggregator: fix iteration direction in skip_buffers
Subclasses use the pad segment to determine whether a buffer
should be skipped, we thus don't want to check if a buffer
needs to be skipped before processing the segment it's part
of.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/585>
2020-08-04 11:16:21 +02:00
Nirbheek Chauhan
5195ad9126 gsturi: Add new API for storing unmodified userinfo / fragment
New API: gst_uri_from_string_escaped()

Identical to gst_uri_from_string() except that the userinfo and
fragment components of the URI will not be unescaped while parsing.

This is needed for correctly parsing usernames or passwords with `:`
in them such as reported at:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/831

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/583>
2020-08-03 16:07:45 +00:00
Nirbheek Chauhan
5f4723d842 tests: Add more tests for gsturi
Add tests that exercise unescaping of userinfo and fragments.

Also convert to a modular macro-based definition so that we can reuse
the list of tests in the next commit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/583>
2020-08-03 16:07:44 +00:00
Thibault Saunier
356d8b4c2d inspect: Print preset description when available
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/582>
2020-08-03 12:54:53 +00:00
Mathieu Duponchelle
d74efc1aed aggregator: expose sample selection API
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/771
for context.

This exposes new API that subclasses must call from their
aggregate() implementation to signal that they have selected
the next samples they will aggregate: gst_aggregator_selected_samples()

GstAggregator will emit a new signal there, `samples-selected`,
handlers can then look up samples per pad with the newly-added
gst_aggregator_peek_next_sample.

In addition, a new FIXME is logged when subclasses haven't actually
called `selected_samples` from their aggregate() implementation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/549>
2020-07-31 09:59:08 +03:00
Hosang Lee
411d255154 gsturi: unescape '=' in http query
Don't use percent-encoding for '=' in http queries.
'=' in the following kind of http query should be maintained.
example:
?token=exp=123~acl=/QualityLevels(*~hmac=0cb ...

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/580>
2020-07-29 09:06:12 +00:00
Camilo Celis Guzman
edcbc7cc98 basetransform: handle invalid subclass implementation for fixate_caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/575>
2020-07-28 14:14:38 +00:00
Olivier Crête
18f27b1044 baseparse: Don't push pointless new segment events
In 1.0, there is no concept of segment update, so don't push new
identical segments.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/578>
2020-07-28 07:48:31 +00:00
Thibault Saunier
bc641acb9f baseparse: Fix seqnum handling in pull mode
After a seek in pull mode, we should use the seek seqnum for all
following operations, not some random seqnums

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/577>
2020-07-28 07:18:24 +00:00
Tim-Philipp Müller
58558bb90c check: suppress g-ir-scanner warnings
Make g-ir-scanner skip all those check macros that are
not useful for or usable from bindings.

gstcheck.h:209: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_message_error'
gstcheck.h:212: Warning: GstCheck: Unknown namespace for symbol 'assert_message_error'
gstcheck.h:251: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_equals_int'
gstcheck.h:267: Warning: GstCheck: Unknown namespace for symbol 'assert_equals_int'
gstcheck.h:280: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_equals_int_hex'
gstcheck.h:299: Warning: GstCheck: Unknown namespace for symbol 'assert_equals_int_hex'
gstcheck.h:310: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_equals_int64'
gstcheck.h:327: Warning: GstCheck: Unknown namespace for symbol 'assert_equals_int64'
gstcheck.h:340: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_equals_int64_hex'
gstcheck.h:358: Warning: GstCheck: Unknown namespace for symbol 'assert_equals_int64_hex'
gstcheck.h:369: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_equals_uint64'
gstcheck.h:386: Warning: GstCheck: Unknown namespace for symbol 'assert_equals_uint64'
gstcheck.h:399: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_equals_uint64_hex'
gstcheck.h:417: Warning: GstCheck: Unknown namespace for symbol 'assert_equals_uint64_hex'
gstcheck.h:428: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_equals_string'
gstcheck.h:444: Warning: GstCheck: Unknown namespace for symbol 'assert_equals_string'
gstcheck.h:455: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_equals_float'
gstcheck.h:474: Warning: GstCheck: Unknown namespace for symbol 'assert_equals_float'
gstcheck.h:487: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_equals_pointer'
gstcheck.h:506: Warning: GstCheck: Unknown namespace for symbol 'assert_equals_pointer'
gstcheck.h:517: Warning: GstCheck: Unknown namespace for symbol 'fail_unless_equals_clocktime'
gstcheck.h:534: Warning: GstCheck: Unknown namespace for symbol 'MAIN_START_THREADS'
gstcheck.h:547: Warning: GstCheck: Unknown namespace for symbol 'MAIN_START_THREAD_FUNCTIONS'
gstcheck.h:555: Warning: GstCheck: Unknown namespace for symbol 'MAIN_START_THREAD_FUNCTION'
gstcheck.h:626: Warning: GstCheck: Unknown namespace for symbol 'ASSERT_CRITICAL'
gstcheck.h:628: Warning: GstCheck: Unknown namespace for symbol 'ASSERT_CRITICAL'
gstcheck.h:640: Warning: GstCheck: Unknown namespace for symbol 'ASSERT_WARNING'
gstcheck.h:652: Warning: GstCheck: Unknown namespace for symbol 'ASSERT_OBJECT_REFCOUNT'
gstcheck.h:661: Warning: GstCheck: Unknown namespace for symbol 'ASSERT_OBJECT_REFCOUNT_BETWEEN'
gstcheck.h:676: Warning: GstCheck: Unknown namespace for symbol 'ASSERT_CAPS_REFCOUNT'
gstcheck.h:679: Warning: GstCheck: Unknown namespace for symbol 'ASSERT_BUFFER_REFCOUNT'
gstcheck.h:682: Warning: GstCheck: Unknown namespace for symbol 'ASSERT_MINI_OBJECT_REFCOUNT'
gstcheck.h:690: Warning: GstCheck: Unknown namespace for symbol 'ASSERT_SET_STATE'
gstcheck.h:729: Warning: GstCheck: Unknown namespace for symbol 'tcase_skip_broken_test'
gstcheck.h:740: Warning: GstCheck: Unknown namespace for symbol 'tcase_skip_broken_loop_test'

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/579>
2020-07-26 15:34:54 +01:00
Tim-Philipp Müller
31ed9cf284 utils: silence g-ir-scanner warnings about float conversion macros
663: Warning: Gst: symbol='GFLOAT_TO_LE': Unknown namespace for symbol 'GFLOAT_TO_LE'
664: Warning: Gst: symbol='GFLOAT_TO_BE': Unknown namespace for symbol 'GFLOAT_TO_BE'
665: Warning: Gst: symbol='GDOUBLE_TO_LE': Unknown namespace for symbol 'GDOUBLE_TO_LE'
666: Warning: Gst: symbol='GDOUBLE_TO_BE': Unknown namespace for symbol 'GDOUBLE_TO_BE'
669: Warning: Gst: symbol='GFLOAT_TO_LE': Unknown namespace for symbol 'GFLOAT_TO_LE'
670: Warning: Gst: symbol='GFLOAT_TO_BE': Unknown namespace for symbol 'GFLOAT_TO_BE'
671: Warning: Gst: symbol='GDOUBLE_TO_LE': Unknown namespace for symbol 'GDOUBLE_TO_LE'
672: Warning: Gst: symbol='GDOUBLE_TO_BE': Unknown namespace for symbol 'GDOUBLE_TO_BE'
678: Warning: Gst: symbol='GFLOAT_FROM_LE': Unknown namespace for symbol 'GFLOAT_FROM_LE'
679: Warning: Gst: symbol='GFLOAT_FROM_BE': Unknown namespace for symbol 'GFLOAT_FROM_BE'
680: Warning: Gst: symbol='GDOUBLE_FROM_LE': Unknown namespace for symbol 'GDOUBLE_FROM_LE'
681: Warning: Gst: symbol='GDOUBLE_FROM_BE': Unknown namespace for symbol 'GDOUBLE_FROM_BE'

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/579>
2020-07-26 15:34:54 +01:00
Tim-Philipp Müller
6e7f4491ce math-compat.h: silence g-ir-scanner warnings
Easier to just make g-ir-scanner skip this header via #ifndef __GI_SCANNER__
than maintain different sets of headers in the meson.build file.

Warning: Gst: symbol="rint": Unknown namespace for symbol "rint"
Warning: Gst: symbol="rintf": Unknown namespace for symbol "rintf"
Warning: Gst: symbol="isnan": Unknown namespace for symbol "isnan"
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/579>
2020-07-26 15:34:54 +01:00
Tim-Philipp Müller
36715f407c event, query: fix g-ir-scanner warnings
gstevent.h:72: Warning: Gst: symbol='FLAG': Unknown namespace for symbol 'FLAG'
gstquery.h:76: Warning: Gst: symbol='FLAG': Unknown namespace for symbol 'FLAG'

Use _FLAG(xyz) instead of FLAG(xyz) to silence g-ir-scanner
warnings about this internal helper define.

It's also slightly more hygienic.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/579>
2020-07-26 15:34:54 +01:00
Tim-Philipp Müller
e4f7cdb0df tracer: declare GstTracer API stable
It's been around for more than 4 years and people have built
lots of stuff on top of it, doesn't really make sense to keep
it marked as unstable. We're unlikely to change it now, and
we can always deprecate it and make a new one if needed.

This stabilises the following API:
- gst_tracer_register()
- gst_tracing_get_active_tracers()
- gst_tracing_register_hook()
- gst_tracer_record_new()
- gst_tracer_record_log()

Might also help a bit with #424

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/576>
2020-07-24 13:33:50 +01:00
Matthew Waters
39aa702659 harness: unref sink/src caps after deactivating pads
Otherwise, access to the harness' sink/src caps is racy between any caps
query performed by an element and gst_harness_teardown().

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/794
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/574>
2020-07-23 14:54:09 +10:00