Commit graph

8540 commits

Author SHA1 Message Date
Nirbheek Chauhan 145f8546c4 gstinfo: Add an explicit enum for GST_STACK_TRACE_SHOW_NONE
The code implicitly uses this value when the stack trace is not FULL.
Mostly useful for documenting the behaviour when each flag is passed
and for translating to/from strings.
2019-07-01 10:36:09 +00:00
Nirbheek Chauhan 5f89225bc2 gstplugin: Don't stat plugins when building for UWP
When using GStreamer with Universal Windows Platform apps, dynamic
plugins can only be loaded by filename (without a path) using
gst_plugin_load_file() which will call into g_module_open().

On Windows, GModule calls LoadLibrary() on the filename, but with
UWP we need to use LoadPackagedLibrary() which is basically the same
as LoadLibrary(), except it looks only for DLLs (by name) that have
been packaged as assets with the app.

These assets are not files and cannot be accessed using normal file
APIs such as open() or stat().

The upstream glib merge request for adding LoadPackagedLibrary support
is: https://gitlab.gnome.org/GNOME/glib/merge_requests/951

NOTE: Whitespcae removal is to make gst-indent happy
2019-06-28 13:44:49 +05:30
Nirbheek Chauhan 9b7eaa3ed5 gstconfig.h.in: Windows ARM64 does not allow unaligned access 2019-06-28 13:01:14 +05:30
Mathieu Duponchelle c34fe82b5b devicemonitor: add debug category 2019-06-21 13:38:58 +00:00
Michael Bunk 4bc68bb3fe Fixing various typos 2019-06-20 15:20:27 +00:00
Havard Graff 0257c7813b gstmeta: Optimize get_tags() by using private quark table 2019-06-17 09:50:32 +02:00
Havard Graff ce7e6a9406 pad: increase debug-level to warning for fatal outcomes 2019-06-13 16:30:14 +00:00
Niels De Graef 09141c6e1f Use G_DEFINE_AUTOPTR_CLEANUP_FUNC unconditionally
Since we started depending on GLib 2.44, we can be sure this macro is
defined (it will be a no-op on compilers that don't support it). For
plugins we should just start using `G_DECLARE_FINAL_TYPE` which means
we no longer need the macro there, but for most types in core we don't
want to break ABI, which means it's better to just keep it like it is
(and use the `#ifdef` instead).
2019-06-04 08:50:59 +02:00
Mathieu Duponchelle bcb4be455e gstelement: fix links to the gsterror page 2019-05-31 01:56:08 +02:00
Mathieu Duponchelle cce397cc50 gsttaglist: do not link to symbols from gst-plugins-base in doc 2019-05-31 01:45:41 +02:00
Mathieu Duponchelle ca17a6c791 doc: remove xml from comments 2019-05-29 21:33:42 +02:00
Thibault Saunier e31f06f7f9 registry: Avoid discovering plugins in hotdoc private directories 2019-05-16 18:22:20 +00:00
Edward Hervey 7aee718394 gstpad: Probes that return HANDLED can reset the data info field
Before GST_PAD_PROBE_HANDLED was introduced, we had to handle the case
where some probes would reset the probe info data field to NULL. This would
be considered an invalid use-case.

But with GST_PAD_PROBE_HANDLED it is totally fine to reset that, since
the probe has "handled" it.
2019-05-16 15:13:48 +02:00
Thibault Saunier 949fba4b1f doc: Fix hotdoc warnings
* Making sure that `static inline` function are in the GIR (by first
  defining them, and make sure to mark as skiped)
* Do not try to link to unexisting symbols
* Also generate GIR information about gst_tracers
2019-05-13 16:34:09 -04:00
Thibault Saunier a0c65067e0 Port to hotdoc 2019-05-13 16:34:09 -04:00
Thibault Saunier 3d5dbfb457 gst: Add a GParamSpecFlag to force gst-inspect to use pspec default value
Instead of the object value, this should be used every time a random
value will be returned by g_object_get This is also useful to make the
values returned by inspecting element stable accross runs.
2019-05-13 11:33:49 -04:00
Thibault Saunier 4e29b4aa34 doc: Add some missing docstrings 2019-05-13 11:33:49 -04:00
Thibault Saunier 5b2da0835e doc: Fix and add some missing docstrings 2019-05-13 11:33:49 -04:00
Thibault Saunier 4d259e8af3 structure: Mark _from_string as constructor 2019-05-13 11:33:49 -04:00
Nirbheek Chauhan ebd918c0f6 meson: Pass -DGST_STATIC_COMPILATION for static builds
This is only needed on Windows when building with MSVC, but it is safe
to pass it everywhere.

Closes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/398
2019-05-13 14:42:28 +05:30
Nirbheek Chauhan b19de413b9 meson: Link to objects instea of static helper library
Otherwise the objects from that static helper library are not included
in the gstreamer-1.0 static library. This was supposed to be fixed in
Meson, but the pull request hasn't been merged yet:
https://github.com/mesonbuild/meson/pull/3939

Closes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/398
2019-05-13 13:24:42 +05:30
Niels De Graef 8d180557eb uri: Add gst_clear_uri()
Basically, you can use this instead of using `gst_uri_unref()` (which
needs to be preceded by a NULL-check).

See https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/275
and https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/3
2019-05-10 14:59:23 +02:00
Niels De Graef cfca53ce67 gst: Add support for g_autoptr(GstPromise) 2019-05-08 12:11:50 +02:00
Niklas Hambüchen f5ccb2215a Make get_flex_version.py script executable
Like all other scripts in the same dir.

It has a hashbang, so it should be executable.
2019-05-01 15:46:56 +02:00
Mathieu Duponchelle 21a02e7672 gstsegment: Add GST_SEEK_FLAG_TRICKMODE_FORWARD_PREDICTED
This is generally useful, and mandated by the ONVIF streaming
spec, section 6.5.3

<https://www.onvif.org/specs/stream/ONVIF-Streaming-Spec.pdf>
2019-04-24 15:30:22 +00:00
Sebastian Dröge a42aaf87d5 gst: Fix various Since markers 2019-04-23 15:08:18 +03:00
Sebastian Dröge 26aa7a6d36 caps: Add Since: 1.16 marker to gst_caps_copy() 2019-04-23 14:53:11 +03:00
Mathieu Duponchelle dc5a62f702 gstinfo: clean up function pointer names hashtable
And add strduped function pointer names to the global quark
table, so that they don't get reported as lost by valgrind.

This allows us to use GST_DEBUG when running tests under
valgrind.
2019-04-17 23:03:56 +02:00
Philipp Zabel b99bca2790 event: fix seek event creation
Creating seek events segfaults on 32-bit ARM since commit 2fa15d5371
('event: add new seek parameter, "trickmode-interval"'), which missed
casting the trickmode-interval initializer in the variable argument list
to guint64.
2019-04-12 18:30:12 +02:00
Sebastian Dröge e0c9d4f879 controlbinding: Check if the weak pointer was cleared before explicitly removing it
Otherwise we'll get an assertion if the object behind the weak pointer
was already destroyed in the meantime as we would pass NULL as first
argument to g_object_remove_weak_pointer().
2019-04-10 10:18:54 +03: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
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
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
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
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 8d3ca40e9d meson: dist get_flex_version.py 2019-02-26 13:24:28 +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