Commit graph

19150 commits

Author SHA1 Message Date
Seungha Yang
b71841c2d2 uri: Remove leftover documentation
Follow-up from https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/728

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/732>
2021-01-13 03:05:10 +09:00
Seungha Yang
84a3f0448b gst: Add non-inline methods for bindings to able to use core APIs
Provide non-inline version of refcounting APIs so that it can be
consumed by bindings

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer-sharp/-/issues/46
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/728>
2021-01-11 21:54:48 +09:00
Philippe Normand
e02902a783 concat: Fix active-pad property doc typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/727>
2021-01-07 11:57:51 +00:00
Dmitry Samoylov
384fba13f4 gst: Fix doc comments
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/725>
2020-12-24 00:40:33 +07:00
Michael Tretter
77e6c98f6f pipeline: clarify that applications should handle bus messages
The pipeline posts messages on the bus even if an application does not
handle the messages. This is expected behavior but may leak messages if
the messages are not handled.

Clarify the documentation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/680>
2020-12-22 14:00:02 +00:00
Fredrik Pålsson
cd978ffd6c gstbus: change log level of repeated messages from INFO to DEBUG
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/722>
2020-12-20 23:40:43 +01:00
Jakub Adam
a06dcc3e38 harness: don't use GST_DEBUG_OBJECT with GstHarness
GstHarness is not a GObject. Fixes assert on recently added check in
gst_debug_log_valist() if GST_ENABLE_EXTRA_CHECKS is enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/720>
2020-12-11 16:05:55 +01:00
Thibault Saunier
0daa48f1b1 bus: Ensure that only one GSource can be attached to the bus
Until now we were enforcing that only 1 signal GSource was attached
the bus but we could attach as many GSource with `gst_bus_create_watch`
as we wanted... but in the end only 1 GSource will ever be dispatched for
a given `GstMessage` leading to totally broken behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/718>
2020-12-11 12:29:50 +00:00
Thibault Saunier
5db76b4d41 bus: Do not override source->prepare
Since GLib 2.36 we do not need it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/718>
2020-12-11 12:29:50 +00:00
Nicolas Dufresne
8a45c8d1df gir: Fix parser warning due to empty line
The GIR parser does not want any empty line after the function or macro
name line.

Fixes the following warning:
[309/4246] Generating Gst-1.0.gir with a custom command
../subprojects/gstreamer/gst/gstelement.h:57: Warning: Gst: "@element" parameter unexpected at this location:
 * @element: The element name in lower case, with words separated by '_'.
    ^
../subprojects/gstreamer/gst/gstelement.h:84: Warning: Gst: "@e" parameter unexpected at this location:
 * @e: The element name in lower case, with words separated by '_'.
    ^
../subprojects/gstreamer/gst/gstelement.h:106: Warning: Gst: "@e" parameter unexpected at this location:
 * @e: The element name in lower case, with words separated by '_'.
    ^
../subprojects/gstreamer/gst/gstdeviceprovider.h:32: Warning: Gst: "@d_p" parameter unexpected at this location:
 * @d_p: The device provider name in lower case, with words separated by '_'.
    ^
../subprojects/gstreamer/gst/gstdynamictypefactory.h:28: Warning: Gst: "@t_n" parameter unexpected at this location:
 * @t_n: The dynamic type name in lower case, with words separated by '_'.
    ^
../subprojects/gstreamer/gst/gsttypefind.h:34: Warning: Gst: "@type_find" parameter unexpected at this location:
 * @type_find: The type find name in lower case, with words separated by '_'.
    ^
../subprojects/gstreamer/gst/gsttypefind.h:61: Warning: Gst: "@t_f" parameter unexpected at this location:
 * @t_f: The type find name in lower case, with words separated by '_'.
    ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/719>
