Commit graph

3163 commits

Author SHA1 Message Date
Jan Schmidt
6fcd3c135a ptpclock: Add TRACE level debug output
Add some debugging to be able to tell what is happening
inside the PTP clock protocol handling.
2018-10-11 22:11:51 +11:00
Tim-Philipp Müller
135932872e aggregator: document new "min-upstream-latency" property is in nanosecs
https://bugzilla.gnome.org/show_bug.cgi?id=797213
2018-10-04 00:30:52 +01:00
Vivia Nikolaidou
22d0f40716 queuearray: Add set_clear_func and clear functions
gst_queue_array_clear will clear the GstQueueArray,
gst_queue_array_set_clear_func will set a clear function for each
element to be called on _clear and on _free.

https://bugzilla.gnome.org/show_bug.cgi?id=797218
2018-09-27 19:32:54 +03:00
Mathieu Duponchelle
62d7eaf3aa aggregator: add gtk-doc blurb for new min-upstream-latency prop 2018-09-27 13:20:10 +02:00
Mathieu Duponchelle
97e2e7a63d aggregator: add min-upstream-latency property.
This is exposed as a solution to the use case of plugging in
sources with a higher latency after the aggregator has started
playing with an initial set of sources, allowing to avoid resyncing.

https://bugzilla.gnome.org/show_bug.cgi?id=797213
2018-09-27 12:56:47 +02:00
Tim-Philipp Müller
50c32da91f meson: use library() for libgstcheck instead of always building a shared lib
Otherwise we try to build a shared lib when we build the rest
of GStreamer statically, which won't work because we pass
-DGST_STATIC_COMPILATION when building statically, which means
we won't dllimport public symbols from our libs which means
that on Windows the unit tests will fail to link to libgstcheck.

https://bugzilla.gnome.org/show_bug.cgi?id=797185
2018-09-24 08:39:39 +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
Tim-Philipp Müller
46ed0f0489 libs: fix 'inconsistent DLL linkage' warnings on Windows
For each lib we build export its own API in headers when we're
building it, otherwise import the API from the headers.

This fixes linker warnings on Windows when building with MSVC.

The problem was that we had defined all GST_*_API decorators
unconditionally to GST_EXPORT. This was intentional and only
supposed to be temporary, but caused linker warnings because
we tell the linker that we want to export all symbols even
those from externall DLLs, and when the linker notices that
they were in external DLLS and not present locally it warns.

What we need to do when building each library is: export
the library's own symbols and import all other symbols. To
this end we define e.g. BUILDING_GST_FOO and then we define
the GST_FOO_API decorator either to export or to import
symbols depending on whether BUILDING_GST_FOO is set or not.
That way external users of each library API automatically
get the import.

https://bugzilla.gnome.org/show_bug.cgi?id=797185
2018-09-23 23:23:01 +01:00
Mathieu Duponchelle
17798bca6d aggregator: define autoptr cleanup functions 2018-09-20 16:22:17 +02:00
Nirbheek Chauhan
cbd02b9584 meson: Always use a dependency object for dependencies
Fixes a configure error with gst-build:

subprojects/gst-plugins-base/meson.build:235:2: ERROR:  Fetched variable 'gst_check_dep' in the subproject 'gstreamer' is not a dependency object.
2018-09-05 16:33:43 +05:30
Philippe Normand
d7c87910c2 baseparse: avg_bitrate calculation critical warning fix
The avg_bitrate is an unsigned int, so the gst_util_uin64_scale() function can't
be used for it, as it expects signed integers for the fraction parts arguments.

https://bugzilla.gnome.org/show_bug.cgi?id=797054
2018-08-31 15:35:35 +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
Tim-Philipp Müller
04deaac7a4 check: testclock: fix deprecation guards
Make our own deprecation marker for libgstcheck,
since the function declaration must contain the
right API export decorator (GST_CHECK_API) and
not the one for GStreamer core.
2018-08-26 11:45:58 +02:00
Tim-Philipp Müller
f7b5151b58 bitwriter: fix compiler warning
Don't return a value from a function that doesn't
return a value using the returned value from a
function that also doesn't return a value.

