Commit graph

90 commits

Author SHA1 Message Date
François Laignel 67c5871957 fix-getters-calls 0.3.0 pass 2021-04-20 18:19:58 +02:00
François Laignel 27bc5c89ca fix-getters-def 0.3.0 pass 2021-04-20 18:19:58 +02:00
François Laignel e573f0ba16 fallbackswitch: update base/aggregator* 2021-04-13 17:24:20 +02:00
François Laignel 7d17f88941 post fix-getters manual updates 2021-04-13 17:24:20 +02:00
François Laignel 06accc8d98 fix-getters-{def,calls} pass 2021-04-12 15:57:19 +02:00
Matthew Waters 359c07203e gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead.  GCC 11 has started warning about using volatile
with atomic operations.

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719

Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868
2021-03-19 17:24:25 +11:00
Sebastian Dröge 2cada57efc Update for the subclassing glib/gstreamer bindings API changes 2021-03-09 17:07:13 +02:00
Sebastian Dröge 9721b3e762 fallbackswitch: Update bundled aggregator bindings with glib subclass API cleanups 2021-03-08 12:43:05 +02:00
Sebastian Dröge dc0c5f7611 Update for new #[glib::object_subclass] attribute macro 2021-03-07 18:27:00 +02:00
Sebastian Dröge 0616c18703 Update for changed GLib signals API 2021-02-22 17:20:40 +02:00
Sebastian Dröge cbda137fbf Fix various warnings from clippy 1.50 2021-02-09 18:57:34 +02:00
Jan Schmidt f63c4284c1 fallbackswitch: Fix draining of the backup pad.
When not autoswitching between the primary and fallback pad, make sure
to drain the disabled pad to the current running time, and fix the
drain_pad_to_time() function to use the correct running time variable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/472>
2021-02-05 03:24:02 +11:00
Sebastian Dröge b649e9b076 Use gst::PARAM_FLAG_MUTABLE_PLAYING and others consistently everywhere
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/139
2021-01-31 15:43:00 +02:00
Sebastian Dröge d4ce1a33f2 Update for glib/gstreamer bindings API changes 2021-01-25 14:43:05 +02:00
Seungha Yang 084c9d1447 fallbackswitch,togglerecord: Don't apply clipped PTS to buffer DTS
Setting DTS on raw video buffers doesn't make sense and it's even wrong
in case of compressed video stream because PTS might be able to
go back when B frames are placed, but DTS is expected to be monotonically
increased.
2021-01-19 19:45:14 +09:00
Sebastian Dröge 3d617371af Update for macro renames 2020-12-20 20:43:45 +02:00
Sebastian Dröge ea6c05e16c Update everything for glib macro renamings 2020-12-18 00:44:49 +02:00
Sebastian Dröge 708c6aa57e Update for new simplified glib::Object::new() API 2020-12-17 18:15:54 +02:00
Jan Schmidt b80a607737 fallbackswitch: Reset fallback pad state on remove. 2020-12-11 13:02:00 +00:00
Jan Schmidt f57ce41e89 fallbackswitch: Document return parameters for get_next_buffer()
The return type for get_next_buffer() is quite complex, so add some
comments about what is what.
2020-12-11 13:02:00 +00:00
Jan Schmidt fddf33d339 fallbackswitch: Use pad as the debug object
Instead of using the aggregator as the object in debug statements
relating to pad dataflow, use the pad itself.
2020-12-11 13:02:00 +00:00
Jan Schmidt 34a2dd80a2 fallbackswitch: Move health checks to the OutputState.
Move some code to the OutputState from the fallbackswitch
struct to make things a bit cleaner.
2020-12-11 13:02:00 +00:00
Jan Schmidt 74f3de5674 fallbackswitch: Update for upstream changes 2020-12-11 13:02:00 +00:00
Jan Schmidt d5b648921c fallbackswitch: Add manual stream control mode
Add properties to report and notify on stream health changes, and
a mode where the app can control the stream switching by setting
the active-pad property manually.

