Commit graph

18477 commits

Author SHA1 Message Date
Mathieu Duponchelle
fee108f7cf basesrc: do not send EOS when automatic_eos is FALSE 2019-04-05 18:00:29 +00:00
Mathieu Duponchelle
ae57b1c76d aggregator: add buffer-consumed pad signal
The signal will be emitted when a buffer was consumed on
a pad, if the newly-added "emit-signals" property has been
set to TRUE.

Handlers connected to the signal will receive a valid reference on
the consumed buffer, allowing for example the retrieval of metas in
order to forward them once an output buffer is pushed out.
2019-04-05 12:13:54 +00:00
Antonio Ospite
90beb712a0 gst-inspect: fix printing the first field of a GstStructure
When printing a GstStructure property (e.g. the "stats" property in
rtpsession) the first field is printed on the same line of the type
description, and this is both inconsistent compared to  how Enum values
are printed and confusing as the reader might miss the first field.

To fix this, add a newline before printing GstStructure fields in
properties.

NOTE: this does not change the existing inconsistent behavior of an
extra newline *after* a GstStructure property, but the latter is not as
annoying and it would take more effort to fix because GstStructure
fields are printed in CAPS descriptions too.
2019-04-05 12:02:40 +02:00
Mathieu Duponchelle
2fa15d5371 event: add new seek parameter, "trickmode-interval"
When performing a key unit trickmode seek, it may be useful to
specify a minimum interval between the output frames, either
in very high rate cases, or as a protection against streams
that may contain an overly large amount of key frames.

One use case is ONVIF Section 6.5.3:

<https://www.onvif.org/specs/stream/ONVIF-Streaming-Spec.pdf>
2019-04-01 17:13:32 +00:00
Antonio Ospite
763d01f437 tests: add the valgrind suppression file from the "common" module
Other gstreamer repositories have their own valgrind suppression file
directly in the repository.

Add a suppression file to the core gstreamer repository too, this makes
it easier to use it with gst-build which does not check out the common
module.

This is also a little step towards the removal of the common submodule.

NOTE: the added file is the latest version from the "common" repository
but it has been renamed from gst.supp to gstreamer.supp for symmetry
with the suppression files in the other repositories.
2019-03-24 18:11:41 +00:00
Tim-Philipp Müller
a7db80f9a9 g-i: pass --quiet to g-ir-scanner
This suppresses the annoying 'g-ir-scanner: link: cc ..' output
that we get even if everything works just fine.

