Commit graph

142 commits

Author SHA1 Message Date
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
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
Stéphane Cerveau
c6c6ad2667 meson: update glib minimum version to 2.56
In order to support the symbol g_enum_to_string in various
project using GStreamer ( gst-validate etc.), the glib minimum
version should be 2.56.0.

Remove compat code as glib requirement
is now > 2.56

Version used by Ubuntu 18.04 LTS

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/199>
2020-10-15 18:12:32 +02:00
Xavier Claessens
4095a4b4c5 Meson: Use pkg-config generator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4>
2020-10-12 13:39:17 +00:00
Seungha Yang
74dc8f7678 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/665>
2020-10-12 03:46:54 +00:00
Tim-Philipp Müller
a2cbf75523 Remove unused valgrind detection
Having this just to log a debug message in case we're
running inside valgrind doesn't seem very useful, and
the code that used to use this no longer exists it seems.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/595>
2020-10-11 22:39:51 +00:00
Matthew Waters
e4567b2dbd 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/664>
2020-10-09 12:13:15 +11:00
Seungha Yang
220ce9c3fd 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/626>
2020-09-30 18:51:40 +00:00
Tim-Philipp Müller
f38a43d490 Back to development 2020-09-08 16:58:20 +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
Tim-Philipp Müller
e97c520f06 Release 1.17.90 2020-08-20 16:08:27 +01:00
Stéphane Cerveau
348fe27c7a meson: add a plugin summary
This summary displays a list of plugins which
have been enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/560>
2020-07-22 12:15:36 +02:00
Tim-Philipp Müller
b1a171f912 meson: set release date from .doap file for releases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/555>
2020-07-06 11:34:07 +00:00
Tim-Philipp Müller
f836e267c1 Back to development 2020-07-03 02:03:15 +01:00
Tim-Philipp Müller
61ed49f496 Release 1.17.2 2020-07-03 00:22:35 +01:00
Tim-Philipp Müller
a7472f30c0 Back to development 2020-06-20 00:27:57 +01:00
Tim-Philipp Müller
7113aa3b70 Release 1.17.1 2020-06-19 19:13:37 +01:00
Jan Tojnar
dd2ec3681e
build: Install bash-completion relative to datadir
Since bash-completion 2.9, it was no longer possible to override
the completionsdir through prefix. [1] In 2.10, the overridability
was re-estabilished but this time through datadir variable. [2]

This should not really matter except for developers installing the project
into a custom prefix or distros using per-package prefixes like NixOS.

[1]: 81ba2c7e7d
[2]: https://github.com/scop/bash-completion/pull/344
2020-04-16 15:50:02 +02:00
Matthew Waters
6f9a63a10d gst/systemclock: wait on each entry individually
Problem:
multiple aggregator elements (audiomixer, compositor) in a live
pipeline use a lot of CPU waiting each other up.  This is because
of the previously unused clock entry unscheduling during regular
operation.

Clock entry unscheduling has the potential to wake up every clock entry
waiting using the system clock which may be a large number.

Solution:
Implement waiting per entry and only wakeup the unscheduled entry.

While this may be possible using GCond, theoretically GCond only gives
us microsecond accuracy and uses relative waits in a number of places.
We can unfortunately do better poking at the platform specifics
ourselves by using futexes on linux and pthread on other unix.  Windows
may have a possible implementation using Waitable timers but that is
not implemented here and instead falls back to the GCond implementation.
GCond waits on Windows is still as accurate as the previous GstPoll-based
implementation.
2020-04-16 01:26:59 +00:00
Xavier Claessens
c18f9d4ad4 Meson: Change extra-checks to feature option and make it yielding 2020-04-08 18:41:51 +00:00
Edward Hervey
99901ffab4 registrychunks: Use strnlen if available
When this `_strnlen` internal method was added, strnlen (in glibc)
was not available yet (appeared in 2.10 it was released that same
year).

If available, use the much more optimized strnlen
2020-03-22 10:40:21 +00:00
Sebastian Dröge
6907abdca8 filesink: Check for sys/uio.h so we can actually use writev() 2020-03-20 16:32:07 +02:00
Olivier Crête
b4ba9ec089 systemclock: No need to check for CLOCK_TAI in the meson
POSIX defines CLOCK_MONOTONIC to always be a macro, so I think
it's safe to assume that CLOCK_TAI will also be.
2020-01-27 17:16:14 +00:00
Ederson de Souza
216d6dd0f0 GstSystemClock: Add GST_CLOCK_TYPE_TAI
GST_CLOCK_TYPE_TAI is GStreamer abstraction for CLOCK_TAI. Main
motivation for this patch is support for transmission offloading features
- when network packets are timestamped with the time they are deemed to
be actually transmitted. Linux API for that requires that time to be
in CLOCK_TAI coordinate.

