mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-18 16:16:28 +00:00
cea708mux: forward CEA-608 data correctly
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1942>
This commit is contained in:
parent
39a8db51de
commit
9eb3ad4412
1 changed files with 19 additions and 1 deletions
|
@ -316,6 +316,12 @@ impl AggregatorImpl for Cea708Mux {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let Some(cea608) = pad_state.ccp_parser.cea608() {
|
||||||
|
for pair in cea608 {
|
||||||
|
state.writer.push_cea608(*pair);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
|
@ -643,7 +649,6 @@ impl ObjectSubclass for Cea708Mux {
|
||||||
type ParentType = gst_base::Aggregator;
|
type ParentType = gst_base::Aggregator;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default)]
|
|
||||||
struct PadState {
|
struct PadState {
|
||||||
format: CeaFormat,
|
format: CeaFormat,
|
||||||
ccp_parser: CCDataParser,
|
ccp_parser: CCDataParser,
|
||||||
|
@ -651,6 +656,19 @@ struct PadState {
|
||||||
pending_buffer: Option<gst::Buffer>,
|
pending_buffer: Option<gst::Buffer>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for PadState {
|
||||||
|
fn default() -> Self {
|
||||||
|
let mut ccp_parser = CCDataParser::default();
|
||||||
|
ccp_parser.handle_cea608();
|
||||||
|
Self {
|
||||||
|
format: CeaFormat::default(),
|
||||||
|
ccp_parser,
|
||||||
|
pending_services: HashMap::default(),
|
||||||
|
pending_buffer: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Cea708MuxSinkPad {
|
pub struct Cea708MuxSinkPad {
|
||||||
pad_state: Mutex<PadState>,
|
pad_state: Mutex<PadState>,
|
||||||
|
|
Loading…
Reference in a new issue