2020-12-10 14:08:53 -05:00
Thibault Saunier
978ba72bdd structure: Handle trailing comas in serialized structs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/717>
2020-12-10 13:35:17 +00:00
Stéphane Cerveau
783e19b04c coreelements: allow per features registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661>
2020-12-10 12:45:16 +01:00
Stéphane Cerveau
a41f37d94c dynamic type: add convenience macros to register
This macros will help to register a dynamic type
apart from a given plugin such as in a static build
of gstreamer where libgstreamer-full is generated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661>
2020-12-10 12:45:16 +01:00
Stéphane Cerveau
9fd20cf1a0 type find: add convenience macros to register
This macros will help to register a device provider
apart from a given plugin such as in a static build
of gstreamer where libgstreamer-full is generated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661>
2020-12-10 12:45:16 +01:00
Stéphane Cerveau
ff36ce0051 device provider: add convenience macros to register
This macros will help to register a device provider
apart from a given plugin such as in a static build
of gstreamer where libgstreamer-full is generated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661>
2020-12-10 12:45:16 +01:00
Julian Bouzas
7828237496 element: add convenience macros to register
Define separate macros to define an element
apart from the plugin itself.
These macros will help to register
elements a part from a plugin.
By example in the case of a gstreamer static build
producing the libgstreamer-full library.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661>
2020-12-10 12:45:16 +01:00
Stéphane Cerveau
80f671207a gst-inspect: add an option to sort plugins
with the option --sort, the output is sort by default
with alphabetical order with plugins and features.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/709>
2020-12-08 13:02:53 +00:00
Sebastian Dröge
758569a629 datetime: Update tests for returning NULL instead of g_return_val_if_fail() in error cases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/706>
2020-12-07 12:23:15 +02:00
Sebastian Dröge
cf0f39efe8 datetime: Make use of new g_time_zone_new_identifier() that properly handles errors
g_time_zone_new() returns UTC if it fails to parse the timezone
identifier, which is rather suboptimal and causes wrong datetimes to be
created silently.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/706>
2020-12-07 12:14:50 +02:00
Sebastian Dröge
9f23808b55 datetime: Clean up all constructors to fail gracefully if invalid dates/times are provided
And also don't crash dereferencing a NULL pointer if the GDateTime
functions return NULL.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/706>
2020-12-07 12:14:50 +02:00
Sebastian Dröge
2bedcbaa2e datetime: Change getters to return specific invalid values if the value is not set
This is more bindings friendly than requiring a special function to be
called beforehand or getting an assertion instead, and should also
simplify some usage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/706>
2020-12-07 12:14:50 +02:00
Sebastian Dröge
16733a82f4 datetime: Improve documentation a bit to explain when NULL is returned
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/706>
2020-12-07 12:14:50 +02:00
Thibault Saunier
c35d47127b gst: Add new structure/caps/_to_string using the brackets for nesting
This adds `gst_structure_serialize` and `gst_caps_serialize` which use
the newly introduced bracket delimiters for nested structures.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/532>
2020-12-03 21:46:27 -03:00
Thibault Saunier
330450ef93 value: Cleanup on range parsing failures
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/532>
2020-12-03 21:46:27 -03:00
Thibault Saunier
322caf880d structure: Add support for brackets as nested structures/caps specifiers
This introduces a more human friendly syntax to specify nested
structures It does so by using 2 different markers for opening and
closing them instead of abusing quotes which lead to requiring an insane
amount of escaping to match nesting levels.

The brackets (`[` and `]`) have been chosen as they avoid complex
constructions with curly brackets (or lower/higher than signs) where you
could have structures embedded inside arrays (which also use curly
brackets), ie. `s, array=(structure){{struct}}` should be parsed as an
array of structures, but the cast seems to imply something different. We
do not have this issue with brackets as they are currently used for
ranges, which can only be casted to numeric types.

This commit does not make use of that new syntax for serialization as
that would break backward compatibility, so it is basically a 'sugar'
syntax for humans. A notice has been explicitly made in the
documentation to let the user know about it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/532>
2020-12-03 21:46:26 -03:00
Marijn Suijten
87ffe289aa check: gst_test_clock_process_next_clock_id returns nullable
It is possible there are no more pending clocks in the chain, in which
case this function returns null.

See also tests like test_single_shot_async_future that validate NULL
returns.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/714>
2020-12-03 19:25:30 +01:00
Jose Quaresma
f5ee123958 meson: gtk_doc is not supported anymore
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/710>
2020-12-02 15:04:50 +00:00
Sebastian Dröge
7bd73a56ca streams: gst_stream_type_get_name() is not nullable
It takes an enum and only the defined values are valid to pass in here
as it's not extensible from the outside.

Add a g_return_val_if_reached() for the unreachable case and return
"invalid".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/711>
2020-12-02 14:21:46 +00:00
Sebastian Dröge
b72f379948 info: Warn if logging with a non-GObject object if GST_ENABLE_EXTRA_CHECKS is enabled
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/712>
2020-12-02 09:35:26 +02:00
Tim-Philipp Müller
7c0dcb91fc taskpool: fix docs warnings
gsttaskpool.c:507: Warning: Gst: gst_shared_task_pool_get_max_threads: unknown parameter 'max_threads' in documentation comment

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/703>
2020-11-20 14:57:55 +00:00
Jonathan Matthew
12bc728805 typefind: copy seqnum to new segment event
Fixes: #635
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/700>
2020-11-10 21:39:13 +10:00
Edward Hervey
17feeb1bd6 systemclock: Use clock_nanosleep for higher accuracy
The various wait implementation have a latency ranging from 50 to 500+
microseconds. While this is not a major issue when dealing with a low number of
waits per second (for ex: video), it does introduce a non-negligeable jitter for
synchronization of higher packet rate systems.

