Commit graph

17241 commits

Author SHA1 Message Date
Sebastian Dröge 6b9e70d193 device: Fix typo
paramater -> parameter
2016-06-15 16:12:36 +02:00
Tim-Philipp Müller 09d5ff4097 info: flesh out GST_PTR_FORMAT docs a bit 2016-06-14 19:16:33 +01:00
Sebastian Dröge b9a4a2a952 basesink: Update start time when losing state only if we were in PLAYING
If we were in PAUSED, the current clock time and base time don't have much to
do with the running time anymore as the clock might have advanced while we
were PAUSED. The system clock does that for example, audio clocks often don't.

Updating the start time in PAUSED will cause a) the wrong position to be
reported, b) step events to step not just the requested amount but the amount
of time we spent in PAUSED. The start time should only ever be updated when
going from PLAYING to PAUSED to remember the current running time (to be able
to compensate later when going to PLAYING for the clock time advancing while
PAUSED), not when we are already in PAUSED.

Based on a patch by Kishore Arepalli <kishore.arepalli@gmail.com>

The updating of the start time when the state is lost was added in commit
ba943a82c0 to fix the position reporting when
the state is lost. This still works correctly after this change.

https://bugzilla.gnome.org/show_bug.cgi?id=739289
2016-06-13 20:20:44 +02:00
Sebastian Dröge 37713c3388 pad: Log pad offsets as signed times 2016-06-11 22:18:22 +03:00
Sebastian Dröge da46fe236b pad: Also check the number of segment events and if other serialized events and queries trigger segment updating too
https://bugzilla.gnome.org/show_bug.cgi?id=765049
2016-06-11 21:57:00 +03:00
Sebastian Dröge c8cae6a94b pad: Add unit test for pad offset handling on src pads
https://bugzilla.gnome.org/show_bug.cgi?id=765049
2016-06-11 21:40:15 +03:00
Sebastian Dröge 8c7da1d426 adapter: Rename functions and implement new functions, update test
We don't do calculations with different units (buffer offsets and bytes)
anymore but have functions for:
1) getting the number of bytes since the last discont
2) getting the offset (and pts/dts) at the last discont

and the previously added function to get the last offset and its distance from
the current adapter position.

https://bugzilla.gnome.org/show_bug.cgi?id=766647
2016-06-10 09:49:33 +03:00
Edward Hervey 67ae0ad225 adapter: Add methods to query current offset
API: gst_buffer_prev_offset
API: gst_buffer_get_offset_from_discont

The gst_buffer_get_offset_from_discont() method allows retrieving the current
offset based on the GST_BUFFER_OFFSET of the buffers that were pushed in.

The offset will be set initially by the GST_BUFFER_OFFSET of
DISCONT buffers, and then incremented by the sizes of the following
buffers.

The gst_buffer_prev_offset() method allows retrievent the previous
GST_BUFFER_OFFSET regardless of flags. It works in the same way as
the other gst_buffer_prev_*() methods.

https://bugzilla.gnome.org/show_bug.cgi?id=766647
2016-06-10 09:49:33 +03:00
Tim-Philipp Müller 665de91347 gstconfig.h.in: indent #if #else jungle for better readability 2016-06-09 17:48:40 +01:00
Sebastian Dröge 1dbb27f3a7 utils: Add gst_pad_link_maybe_ghosting() for consistency
We already had a _full() version, but having that alone seems inconsistent.
Add a non-full version that mirrors the behaviour of gst_pad_link() vs
gst_pad_link_full().
2016-06-08 12:12:28 +03:00
Edward Hervey ea395c2498 baseparse: Make sure DISCONT flags are properly propagated
If we drop a frame that contained a discontinuity, we must remember
that for the next frame that *will* be pushed downstream.

https://bugzilla.gnome.org/show_bug.cgi?id=766795
2016-06-07 09:42:39 +02:00
Tim-Philipp Müller 56b9290073 deviceprovider: remove base_class_finalize function
It's not going to get called anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=765540
2016-06-04 13:35:12 +01:00
Tim-Philipp Müller 38c74e41c7 element: remove base_class_finalize_func which is never called
Won't be called for static types, so no point keeping it around.

