Commit graph

210 commits

Author SHA1 Message Date
Stéphane Cerveau 77ffed293f identity: provide a log to check the buffers
In order to not rely only on app to display the
message from identity, display the message in the logs
too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/863>
2021-08-03 09:47:12 +00:00
Stéphane Cerveau 783e19b04c coreelements: allow per features registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661>
2020-12-10 12:45:16 +01:00
Bing Song e5e27010c8 identity/clocksync: Also provide system clock if sync=false
identity should provide when sync=true. Don't provide when sync=false.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/630

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/690>
2020-11-04 09:27:53 +00:00
Olivier Crête 3d5c849a6c identity: Add a stats property
This is inspired by the stats on rtpjitterbuffer, it's useful
to be able to get some simple stats out of the pipeline without having
to write yet another pad probe.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/615>
2020-10-16 15:43:56 +00:00
Mathieu Duponchelle d46e902273 identity, clocksync: implement provide_clock
Since those are using the clock for sync, they need to also
provide a clock for good measure. The reason is that even if
downstream elements provide a clock, we don't want to have
that clock selected because it might not be running yet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/509>
2020-06-05 11:28:12 +00:00
Thibault Saunier cb212c9fd7 identity: Handle seeking with single_segment=True
Identity was ignoring seek and flush events even when using
a single segment. In the end it means that we couldn't compute
buffers running-time and stream time after seeks.

This commits adds support for flushing seeks only as I have no idea
what to do for non flushing ones.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/450>
2020-05-06 14:24:36 +00:00
Thibault Saunier b517b59171 identity,clocksync: Fix timestamping inside single segment in reverse playback
In reverse playback, buffers are played back from buffer.stop
(buffer.pts + buffer.duration) to buffer.pts running times which
mean that we need to use the buffer end running time as a buffer
timestsamp, not the buffer pts when using a single segment in reverse
playback.

This is now being tested in
`validate.test.identity.reverse_single_segment`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/450>
2020-05-06 14:24:36 +00:00
Stéphane Cerveau 0b1c2f715a identity: Fix a minor leak using meta_str 2020-03-13 12:14:08 +01:00
Sebastian Dröge be8a15b0f9 identity: Use g_cond_signal() instead of g_cond_broadcast()
There can only be a single waiter: on the streaming thread.
2020-03-09 21:31:48 +02:00
Sebastian Dröge c7ddc5eb79 identity: Unblock condition variable on FLUSH_START
... and immediately return FLUSHING from the streaming thread instead of
waiting potentially forever.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/516
2020-03-09 20:27:58 +02:00
Niels De Graef 4812c4087f Don't pass default GLib marshallers for signals
By passing NULL to `g_signal_new` instead of a marshaller, GLib will
actually internally optimize the signal (if the marshaller is available
in GLib itself) by also setting the valist marshaller. This makes the
signal emission a bit more performant than the regular marshalling,
which still needs to box into `GValue` and call libffi in case of a
generic marshaller.

Note that for custom marshallers, one would use
`g_signal_set_va_marshaller()` with the valist marshaller instead.
2019-09-09 12:16:24 +00:00
Nicolas Dufresne 86b9f78788 identity: Non-live upstream have no max latency
sync=TRUE implementation changes the latency query of a non-live
upstream into live, though it wrongly set the upstream max latency to 0.
As non-live sources won't loose data if we wait longer, this should have
been reported as have no max latency limite (-1).
2019-07-19 22:12:29 -04:00
Philippe Normand be56bd9aff identity: Fix the ts-offset property getter
Previous code was a copy/paste from the property setter function.
2019-07-11 17:53:53 +01:00
Jonny Lamb 63170d52ae identity: fixes to the eos-after and error-after properties
I copied `error-after` to make the `eos-after` property, but it turned
out there were some problems with that one, so this patch: adds
separate counters (so setting to NULL and reusing the element will
still work); clarifies the properties' min values; and reports an
error when both are set.
2018-12-18 22:55:28 +00:00
Jonny Lamb 460c0edbfb identity: add eos-after property
Using `num-buffers` can be unpredictable as buffer sizes are often
arbitrary (filesrc, multifilesrc, etc.). The `error-after` property on
`identity` is better but obviously reports an error afterwards. This
adds `eos-after` which does exactly the same thing but reports EOS
instead.
2018-12-11 21:14:11 +00:00
Reynaldo H. Verdejo Pinochet 402159fb88 Use proper GtkDoc notation for NULL/FALSE/TRUE 2017-10-03 13:54:25 -07:00
Nicolas Dufresne 2cc5c539a3 identity: Add a drop-allocation property
When enabled, this property will make the allocation query fail. This is
the same as one could have done using a tee before the tee started
implementing the allocation query.

https://bugzilla.gnome.org/show_bug.cgi?id=730758
2017-09-06 10:03:20 -04:00
Sebastian Dröge 82ed369991 identity: Return FLUSHING instead of EOS and don't start waiting for anything if currently flushing
Otherwise we might try unscheduling a clock id (that does not exist
yet), then the streaming thread waits for id and the state change never
continues because the streaming thread is blocked.

Also shutting down and flushing and similar should return FLUSHING, not
EOS. The stream is not over, we're just not accepting any buffers
anymore.
2017-08-16 22:50:49 +03:00
Thibault Saunier a87b4551a6 Port gtk-doc comments to their equivalent markdown syntax
Modernizing our documentation and preparing a possible move to hotdoc.
This commits also adds missing @title metadatas to all SECTIONs
2017-01-27 16:36:38 -03:00
Jan Schmidt 0528645f7c identity: Add ts-offset property.
Add a property to delay or advance sync time
when sync=true, with the same behaviour as
the ts-offset property in basesink
2017-01-16 09:40:25 +11:00
Tim-Philipp Müller cf7cfb0a0e fakesink, identity: print metas attached to buffer in silent=false mode 2016-12-05 20:29:25 +00:00
Tim-Philipp Müller cf0680017e elements: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=762778
2016-02-28 13:10:07 +00:00
Sebastian Dröge e953f20786 identity: Add a " " after pts: in the silent=false output 2016-02-25 14:12:00 +02:00
Edward Hervey 555df9d614 plugins: Check return values of gst_buffer_map()
They can fail for various reasons.