We still get g-ir-scanner warnings and compiler warnings if
we pass this option.
2019-03-23 18:31:42 +00:00
Tim-Philipp Müller
93d190b5b3 check: suppress some g-i warnings
gstcheck.c:142: Warning: GstCheck: gst_check_add_log_filter: return value: Invalid non-constant return of bare structure or union; register as boxed type or (skip)
gstcheck.h:178: Warning: GstCheck: gst_check_run_suite: argument suite: Unresolved type: 'Suite*'
2019-03-23 18:17:43 +00:00
Tim-Philipp Müller
fda27c18fa g-i: silence 'nested extern' compiler warnings when building scanner binary
We need a nested extern in our init section for the scanner binary
so we can call gst_init to make sure GStreamer types are initialised
(they are not all lazy init via get_type functions, but some are in
exported variables). There doesn't seem to be any other mechanism to
achieve this, so just remove that warning, it's not important at all.
2019-03-23 17:53:54 +00:00
Tim-Philipp Müller
cef902814d bitwriter: mark as 'skip' for gobject-introspection
Silences g-ir-scanner warnings. We do the same for ByteWriter.
2019-03-23 17:53:07 +00:00
Matthew Waters
c6691abba1 aggregator: don't leak gap buffer when out of segment 2019-03-21 19:18:46 +11:00
Matthew Waters
619dfc91bb aggregator: take the pad lock around queue gap event removal
As is done for every other queue interaction
2019-03-21 19:18:46 +11:00
Matthew Waters
b8d00b9e6e baseparse: don't reset the disable-passthrough property value
Resetting as a result of _reset() on PAUSED->READY is unexpected.
2019-03-20 17:44:30 +11:00
Stephane Cerveau
a01c4965de gst_element_get_factory: update documentation
Inform about a potential NULL result.
2019-03-14 13:12:52 +01:00
Stephane Cerveau
b5af526c9c gst_element_factory_get_metadata: protect from null factory 2019-03-13 18:46:14 +01:00
Damian Vicino
919a530334 Update README 2019-03-12 21:19:23 +00:00
Damian Vicino
cc69b9d95e Update README to have correct name of the license file documented (COPYING).
There is no LICENSE file in the root directory, and COPYING file content is a license file.
2019-03-12 20:12:37 +00:00
Seungha Yang
ec0e4ae0c3 tests: fdsrc: Exclude unit test on Windows
Since elements_fdsrc.test_num_buffers uses blocking pipe on Windows,
the test will never be finished. But emulating non-blocking fd without
win32 APIs on Windows is a little tricky.
2019-03-10 11:48:31 +00:00
Santiago Carot-Nemesio
706e10ad05 gsttaskpool: Do not block tasks while cleaning up the taskpool
There is a deadlock if any thread from the pool tries to push
a new task while other thread is waiting for the pool of threads
to finish. With this patch the thread will get an error when it
tries to add a new task while the taskpool is being cleaned up.
2019-03-08 17:27:30 +01:00
Marco Trevisan (Treviño)
b5286f0560 gsturi: Fix annotation on get_path to return a nullable
Use proper syntax or the (nullable): part will be part of the description
2019-03-06 19:46:46 +01:00
Marco Trevisan (Treviño)
951dc50d34 gstmessage: Fix annotations on details
Details argument should be nullable, but the docstring uses a wrong syntax.
2019-03-06 19:34:12 +01:00
Tim-Philipp Müller
dfd9fd7f82 tests: fix leak in buffer test_wrapped_bytes test 2019-03-06 09:04:54 +00:00
Mathieu Duponchelle
5dc149f4f2 gstbuffer: store meta in add order
The previous implementation of add was implemented as a prepend,
switch to append as that seems like the expected order.
2019-03-04 12:57:02 +00:00
Tim-Philipp Müller
673ccfde8b Back to development 2019-03-04 09:01:07 +00:00
Santiago Carot-Nemesio
e322250fb1 taskpool: Set error in case something goes wrong in the default handlers 2019-02-28 17:02:30 +01:00
Tim-Philipp Müller
0dd0a29c02 Release 1.15.2 2019-02-26 13:24:28 +00:00
Tim-Philipp Müller
8d3ca40e9d meson: dist get_flex_version.py 2019-02-26 13:24:28 +00:00
Tim-Philipp Müller
b6ee888c5d Update docs 2019-02-26 11:38:00 +00:00
Tim-Philipp Müller
dd0f969253 Update translations 2019-02-26 11:37:58 +00:00
Philipp Zabel
b611c4e0af plugin: add 0BSD as valid license
Add the zero-clause BSD license, which is an alteration of the ISC
license, to the list of valid licenses.
2019-02-25 14:58:22 +01:00
Philipp Zabel
bef07f73a2 plugin: fix link to 3-clause BSD license
The current link points to the 2-clause BSD license,
explicitly link to the 3-clause version of the license.
2019-02-25 14:51:18 +01:00
Nirbheek Chauhan
a1447b036c gstmacros.h: Fix restrict definition on MSVC
Turns out it's exposed as `__restrict`, not as `restrict`.

https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/95#note_120782
2019-02-20 17:51:40 +05:30
Nirbheek Chauhan
ea4b086142 gstmacros.h: Fix check for 'restrict' keyword
MSVC also defines it as a keyword. Fixes build errors in projects that
include MSVC's xkeycheck.h which ensures that keywords aren't overriden
with a define.
2019-02-20 01:25:11 +05:30
Seungha Yang
790f193d63 buffer: Don't miss return value on Windows build
... and use InterlockedExchangeAdd64 for the 64bit value.
InterlockedExchangeAdd is 32bit version.
2019-02-18 10:21:18 +09:00
Sebastian Dröge
2108c6228a bus: Make removing of signal/bus watches thread-safe
Between getting the GSource with the mutex and destroying it, something
else might've destroyed it already and we would have a dangling pointer.

Keep an additional reference just in case.
2019-02-15 13:23:37 +02:00
Sebastian Dröge
8de3344ecc bus: Don't allow removing signal watches with gst_bus_remove_watch()
Signal watches are reference counted and gst_bus_remove_watch() would
immediately remove it, breaking the reference counting. Only
gst_bus_remove_signal_watch() should be used for removing signal
watches.
2019-02-15 13:21:35 +02:00
Lawrence Troup
2276336621 pad: Document that pad unlink function is called with pad lock held
Fixes #353
2019-02-13 11:56:15 +00:00
Tim-Philipp Müller
f62ee97592 buffer: store sequence number for metas
For metas where order might be significant if multiple metas are
attached to the same buffer, so store a sequence number with the
meta when adding it to the buffer. This allows users of the meta
to make sure metas are processed in the right order.

We need a 64-bit integer for the sequence number here in the API,
a 32-bit one might overflow too easily with high packet/buffer
rates. We could do it rtp-seqnum style of course, but that's a
bit of a pain.