gstbitwriter.h(265): warning C4098: 'gst_bit_writer_align_bytes_unchecked': 'void' function returning a value
2018-08-26 11:45:58 +02:00
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
Sebastian Dröge
49d212e908 aggregator: Fixup for previous commit to prevent infinite loop if no events are pending 2018-08-14 12:30:19 +03:00
Sebastian Dröge
08bd835f09 aggregator: Return an error directly if negotiation of a sink pad failed
And don't give buffers to subclasses in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=796951
2018-08-14 10:23:23 +03:00
Tim-Philipp Müller
de8fe283d6 autotools: stop controlling symbol visibility with -export-symbols-regex
Instead, use -fvisibility=hidden and explicit exports via GST_EXPORT.
This should result in consistent behaviour for the autotools and
Meson builds where this is done already, and will allow us to drop
the win32 .def files.
2018-08-12 23:26:25 +01:00
Tim-Philipp Müller
88bd7c61a7 bitwriter: fix g-i scanner warning
gstbitwriter.h:45: Warning: GstBase: "@bit_capacity" parameter unexpected at this location:
 * @bit_capacity: Capacity of the allocated @data
2018-08-12 20:07:02 +01:00
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
Tim-Philipp Müller
6d34f57cb6 meson: add option to disable build of GStreamer unit test library 2018-08-10 01:23:35 +01:00
Sebastian Dröge
c31ef7fa51 typefindhelper: Mark gst_type_find_helper_get_range_full() as Since 1.14.3 2018-08-02 10:57:28 +03:00
Sebastian Dröge
41f1a40704 typefind: Add new gst_type_find_helper_get_range_full() that returns flow return
And make use of it in the typefind element. It's useful to distinguish
between the different errors why typefinding can fail, and especially to
not consider GST_FLOW_FLUSHING as an actual error.

https://bugzilla.gnome.org/show_bug.cgi?id=796894
2018-08-01 14:23:04 +03:00
Mathieu Duponchelle
27f53141e2 aggregator: annotate GstAggregatorClass::update_src_caps 2018-07-27 23:22:59 +02:00
Sebastian Dröge
a569347789 aggregator: Don't leak peer pad of inactive pads when (not) forwarding QoS events to them 2018-07-26 02:32:57 +03:00
Nirbheek Chauhan
c80a1fd64c meson: host_machine.system() is darwin even on iOS
Also use host_system everywhere.
2018-07-25 16:02:06 +05:30
Nirbheek Chauhan
38ec95460f meson: Don't add static printf library to executables
They should only need to link to libgstreamer.
2018-07-25 16:02:06 +05:30
Sebastian Dröge
7bee79426d typefindhelper: Mark extension in gst_type_find_helper_get_range() as allow-none
It always allowed NULL and even said so in the documentation.
2018-07-25 01:12:49 +03:00
Sebastian Dröge
d196b0b904 typefind: Add _with_extension() variants for typefinding data or a buffer
And make use of that in the typefind element to also be able to make use
of the extension in push mode. It previously only did that in pull mode
and this potentially speeds up typefinding and might also prevent false
positives.

https://bugzilla.gnome.org/show_bug.cgi?id=796865
2018-07-25 01:12:11 +03:00
Thibault Saunier
1f3ef7aa01 basetransform: Do not check if NULL is an emtpy caps
gst_base_transform_transform_caps can return NULL in various conditions
thus we should not treat its result as valid caps.

In all other places NULL is properly handled.
2018-07-18 21:18:56 -04:00
Olivier Crête
4f3aea316a sink: Only add processing latency if upstream is live
Only add it if upstream is live, otherwise leave the latency at 0.

https://bugzilla.gnome.org/show_bug.cgi?id=640610
2018-07-16 13:04:44 -04:00
Thibault Saunier
b4d93abb24 basesink: Minor GI warning fix. 2018-07-13 08:52:55 -04:00
Thibault Saunier
8f76257ac0 check: Add a fail_unless_equals_clocktime macro for convenience 2018-07-08 20:56:16 -04:00
Olivier Crête
a7f9c80220 basesink: Add processing deadline
The processing deadline is the acceptable amount of time to process the media
in a live pipeline before it reaches the sink. This is on top of the algorithmic
latency that is normally reported by the latency query. This should make
pipelines such as "v4lsrc ! xvimagesink" not claim that all frames are late
in the QoS events. Ideally, this should replace max_lateness for most applications.

