Commit graph

179 commits

Author SHA1 Message Date
Guillaume Desmottes
8389bff7d8 fallbackswitch: properly handle GAP events
Handle GAP events from the active pad as activity and forward
downstream.
2022-03-03 11:48:26 +01:00
Guillaume Desmottes
7b109785be fallbackswitch: factor out handle_main_timed_item()
No semantic change, I'll re-use this to handle GAP events.
2022-03-03 10:01:59 +01:00
Guillaume Desmottes
31864c9a9d fallbackswitch: add support for buffers without pts
Re-use the previously seen PTS.

Fix #186
2022-03-02 13:32:06 +01:00
Guillaume Desmottes
73cfb357c6 fallbackswitch: export GEnum used in properties
Rust applications will be able to use those directly.
2022-03-01 14:44:16 +01:00
Sebastian Dröge
b38f6cc731 Remove now unnecessary Send+Sync impls for element/etc subclasses
This is now automatically implemented.
2022-02-28 18:56:58 +02:00
Guillaume Desmottes
d9f3e8e9e7 uriplaylistbin: disable test deadlocking 2022-02-28 16:48:13 +01:00
Seungha Yang
de2ea8a1b2 fallbacksrc: Disconnect signals on ReadyToNull
Otherwise multiple signal handlers will be connected to the source
2022-02-25 23:12:30 +09:00
Sebastian Dröge
a1e2debde4 fallbacksrc: Changing the URI of the video fallback is supported in NULL state
And not just during construction.

This fixes switching from a failing video fallback to a dummy fallback,
which was added in c7fe08bf6.
2022-02-24 12:29:53 +02:00
Guillaume Desmottes
52f5dc0185 uriplaylistbin: display invalid state when panicing
Will help debugging failing tests such as #184
2022-02-22 17:29:02 +01:00
François Laignel
2cf84d5ce8 Update minimum supported Rust version to 1.57 2022-02-21 23:32:32 +01:00
François Laignel
422ea740ca Update to gst::_log_macro_
See the details:
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/980
2022-02-21 20:50:01 +01:00
Sebastian Dröge
42f9f99690 Update to parking_lot 0.12 and hrtf 0.8 2022-01-31 15:20:44 +02:00
Sebastian Dröge
f44b86cd30 Simplify some code around event/query views 2022-01-22 12:18:02 +02:00
Sebastian Dröge
65fcd55160 Update for event/message/query view API changes 2022-01-19 15:07:45 +02:00
Sebastian Dröge
763ad0cb18 Rename self_ variables to imp for consistency 2022-01-17 20:09:18 +02:00
Sebastian Dröge
b2d0172422 Replace Foo::from_instance(foo) with foo.imp() 2022-01-17 19:36:41 +02:00
Sebastian Dröge
326449b3e6 Re-license LGPL-2.1 plugins to MPL-2
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/168
2022-01-15 21:05:11 +02:00
Sebastian Dröge
0c7764fa40 Update versions to 0.9.0 2022-01-15 20:33:49 +02:00
Sebastian Dröge
ab14c50d1c Ignore clippy::non_send_fields_in_send_ty lint
It's useless in its current shape and wrongly triggering on all types.

See https://github.com/rust-lang/rust-clippy/issues/8045
2022-01-14 12:09:57 +02:00
Guillaume Desmottes
8bab034bc8 uriplaylistbin: fix license when registering plugin 2022-01-03 00:08:53 +01:00
Guillaume Desmottes
b7c08933aa uriplaylistbin: add properties reporting the current state of the playlist 2021-12-22 15:26:17 +01:00
Guillaume Desmottes
9783d01a35 uriplaylistbin: prevent overflow panic with infinite playlist
enumerate() will panic if the index overflows.
2021-12-22 12:53:11 +01:00
Guillaume Desmottes
4a5815cc97 uriplaylistbin: factor out create_items() 2021-12-22 12:53:11 +01:00
François Laignel
7c909e59a9 utils/togglerecord: fix race condition in sink_chain when segment is pending
In `sink_chain` when the Segment is pending, attempting to lock
rec state could lead to a dead lock because the stream state is
already locked while the main stream state was not locked.
2021-12-20 09:01:09 +00:00
François Laignel
a1c89dd17b utils/togglerecord: fix race condition checking other streams EOS state
Function `check_and_update_stream_start` checks whether other streams
reached EOS. The stream being checked might already have locked its
state. If it's about to check other streams too, this results in a
deadlock.

The problem was due to the `main_state` guard being dropped handling
event `StreamStart` checking whether the main stream is EOS:

```rust
    let main_is_eos = if let Some(main_state) = main_state {
        main_state.eos
    } else {
        false
    };
```

In the above code, `main_state` main state is comsumed and dropped
after evaluating `main_state.eos`.