https://bugzilla.gnome.org/show_bug.cgi?id=765540
2016-06-04 13:11:55 +01:00
Tim-Philipp Müller 6446a1a45c tracers: leaks: some micro-optimisations
- we know number of filter items is not going to change,
  but compiler doesn't

- only do GST_IS_TRACER check for GObjects, not mini objects

- use non-type check cast macros in performance critical paths
2016-06-03 14:03:25 +01:00
Guillaume Desmottes 0bb7fa9855 tracers: add leaks tracer
https://bugzilla.gnome.org/show_bug.cgi?id=765052
2016-06-03 00:36:46 +01:00
Guillaume Desmottes 4a41468ce7 Use MAY_BE_LEAKED_FLAG
This helps having "make check" passing with the leaks tracer enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=766008
2016-06-02 23:14:15 +01:00
Guillaume Desmottes 21070c8114 tracing: add hooks when objects or miniobjects are created and destroyed
https://bugzilla.gnome.org/show_bug.cgi?id=765052
2016-06-02 23:10:44 +01:00
Guillaume Desmottes 194964b4e0 gst_deinit: move down tracers cleaning
We want the tracer detecting leaks to be finalized as late as possible
to give the chance to other gst components to be properly cleaned first.

https://bugzilla.gnome.org/show_bug.cgi?id=765052
2016-06-02 23:08:04 +01:00
Guillaume Desmottes d479eefde0 tests: plugin: remove feature refcount assert
This check fails if one, or more, tracers are loaded while running the
test. The new "leaks" tracer will be able to check for leaks anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=765052
2016-06-02 23:05:34 +01:00
Guillaume Desmottes aa336008b3 tracerrecord: allow G_TYPE_POINTER for field types
Tracers may want to display the address of an object.

https://bugzilla.gnome.org/show_bug.cgi?id=765052
2016-06-02 22:53:28 +01:00
Stefan Sauer f2fd3bda2b gstobject: split up name tests
It is better to have separate tests:
1) the test name will tell what is broekn when the test fails
2) we still run the other tests when one assert fails
3) the tests are easier to understand
4) we don't rely on sie effect of previous actions
5) ...

Also ix the assertion message for the name checks (Gst -> fakeobject).
2016-05-30 13:45:02 +02:00
Stefan Sauer 1385e24bc6 design: update design doc
Some of the api was renamed before the merge.
2016-05-30 02:06:01 -07:00
Stefan Sauer b23cb42ae9 docs: xref the free function and expand allocation query docs
Add xrefs for how to parse pool details from an allocation query.
2016-05-30 02:04:18 -07:00
Nicolas Dufresne 850510f9e8 object: Add _set_name() test on parented object
This is not allowed, and set_name() should fail.

https://bugzilla.gnome.org/show_bug.cgi?id=766923
2016-05-26 15:36:52 -04:00
Nicolas Dufresne 1a5f79981c object: Check that name change are notified once
GObject allow calling g_object_notify() within set_property() and
won't notify it twice. As it was raised during review, add a unit test to
make sure.

https://bugzilla.gnome.org/show_bug.cgi?id=766923
2016-05-26 15:36:21 -04:00
Nicolas Dufresne 446778464b object: Notify name change when using _set_name()
There was a 0.11 FIXME about notifying the name change or removing that
function. Clearly we can't remove this function, so let's notify it.

