rsinter (intersink/intersrc) do not pass custom serialized events
Describe your issue
The intersink/intersrc elements forward various events both downstream and upstream. Custom downstream events are not passed, however.
Expected Behavior
I expect serialized custom events to pass between the elements for application support.
Observed Behavior
The intersink
underlying appsink
posts a log message that it received the event, however it is passed into the basesink class where it's destroyed.
Setup
- Operating System: Ubuntu 22.04
- Device: Computer
- gst-plugins-rs Version: 0.12.7
- GStreamer Version: 1.24.5
- Command line: Powershell
Steps to reproduce the bug
- Establish a pair of pipelines such that there is an
intersink
andintersrc
pair between the two. - Add a periodic task that inserts custom downstream events containing some arbitrary structure ahead of the
intersink
element in the first pipeline. - Add a downstream event probe after the
intersrc
element in the other pipeline to print custom events that have been received and log them.
None of the events produced by (2) will be logged by (3).
How reproducible is the bug?
Always.
Screenshots if relevant
Solutions you have tried
I added the following test, which fails on the push_event
call.
#[test]
#[serial]
fn test_push_custom_event() {
init();
let mut hc = start_consumer("p");
let (srcpad, _) = start_producer("p");
assert!(
srcpad.push_event(gst::event::CustomDownstream::new(
gst::Structure::builder("MyEvent")
.field("unsigned", 100u64)
.build()
))
);
let event = hc.pull_event();
assert!(event.is_ok());
}
I then tried modifying inter/src/streamproducer/mod.rs
to call upon constructing a producer
, since it appears the gst_utils::StreamProducer
supports this interface with EOS being the only default message to forward:
producer.set_forward_events(vec![
gst::EventType::Eos,
gst::EventType::CustomDownstream,
]);
However, the above test still fails on push_event
(returned false
).