https://bugzilla.gnome.org/show_bug.cgi?id=640610
2018-07-07 09:05:26 -04:00
Bastian Köcher
cd3e55c38e gstreamer: fix install dir for configure files
Nixos installs into a non-standard includedir.

https://bugzilla.gnome.org/show_bug.cgi?id=794856
2018-07-07 12:42:17 +02:00
Tim-Philipp Müller
2db8e3705f Update for g_type_class_add_private() deprecation in recent GLib
https://gitlab.gnome.org/GNOME/glib/merge_requests/7
2018-06-24 12:49:14 +02:00
Edward Hervey
d34f046029 baseparse: Ensure seqnum consistency
We need all relevant events of a segment to have consistent seqnum:
* GST_EVENT_SEGMENT
* GST_EVENT_EOS

If we are push-based and create a new segment, use the same seqnum
as the upstream event.

If we are pull-based, use the seqnum of that newly created segment
event everywhere
2018-06-05 17:02:18 +02:00
Mike Wey
51b97d7403 dataqueue: add some missing introspection annotations
https://bugzilla.gnome.org/show_bug.cgi?id=796488
2018-06-03 19:42:17 +01:00
Edward Hervey
dfe5467209 baseparse: Documentation improvements
* Remove references to old functions and methods
* Use proper #ClassName.vmethod() decorator for vmethod
2018-05-30 14:06:06 +02:00
Olivier Crête
05298b3093 aggregator: Add get_next_time function for live streams
Add a function to do the right thing for live streams.

https://bugzilla.gnome.org/show_bug.cgi?id=795486
2018-05-16 18:13:04 +02:00
Edward Hervey
80dfb7bb3f gst: Use memcpy() instead of strncpy() where appropriate
strncpy() is assumed to be for strings so the compiler assumes that
it will need an extra byte for the string-terminaning NULL.

For cases where we know it's actually "binary" data, just copy it
with memcpy.

https://bugzilla.gnome.org/show_bug.cgi?id=795756
2018-05-07 17:05:36 +02:00
Seungha Yang
69ddcc175f bitwriter: Fix build error
Fix implicit-function-declaration warning for meemst and memcpy

gstbitwriter.h:166:3: error: implicit declaration of function ‘memset’
   memset (bitwriter->data + clear_pos, 0, (new_bit_size >> 3) - clear_pos);
   ^

https://bugzilla.gnome.org/show_bug.cgi?id=795867
2018-05-07 08:35:47 +02:00
Wind Yuan
fb4fc8fc09 bitwriter: Add a generic bit writer
GstBitWriter provides a bit writer that can write any number of
bits into a memory buffer. It provides functions for writing any
number of bits into 8, 16, 32 and 64 bit variables.

https://bugzilla.gnome.org/show_bug.cgi?id=707543
2018-05-06 17:05:21 +02:00
Nirbheek Chauhan
4fb02fc85b meson: Update option names to omit disable_ and with- prefixes
Also yield common options to the outer project (gst-build in our case)
so that they don't have to be set manually.
2018-05-05 20:30:43 +05:30
Tim-Philipp Müller
583a4677af aggregator: since marker for new API
Was also backported.

https://bugzilla.gnome.org/show_bug.cgi?id=795332
2018-05-05 12:10:39 +02:00
luz.paz
98200ddd8d Source code typo fixes
https://bugzilla.gnome.org/show_bug.cgi?id=795610
2018-05-01 11:25:21 +01:00
luz.paz
4a402c1c7d Fix typos in comments and docs
Found via `codespell`

https://bugzilla.gnome.org/show_bug.cgi?id=795610
2018-05-01 11:18:03 +01:00
Olivier Crête
96c3a635ce aggregator: Improve doc for gst_aggregator_pad_has_buffer 2018-04-25 14:30:04 -04:00
Olivier Crête
dda9a99989 aggregator: Add API to check if a pad has a new buffer
https://bugzilla.gnome.org/show_bug.cgi?id=795332
2018-04-25 14:20:19 -04:00
Xavier Claessens
b00b1d5361 Meson: Use library() to build both static and shared libs
Meson supports building both static and shared libraries in a single
library() call. It has the advantage of reusing the same .o objects and
thus avoid double compilation.

https://bugzilla.gnome.org/show_bug.cgi?id=794627
2018-04-25 00:40:30 +01:00