For non-fatal cases (such as the dump feature of identiy and fakesink),
we just silently skip it.

For other cases post an error message.

https://bugzilla.gnome.org/show_bug.cgi?id=728326
2016-02-23 17:30:45 +01:00
Aleix Conchillo Flaqué 2c238705a1 identity: add drop-buffer-flags property
New property drop-buffer-flags that will discard buffers that have the
given flags set.

https://bugzilla.gnome.org/show_bug.cgi?id=751182
2015-11-13 07:37:12 -08:00
Havard Graff ee63702d61 identity: refactor and add tests using GstHarness
Writing a test for unscheduling the gst_clock_id_wait inside the
identity element, found an invalid read, caused by removing the clock-id
when calling _unschedule instead of letting the code calling _wait remove
the clock-id after being unscheduled.

https://bugzilla.gnome.org/show_bug.cgi?id=752055
2015-07-07 13:05:34 +03:00
Olivier Crête d1620f1c2e identity: Also synchronize GAP events in sync=1
https://bugzilla.gnome.org/show_bug.cgi?id=601853
2015-04-27 12:27:40 -04:00
Olivier Crête 5ea338907c identity: With sync=true, don't pre-roll
To act like a real live element, block the streaming when paused, and
return NO_PREROLL.

https://bugzilla.gnome.org/show_bug.cgi?id=601853
2015-04-27 12:27:40 -04:00
Olivier Crête 7807296afd identity: Take upstream latency into account for sync=1
https://bugzilla.gnome.org/show_bug.cgi?id=601853
2015-04-27 12:27:40 -04:00
Olivier Crête f2992654ca identity: Handle PTS and DTS separately
https://bugzilla.gnome.org/show_bug.cgi?id=601853
2015-04-27 12:27:40 -04:00
Vincent Penquerc'h 0bd45dc401 identity: send gap events when dropping buffers 2015-01-14 10:52:40 +00:00
Sebastian Dröge 154eefecc9 Don't compare booleans for equality to TRUE and FALSE
TRUE is 1, but every other non-zero value is also considered true. Comparing
for equality with TRUE would only consider 1 but not the others.

Also normalize booleans in a few places.
2014-12-01 09:51:37 +01:00
Stefan Sauer 9a66e3169f identity: include the actual delta in the message
Including the actual delta in the message makes it easy to see, if the new
buffer is behind or ahead and how much.
2014-10-20 16:39:38 +02:00
Sebastian Dröge b5936efc98 identity: Proxy the accept-caps query
We always work in passthrough mode so there's no point in doing
something more clever in basetransform. Also the basetransform
code leads to problems with incomplete caps and downstream
elements that use GST_PAD_FLAG_ACCEPT_INTERSECT.

https://bugzilla.gnome.org/show_bug.cgi?id=732559
2014-07-01 19:19:43 +02:00
Vincent Penquerc'h a8ca56b42d gstbuffer: factor three flags-to-string loops 2014-06-04 12:30:36 +01:00
Vincent Penquerc'h 557bb0de16 identity: add static and const where appropriate 2014-06-03 15:36:15 +01:00
Vincent Penquerc'h 1e063bc6e6 identity: fix potential buffer overflow
Coverity 1037155
2014-06-03 15:36:11 +01:00
Tim-Philipp Müller 3c966d060d fakesink, identity, fakesrc: fix debug printing if TAG_MEMORY buffer flag
The IN_CAPS flag does not exist any more.
2014-03-06 20:40:46 +00:00
Sebastian Rasmussen 53ae1b2c9c docs: Fix typos in function/object descriptions
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=720029
2013-12-07 17:11:12 +00:00
Wim Taymans fac7eb0a50 NEWSEGMENT -> SEGMENT 2012-12-14 15:24:30 +01:00
Tim-Philipp Müller 666c8c11c6 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 20:44:48 +00:00
Mark Nauwelaerts b14a3ad4ef identity: retimestamp both pts and dts when doing so 2012-09-26 10:55:47 +02:00
Mark Nauwelaerts 8e98ce54e1 identity: also track and store segment info in single segment mode 2012-09-25 15:06:43 +02:00
Mark Nauwelaerts f495fa7a21 identity: transform GAP event in single segment mode 2012-09-19 15:14:35 +02:00
Wim Taymans a21575d640 plugins: print flags better
print the buffer flags as a hex number so that it becomes easier to see what
flags are set.
2012-07-23 13:40:38 +02:00
Edward Hervey d3ffa82639 Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03:27 +02:00
Tim-Philipp Müller b23185a73a identity: remove deprecated check-perfect property
Replaced by the more specific check-imperfect-{timestamp,offset}
2012-07-06 11:26:14 +01:00
Tim-Philipp Müller a63829b4ff plugins: use new gst_element_class_set_static_metadata() 2012-04-09 13:05:07 +01:00
Sebastian Dröge cfe71423f0 gst: Remove gstmarshal.[ch] completely and use the generic marshaller
Fixes bug #671130.
2012-03-02 11:05:48 +01:00
Wim Taymans 812afd3a22 identity: also debug dts/pts 2012-02-21 12:43:18 +01:00