We could also make it so that gst_buffer_add_meta() just keeps metas in
order or rely on the order we add the metas in, but that seems too
fragile overall, when buffers (incl. metas) get merged or split.

Also add a compare function for easier sorting.

We store the seqnum in the MetaItem struct here and not in the
GstMeta struct since there's no padding in the GstMeta struct.
We could add a private struct to GstMeta before the start of
GstMeta, but that's what MetaItem effectively is implementation-
wise. We can still change this later if we want, since it's all
private.

Fixes #262
2019-02-12 17:53:08 +00:00
Sebastian Dröge
335826a3eb deviceprovider: It's (transfer none) not (transfer-none) 2019-02-09 11:35:59 +02:00
Thibault Saunier
97aa82387f device-provider: Allow notifying application of device changes
Thi introduces new APIs to post a `DEVICE_CHANGED` message on the
bus so the application is notifies when a device is modified. For
example, if the "defaultness" of a device was changed or any property
that can be changed at any time. Atomically changing the device
object notifying that way allow us to abtract away the internal threads.

New APIS:
  - gst_message_new_device_changed
  - gst_message_parse_device_changed
  - gst_device_provider_device_changed
2019-02-08 13:44:02 -03:00
Nirbheek Chauhan
c164b88ac1 meson: Extract flex version using a regex inside a script
Different builds of Flex on different platforms output different strings
in --version. For example:

macOS:
flex 2.5.35 Apple(flex-31)

Windows:
win_flex.exe 2.6.4
C:\Program Files (x86)\GnuWin32\bin\flex.EXE version 2.5.4

We need to look for a string that looks like a version, which means
a regex till https://github.com/mesonbuild/meson/issues/1609 is fixed.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/356
2019-02-08 16:54:10 +05:30
Nirbheek Chauhan
febfabb39f misc: Fix various compiler warnings on MinGW
gstharness.c: Use G_GSIZE_FORMAT instead of hard-coding %zu
error: unknown conversion type character 'z' in format [-Werror=format]

gst-inspect.c: GPid is void* on non-UNIX, and we only use it on UNIX
error: initialization makes pointer from integer without a cast [-Werror]

gstmeta.c: Use and then discard value
error: value computed is not used [-Werror=unused-value]

With this, gstreamer builds with -Werror on MinGW
2019-02-05 18:45:54 +05:30
Sebastian Dröge
d3a2ed10fe datetime: new() and new_local_time() constructors are not nullable 2019-01-29 14:49:28 +00:00
Sebastian Dröge
f6816d5412 pad: Constructors are all not nullable
They can't possibly return NULL except in case of assertions.
2019-01-29 14:49:28 +00:00
Sebastian Dröge
92b38d2a00 padtemplate: Constructors are all nullable as they check the template name 2019-01-29 14:49:28 +00:00
Edward Hervey
ef8f045ff9 test: Set PTS on proper variable
This would previously set the PTS on a random address causing various
memory corruption
2019-01-29 12:01:59 +01:00
Mathieu Duponchelle
57cefb5932 gstinfo: add Windows stacktraces support
This uses the DbgHelp library if available
2019-01-28 14:29:23 +00:00
Nicolas Dufresne
c816ec4f0e pad: Remove unneeded 64bit upcast in debug trace
The hook->hook_id is a gulong for which there are no portability issues
when tracing in printf format with %lu. So use %lu and remove the upcast
to 64 bit. This makes the code more consistent with everything else
tracing that hook_id and other gulong id.
2019-01-26 01:42:22 +00:00
Nicolas Dufresne
35300f8299 gst-inspect: Re-add DEFAULT_LESS_OPTS with initial value
Commit 56b4fbef5e refactored the pipe code
to use GLib utility, but the patch was hading some other changed. LESS
env was now hardcoded in the middle instead of from a define and was
changed from FXR to -RX. The "-" is not even valid for LESS env, and
with the lost of F, we would still use a pager when the content fits the
terminal.
2019-01-24 22:47:23 -05:00
Sebastian Dröge
5688773b91 taglist: Remove (scope call) annotation from gst_tag_register()
This was added in 7fdb15d6a2 but it is wrong. (scope call) is for
closures that only have to stay valid for the scope of the call, but the
tag merge function has to stay valid for the whole lifetime of the
application instead.

There's no appropriate scope annotation for that so we have to skip
these functions for now.
2019-01-24 07:52:34 +00:00
Seungha Yang
5b19d30d24 tests: info: Fix spurious validation
Should be equality check, not assignment.
Additionally, use fail_unless_equals_* macro for better readability
and debugging easier, if possible.
2019-01-24 10:14:18 +09:00