The `clock_nanosleep` syscall does offer a lower-latency waiting system but is
unfortunately blocking, so we don't want to use it in all scenarios nor for too
long.

This patch makes GstSystemClock use clock_nanosleep (if available) as such:
* Any wait below 500us uses it
* Any wait below 2ms will first use the regular waiting system and then
  clock_nanosleep

  #	modified:   gst/gstsystemclock.c

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/688>
2020-11-06 11:22:14 +01:00
Mathieu Duponchelle
b6df564251 taskpool: expose new "shared" task pool implementation
While the default implementation will spawn a thread per new
pushed task, this new implementation instead spawns a maximum
number of threads, then queues new tasks on existing threads.

The thread that the new task will be queued on is picked in
a pretty naive fashion, by simply popping the first thread
from a queue and pushing it back to the tail, but this is
an implementation detail and can always be sophisticated
in the future if the need arises.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/692>
2020-11-05 18:18:28 +00:00
Mathieu Duponchelle
b508287add taskpool: expose dispose_handle() API
This is useful when the subclass does return a non-NULL pointer
in push(), and the user doesn't want to call join()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/692>
2020-11-05 18:18:28 +00:00
Mathieu Duponchelle
c04034c50d taskpool: improve join() documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/692>
2020-11-05 18:18:28 +00:00
Mathieu Duponchelle
c884f4c124 taskpool: modify transfer annotations for push() and join()
While the default implementation passes NULL around as the
task handle, other implementations can only provide a safe
API by having that handle map to a refcounted opaque type.

While what's passed around is a gpointer, a valid transfer
type annotation has informative value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/692>
2020-11-05 18:18:28 +00:00
Sebastian Dröge
20f6a2ece4 Add some missing nullable annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/678>
2020-11-05 14:22:24 +02:00
Nirbheek Chauhan
926652be10 meson: Enable some MSVC warnings for parity with GCC/Clang
This makes it easier to do development with MSVC by making it warn
on common issues that GCC/Clang error out for in our CI configuration.

Continuation from https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/223

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/698>
2020-11-04 18:29:44 +00:00
Bing Song
e5e27010c8 identity/clocksync: Also provide system clock if sync=false
identity should provide when sync=true. Don't provide when sync=false.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/690>
2020-11-04 09:27:53 +00:00
Jonathan Matthew
146b2ddf50 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/693>
2020-11-04 09:05:18 +00:00
Khem Raj
96ac9abb23 gst_private.h: increse padding in struct _GstClockEntryImpl
When compiling for 32bit architectures with 64bit time_t e.g. riscv32,
the static assert that the GstClockEntryImpl smaller or
equal to the struct _GstClockEntryImpl triggered.
(they were 12bytes off).

To fix this, the padding is increased by 8 bytes (on 32bit).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/694>
2020-11-03 23:03:54 -08:00
Chris White
e74040b41e 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/689>
2020-10-31 15:10:23 -04:00
Jan Schmidt
f6ce1686f1 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/686>
2020-10-30 23:46:07 +11:00
Jan Schmidt
2a9267f2d4 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/683>
2020-10-30 03:56:02 +11:00
Mathieu Duponchelle
fc5cd9591a baseparse: always use incoming DTS
When parsing interlaced video streams, ignoring incoming DTS could
cause the parser to end up with PTS < DTS output buffers, for example
when increasing next_dts using the duration of the last pushed
buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/681>
2020-10-27 01:58:32 +01:00
Philippe Normand
41677a526b devicemonitor: Stop only the already started providers
If a device provider fails to start (for instance the pulseaudio provider unable
to connect to the PulseAudio daemon) then the monitor should not keep track of
it in its `started` providers list. Otherwise a false positive critical warning
would be raised.

This patch also switches the started_count type from bool to int, for
consistency. This is a counter, after all.

API: gst_device_provider_is_started
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/679>
2020-10-22 11:48:05 +00:00
Seungha Yang
61703625f6 filesrc: Use *Ex Win32 method for UWP
non-*Ex methods are not allowed for UWP

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/610>
2020-10-21 17:24:01 +09:00
Sebastian Dröge
44e3888657 filesrc: Don't use fstat() on Windows but use specific Windows APIs
fstat() fails on Windows in various situations if the file metadata has
invalid values, and we only care about getting attributes and the file
size.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/610>
2020-10-21 16:30:27 +09:00
Sebastian Dröge
671e459d69 filesrc: Remove unused #define on Windows
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/610>
2020-10-21 16:30:27 +09:00
Xavier Claessens
6780dfd55a pkgconfig: Fix missing libcheck dependencies in gstreamer-check-1.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/676>
2020-10-16 18:14:38 +00:00