This is also the case before handling event `Eos`.

This revealed another deadlock handling event `Eos` which is under
investigation.
2021-12-20 09:01:09 +00:00
Vivia Nikolaidou
2acb83da8f togglerecord: Handle stream-start event after EOS
It should restart any pending streams instead of keeping everything
EOS'd

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/622>
2021-12-14 14:34:50 +02:00
Sebastian Dröge
86021d637b fallbacksrc: Actually calculate running times of segment start/stop if the PTS is outside the segment
Previously it was just using the segment start/stop without converting
it to the corresponding running time.
2021-12-09 12:30:42 +02:00
Sebastian Dröge
66e987c174 Fix a couple of new clippy warnings 2021-12-02 22:31:52 +02:00
Sebastian Dröge
423fa0d0a9 uriplaylistbin: Remove unnecessary & to fix clippy warning 2021-12-01 15:57:45 +02:00
Sebastian Dröge
13923051a0 Fix compilation after gst::Pad::sticky_events_foreach API changes 2021-12-01 15:33:45 +02:00
Sebastian Dröge
c46901d150 Fix or silence various new 1.57 clippy warnings 2021-11-30 16:31:50 +02:00
Guillaume Desmottes
f9a39b1138 add uriplaylistbin plugin
uriplaylistbin plays a list of URIs sequentially, ensuring gapless transitions
and proper streams synchronization.
2021-11-29 10:55:01 +01:00
Sebastian Dröge
86f422592b Update for glib::Enum / glib::Boxed / glib::flags! macro renames 2021-11-22 11:04:26 +02:00
Sebastian Dröge
c68f6b2631 Update for GLib signal emit_by_name() API changes 2021-11-21 18:15:04 +02:00
Sebastian Dröge
55aad51141 Update for glib constructor renames
See https://github.com/gtk-rs/gtk-rs-core/pull/384
2021-11-20 14:31:06 +02:00
Jan Alexander Steffens (heftig)
5285fab8b3 fallbackswitch: Correct immediate-fallback default value
Only affects the claimed default in the properties, not the actual
default.
2021-11-18 21:02:54 +00:00
Bilal Elmoussaoui
82be7b3ac5 adapt to ObjectExt improvements 2021-11-08 14:43:53 +02:00
Sebastian Dröge
d9bda62a47 Update for GLib/GStreamer API changes
And clean up a lot of related property/caps/structure code.
2021-11-06 09:34:10 +02:00
Sebastian Dröge
0a7d1639e7 Update to Rust edition 2021 and minimum supported Rust version to 1.56 2021-10-31 17:40:05 +02:00
Sebastian Dröge
b9541b2ca4 Update for GstObjectImpl API change 2021-10-23 12:31:33 +03:00
François Laignel
27b9f0d868 Improve usability thanks to opt-ops
The crate option-operations simplifies usage when dealing with
`Option`s, which is often the case with `ClockTime`.
2021-10-18 15:09:47 +02:00
Sebastian Dröge
54c8f5b3ab fallbackswitch: Remove bundled aggregator copy and require GStreamer 1.18
1.18 is old enough at this point and carrying around a copy of
 aggregator is not sustainable.
2021-10-17 17:35:45 +03:00
Sebastian Dröge
c5d3a2efce Update for event API changes 2021-10-17 17:30:38 +03:00
Sebastian Dröge
1a830c7c78 Update for glib::source_remove() removal 2021-10-12 06:31:53 +00:00
Vivia Nikolaidou
a132fdb8be togglerecord: Add is-live mode
No "gap eating" behaviour, will forward incoming segment
2021-10-04 16:44:04 +03:00
Vivia Nikolaidou
f6aa03b58a togglerecord: Fix lock ordering
Fixes deadlocks.

Correct lock ordering is:
1) Main stream state lock
2) Other stream state lock
3) Recording state lock
2021-10-04 13:18:20 +03:00
Sebastian Dröge
96d86eaa06 Clean up clippy warnings and CI configuration
Put clippy overrides into the sources files instead of the CI
configuration, and fix various warnings / clean up code.
2021-09-08 12:35:41 +00:00
Vivia Nikolaidou
6f14ebdfee togglerecord: Notify main_stream_cond on release_pad
Otherwise, it would deadlock when releasing first the primary stream and
then the secondary one, because it will wait in the "secondary stream"
handling for the main stream to be fed, which will never happen.
2021-08-27 11:59:33 +03:00
Sebastian Dröge
4894e7b3ee
Update for fallible Object::set_property_from_str() 2021-08-17 15:01:25 +03:00
Sebastian Dröge
848b296390 Add capi feature to all plugin crates
This fixes the build with cargo-c 0.9.2.
2021-08-11 20:51:36 +03:00