https://bugzilla.gnome.org/show_bug.cgi?id=766923
2016-05-26 15:36:05 -04:00
Edward Hervey 6bfb88b410 gst_private: Fix gstconfig include
Since it's a generated header, we need to specify the gst subdir so
that it gets properly included in out-of-dir compilation
2016-05-25 15:31:52 +02:00
Tim-Philipp Müller 5628f7ea73 gst: make sure to include gstconfig.h also in gst_private.h
For GST_EXPORT define and also things like GST_DISABLE_REGISTRY.
Hopefully fixes the following build failure on cerbero-cross-mingw32:
helpers/gst-plugin-scanner.c:50: undefined reference to `_imp___gst_disable_registry_cache'
2016-05-25 10:48:05 +01:00
Tim-Philipp Müller 0274650e42 g-i: pass compiler env to g-ir-scanner
It's what introspection.mak does as well. Should
fix spurious build failures on gnome-continuous.
2016-05-24 00:40:27 +01:00
Tim-Philipp Müller af47500d12 gst: g-i: pass compiler with quotes
So CC="ccache gcc" works properly.
2016-05-23 21:15:48 +01:00
Ray Strode 4152f266f7 gst: attempt to fix/track-down mysterious gnome-continuous build failures 2016-05-23 21:08:07 +01:00
Tim-Philipp Müller e0de5ed915 iterator: only unset GValue if it was inited
And add some function guards. From GLib 2.48 on it is
allowed to pass an uninitialised GValue to g_value_unset().

https://bugzilla.gnome.org/show_bug.cgi?id=763762
2016-05-23 18:09:48 +01:00
Nirbheek Chauhan 1c8711816e gst/parse: Also pass -DGST_EXPORTS here
This static library gets included directly into libgstreamer-1.0.so, so it needs
the same GST_EXPORTS definition as the rest of the code that's compiled into
that otherwise it will try to find the constants it uses from gstinfo via DLL
importing (__declspec(dllimport)).

Fixes https://ci.gstreamer.net/job/cerbero-cross-mingw32/4393/
2016-05-23 14:24:16 +01:00
Nirbheek Chauhan 161eee6694 gstconfig.h: Always use dllexport/import on Windows
__declspec(dllexport/import) are supported by GCC and are needed for
properly generating code that fetches the values of constants from DLLs
built with __declspec(dllexport) which happens when anything using
GST_EXPORT is built with MSVC.

See: https://msdn.microsoft.com/en-us/library/619w14ds.aspx

Essentially, if you built gstreamer with MSVC and then tried to use
constants from it (such as GST_TYPE_CAPS) in a plugin, GCC would
retrieve the address of the value instead of the value itself.
2016-05-23 12:13:53 +01:00
Danilo Cesar Lemes de Paula 603b8188bb scripts: make git-update.sh build with all cores available
The git-update.sh now builds with all cores available. In case of
failure it defaults to 1

The developer can still override this by setting -j to something else
in MAKEFLAGS, as stated by 299605dfe2.

https://bugzilla.gnome.org/show_bug.cgi?id=766666
2016-05-20 11:57:25 +01:00
Guillaume Desmottes 56ee365077 (mini)object: add MAY_BE_LEAKED flag
https://bugzilla.gnome.org/show_bug.cgi?id=766008
2016-05-20 09:11:08 +01:00
Tim-Philipp Müller ef1444cfe4 bin: emit deep-element-{added,removed} for children of newly-added/removed bin
https://bugzilla.gnome.org/show_bug.cgi?id=578933
2016-05-16 09:10:09 +01:00
Tim-Philipp Müller 81dec8cc4d bin: add "deep-element-added" and "deep-element-removed" signals
This means applications and bin sub-classes can easily track when
a new child element is added to the pipeline sub-hierarchy or
removed.

Currently doesn't signal deep added/removed for elements inside
a bin if a bin is added/removed.

https://bugzilla.gnome.org/show_bug.cgi?id=578933
2016-05-16 09:10:09 +01:00
Sebastian Dröge edb27a8ec2 pad: Improve IDLE probe docs
Make it explicit that the pad is only blocked while the callback is running,
and the pad will be unblocked again once the callback returned.

If BLOCK and IDLE behaviour is needed, both need to be used.

https://bugzilla.gnome.org/show_bug.cgi?id=766002
2016-05-15 15:02:49 +03:00
Sebastian Dröge 4f699387b0 docs: Update for git master 2016-05-15 13:29:55 +03:00
Sebastian Dröge 722ad08733 queue: Only unblock upstream waiting for the query once downstream is finished
... when flushing and deactivating pads. Otherwise downstream might have a
query that was already unreffed by upstream, causing crashes or other
interesting effects.

https://bugzilla.gnome.org/show_bug.cgi?id=763496
2016-05-15 11:06:08 +03:00
Sebastian Dröge d184e7a9a0 basesink/src: Post an error message if ::start() fails
The subclass should do that already, but just in case do it ourselves too as a
fallback. Without this, e.g. playbin will just wait forever if this fails
because it is triggered as part of an ASYNC state change.
2016-05-15 11:04:25 +03:00
Jan Schmidt 174a5e93e2 bin: Fix EOS forwarding on PLAYING->PLAYING
When doing a transition from PLAYING to PLAYING, we will fail
to forward an EOS message on the bus, and noone else will ever
send it because there'll be no actual state changed message.

Allow EOS through directly in that case.
2016-05-14 23:46:47 +10:00
Edward Hervey 794944f779 pad: Don't drop LATENCY queries with default implementation
If there is only one pad in the internal pads, when folding for
LATENCY queries it will just drop the response if it's not live.

This is maybe not the proper fix, but it will just accept the first
peer responses, and if there are any other pads, it will only take
them into account if the response is live.

This *should* properly handle the aggregation/folding behaviour of
multiple live peer responses, while at the same time handling the
simple one-pad-only-and-forward use-case

https://bugzilla.gnome.org/show_bug.cgi?id=766360
2016-05-13 11:36:12 +02:00
Jan Schmidt 9e23670671 Update the examples in the gst-launch-1.0 manpage
Replace elements that don't exist any more with ones
that do, and insert elements like mpegaudioparse where
they are needed.

https://bugzilla.gnome.org/show_bug.cgi?id=727105
2016-05-13 18:05:39 +10:00
Jan Schmidt fe3180dcca debug: Instantiate GType when dumping debug categories.
A lot of debug categories are declared in element class_init
functions, which don't get run until the element is first created
(not just registered in the plugin load function). This means
that --gst-debug-help doesn't print out a lot of categories.

Creating an instance of each element from the element factory
makes them visible, at some extra cost - 2-3 times longer, which can
be a full second or two of extra waiting. Yikes!

https://bugzilla.gnome.org/show_bug.cgi?id=741001
2016-05-13 18:05:39 +10:00
Sebastian Dröge 5e43ee5989 typefind: Only push a CAPS event downstream if the sinkpad is not in PULL mode
The other signal handlers of the type-found signal might have reactivated
typefind in PULL mode already, pushing a CAPS event at that point would cause
deadlocks and is in general unexpected by elements that are in PULL mode.

https://bugzilla.gnome.org/show_bug.cgi?id=765906
2016-05-11 15:06:39 +03:00
Wonchul Lee 58f964da96 debugutils: fix warning on enum properties printing
https://bugzilla.gnome.org/show_bug.cgi?id=766251
2016-05-11 10:02:49 +03:00
Sebastian Dröge 14f71d2e27 pad: Fix pad state when deactivating from one mode and then trying to activate another and failing
When activating a pad in PULL mode, it might already be in PUSH mode. We now
first try to deactivate it from PUSH mode and then try to activate it in PULL
mode. If the activation fails, we would set the pad to flushing and set it
back to its old mode. However the old mode is wrong, the pad is not in PUSH
mode anymore but in NONE mode.

This fixes e.g. typefind in decodebin reactivating PUSH/PULL mode if upstream
actually fails to go into PULL mode after first PUSHING data to typefind.
2016-05-10 15:07:51 +03:00
Anthony G. Basile c9da8b0e7f libcompat.h: strsignal() should be not be decleared const
POSIX standards requires strsignal() to return a pointer to a char,
not a const pointer to a char. [1]  On uClibc, and possibly other
libc's, that do not HAVE_DECL_STRSIGNAL, libcompat.h declares
const char *strsignal (int sig) which causes a type error.

[1] man 3 strsignal

https://bugzilla.gnome.org/show_bug.cgi?id=763567
2016-05-07 11:54:54 +01:00