With GST_CLOCK_TYPE_TAI, applications can use CLOCK_TAI directly on
their pipelines, avoiding the need to cross timestamp packet times. By
leveraging system's CLOCK_TAI, applications also don't need to keep track
of leap seconds - less burden for them. Just keep system's CLOCK_TAI
accurate and use it.
2020-01-27 17:16:14 +00:00
Tim-Philipp Müller
35db4a2433 meson: build gir even when cross-compiling if introspection was enabled explicitly
This can be made to work in certain circumstances when
cross-compiling, so default to not building g-i stuff
when cross-compiling, but allow it if introspection was
enabled explicitly via -Dintrospection=enabled.

Fixes #454 and #381.
2019-10-17 19:54:21 +01:00
Sebastian Dröge
533fbf766e registry: Use plugin directory from the build system for relocateable Windows builds
Instead of guessing something based on preprocessor defines and magic.
2019-08-09 07:22:38 +00:00
Nirbheek Chauhan
4ba6898f24 gstinfo: Rework stack trace detection a bit
Ensure that the code paths for HAVE_UNWIND and HAVE_DBGHELP are never
taken at the same time, even if the build file code changes.

Prefer DbgHelp over libunwind on Windows in case both are somehow
available because DbgHelp is only available when building with the
MSVC toolchain, and libunwind won't give us debug symbols from objects
built with the MSVC toolchain.

Also, print slightly more useful messages for the level of stack trace
support enabled, and document what each if conditional does.
2019-07-01 10:36:09 +00:00
Niels De Graef
56d19cbf75 meson: Bump minimal GLib version to 2.44
This means we can use some newer features and get rid of some
boilerplate code using the `G_DECLARE_*` macros.

As discussed on IRC, 2.44 is old enough by now to start depending on it.
2019-06-03 08:51:40 +02:00
Thibault Saunier
a0c65067e0 Port to hotdoc 2019-05-13 16:34:09 -04:00
Thibault Saunier
781ad55f68 doc: Remove gtk-doc support 2019-05-13 11:33:49 -04:00
Tim-Philipp Müller
3124cd602e Back to development 2019-04-19 11:00:06 +01:00
Tim-Philipp Müller
89c221a697 Release 1.16.0 2019-04-19 00:15:22 +01:00
Tim-Philipp Müller
cd7075dcc2 Release 1.15.90 2019-04-11 00:19:12 +01: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
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
673ccfde8b Back to development 2019-03-04 09:01:07 +00:00
Tim-Philipp Müller
0dd0a29c02 Release 1.15.2 2019-02-26 13:24:28 +00:00
Mathieu Duponchelle
57cefb5932 gstinfo: add Windows stacktraces support
This uses the DbgHelp library if available
2019-01-28 14:29:23 +00:00
Seungha Yang
600f4fb65b meson: Correct minimum required GLib version
It's updated to 2.40.0 since the commit 3e8ef4cf5a
2019-01-22 09:04:56 +00:00
Tim-Philipp Müller
6ea4380230 Release 1.15.1 2019-01-17 01:39:04 +00:00
Nicolas Dufresne
e501e2f5c9 libdw support is optional
This was no longer optional, leading to deadcode. This regression was
found trying to fix the unwind variant in cerbero.
2018-11-29 20:56:10 -05:00
Matthew Waters
874ad5faca meson: generate pkg-config files for our plugins 2018-11-05 15:18:41 +00:00
Tim-Philipp Müller
8f761cd711 meson: use new 'python' module instead of deprecated 'python3' one
https://github.com/mesonbuild/meson/pull/4169
2018-10-07 19:58:47 +01:00
Tim-Philipp Müller
57c8e0146f libs: figure out right export define in configure
Add new GST_API_EXPORT in config.h and use that for GST_*_API
decorators instead of GST_EXPORT.

The right export define depends on the toolchain and whether
we're using -fvisibility=hidden or not, so it's better to set it
to the right thing directly than hard-coding a compiler whitelist
in the public header.

We put the export define into config.h instead of passing it via the
command line to the compiler because it might contain spaces and brackets
and in the autotools scenario we'd have to pass that through multiple
layers of plumbing and Makefile/shell escaping and we're just not going
to be *that* lucky.

The export define is only used if we're compiling our lib, not by external
users of the lib headers, so it's not a problem to put it into config.h

Also, this means all .c files of libs need to include config.h
to get the export marker defined, so fix up a few that didn't
include config.h.

This commit depends on a common submodule commit that makes gst-glib-gen.mak
add an #include "config.h" to generated enum/marshal .c files for the
autotools build.

https://bugzilla.gnome.org/show_bug.cgi?id=797185
2018-09-24 08:39:37 +01:00
Seungha Yang
54e498f2d5 meson: Specify encoding to UTF-8 when building with MSVC
Fix build on some non-US locale Windows systems

Error:
  gstreamer/gst/gstdebugutils.c(194): error C2001

https://bugzilla.gnome.org/show_bug.cgi?id=797186
2018-09-21 18:37:09 +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
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
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
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