This is useful for modifying the policy of fallbackswitch stream
choices, and to synchronise switching of multiple fallbackswitches
2020-12-11 13:02:00 +00:00
Seungha Yang c7fe08bf6d fallbacksrc: Fallback to videotestsrc if image fallback URI is invalid
... or on error from video fallback path
2020-12-11 12:35:26 +00:00
Sebastian Dröge 6aed1ed926 Remove various unneeded unwraps 2020-12-05 20:29:50 +02:00
Sebastian Dröge 767ed3afae utils: Update to 2018 edition 2020-11-23 10:28:34 +02:00
Sebastian Dröge d56ae71e0e Update for ObjectImpl::get_property() being infallible now 2020-11-19 18:25:53 +02:00
Sebastian Dröge b021a8bf10 utils: Update for subclassing API changes 2020-11-15 18:25:42 +02:00
Sebastian Dröge 9c48de75d8 Update for glib_wrapper! API changes 2020-11-07 13:14:00 +02:00
Sebastian Dröge 4c4ed6eed2 fallbackswitch: Update local version of aggregator bindings 2020-11-05 17:06:34 +02:00
Seungha Yang c62bdb171a fallbacksrc: Don't give up to running even if segment event is unavailable on blocking probe
The blocking probe will be called on buffer or downstream event.
So segment event might not be available at that moment if it was
called by downstream events.
2020-11-03 05:13:20 +09:00
Seungha Yang 6390d85b5f fallbacksrc: Add statistics property
This property would be useful for application to understand
the internal status of fallbacksrc element.
2020-10-30 17:08:05 +09:00
Seungha Yang 1b546bb562 fallbacksrc: Ignore buffering message of restart was scheduled
In case that there is pending restart, fallbacksrc should not
try to add pad probe.
2020-10-22 02:25:52 +09:00
Seungha Yang 46af97219c fallbacksrc: Clear exisiting pad probe on restarting
Fallback might happen even after uridecodebin3 exposed pad.
For later use of audio and video streams, clear it if any
2020-10-22 02:23:22 +09:00
François Laignel 7c3e69bb4a Fix ClockTime comparisons not being Ord and use saturating_sub
See:
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/607
2020-10-20 23:45:01 +02:00
Sebastian Dröge bbc18d6349 Update for ClockId creation API changes 2020-10-20 12:49:51 +03:00
Sebastian Dröge 1e661e6d5b Update for gst::ClockId changes 2020-10-10 13:53:28 +03:00
Sebastian Dröge 4561b0bc3c utils/fallbacksrc: Add update-uri signal
This allows to update the URI just before configuring it on
uridecodebin3. It might be necessary to update the original URI because
it expired in the meantime, for example.
2020-09-28 16:54:42 +00:00
Sebastian Dröge 331374fabe utils/fallbackswitch: Use the correct segment when deciding to drop fallback buffers
Thanks to Jan Schmidt for noticing.
2020-09-28 14:39:10 +00:00
Sebastian Dröge bf82e750f4 utils/fallbacksrc: Remove custom source elements from internal bin when shutting down
Otherwise we can't add it again later to a new bin when starting up again.
2020-09-26 12:24:05 +00:00
Vivia Nikolaidou a91e8aadb2 fallbackswitch: Consistently store running time in last_sinkpad_time
It was using buffer timestamps mixed with running time
2020-08-05 18:49:44 +00:00
Sebastian Dröge 4b171ec7ff utils/fallbacksrc: Remove pad probes before restarting the source
Otherwise the source might be blocked downstream in the pad probe on the
queue. Previously this was not a problem because the probes were
directly on the srcpads of the source but due to a workaround for
uridecodebin3 buffering bugs this is not the case anymore.
2020-08-04 10:37:08 +03:00
Sebastian Dröge a2c0d70930 utils/fallbacksrc: Don't schedule a source restart timeout if the source is already pending restart 2020-08-04 10:36:45 +03:00
Sebastian Dröge 9ebcfbf333 utils/fallbacksrc: Improve debug output related to pad probes 2020-08-04 10:36:28 +03:00
Sebastian Dröge 0ce36c0f76 utils/fallbacksrc: Forward the state change return of custom sources
Without this, custom sources that are live are not actually considered
live.
2020-08-03 17:56:15 +03:00
Sebastian Dröge 42a3cf8bb2 utils/fallbacksrc: Fix debug output in pad probe callback
Let's print the name of the source's srcpad that is going to be blocked
instead of the "src" pad of the following queue. Without this it's hard
to distinguish the different streams from the logs.
2020-08-03 17:55:35 +03:00
Sebastian Dröge 30c711886e utils/fallbacksrc: Add a 1s queue between uridecodebin and clocksync and do buffering after the queue
This adds 1s more buffering (of uncompressed data), but works around
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/800
2020-07-30 14:53:18 +03:00
Sebastian Dröge 34fab8786f utils/fallbacksrc: Fix fallback stream detection if only audio or video is enabled 2020-07-30 14:35:34 +03:00
Sebastian Dröge a022bbe260 Fix some new clippy warnings 2020-07-28 18:52:11 +03:00