mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-25 04:51:26 +00:00
cea708mux: Don't create a separate source pad and actually push gap events downstream
The aggregator base class is already creating the source pad and the source pad that was created here internally was never added to the element at all. As such all gap events pushed on it never went anywhere. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1774>
This commit is contained in:
parent
7905626a5f
commit
29b54ed2fc
1 changed files with 2 additions and 16 deletions
|
@ -90,9 +90,8 @@ struct State {
|
||||||
n_frames: u64,
|
n_frames: u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
pub struct Cea708Mux {
|
pub struct Cea708Mux {
|
||||||
srcpad: gst_base::AggregatorPad,
|
|
||||||
|
|
||||||
state: Mutex<State>,
|
state: Mutex<State>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -345,7 +344,7 @@ impl AggregatorImpl for Cea708Mux {
|
||||||
|
|
||||||
self.finish_buffer(buf)
|
self.finish_buffer(buf)
|
||||||
} else {
|
} else {
|
||||||
self.srcpad.push_event(
|
self.obj().src_pad().push_event(
|
||||||
gst::event::Gap::builder(start_running_time)
|
gst::event::Gap::builder(start_running_time)
|
||||||
.duration(duration)
|
.duration(duration)
|
||||||
.build(),
|
.build(),
|
||||||
|
@ -572,19 +571,6 @@ impl ObjectSubclass for Cea708Mux {
|
||||||
const NAME: &'static str = "GstCea708Mux";
|
const NAME: &'static str = "GstCea708Mux";
|
||||||
type Type = super::Cea708Mux;
|
type Type = super::Cea708Mux;
|
||||||
type ParentType = gst_base::Aggregator;
|
type ParentType = gst_base::Aggregator;
|
||||||
|
|
||||||
fn with_class(klass: &Self::Class) -> Self {
|
|
||||||
let templ = klass.pad_template("src").unwrap();
|
|
||||||
let srcpad = gst::Pad::builder_from_template(&templ)
|
|
||||||
.build()
|
|
||||||
.downcast::<gst_base::AggregatorPad>()
|
|
||||||
.expect("Not a GstAggregatorPad?!");
|
|
||||||
|
|
||||||
Self {
|
|
||||||
srcpad,
|
|
||||||
state: Mutex::new(State::default()),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
|
|
Loading…
Reference in a new issue