mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-03-14 09:12:39 +00:00
transcriberbin: fix caption-source selection ..
with recent enough cccombiner. Originally, dropping transcriptions was enough to support caption-source=inband, as cccombiner did not implement output scheduling. However now that it does, even if no captions arrive on the caption pad the combiner will still output padding. Recent-enough combiners however expose an `input-meta-processing` property which lets us achieve the desired behavior, we thus make use of it when available. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2115>
This commit is contained in:
parent
4397b1e8e1
commit
e31e5b2c6f
1 changed files with 19 additions and 1 deletions
|
@ -2620,7 +2620,25 @@ impl ObjectImpl for TranscriberBin {
|
|||
|
||||
let s = self.state.lock().unwrap();
|
||||
if let Some(state) = s.as_ref() {
|
||||
if settings.caption_source == CaptionSource::Inband {
|
||||
if state.cccombiner.has_property("input-meta-processing") {
|
||||
match settings.caption_source {
|
||||
CaptionSource::Inband => {
|
||||
state
|
||||
.cccombiner
|
||||
.set_property_from_str("input-meta-processing", "force");
|
||||
}
|
||||
CaptionSource::Both => {
|
||||
state
|
||||
.cccombiner
|
||||
.set_property_from_str("input-meta-processing", "append");
|
||||
}
|
||||
CaptionSource::Transcription => {
|
||||
state
|
||||
.cccombiner
|
||||
.set_property_from_str("input-meta-processing", "drop");
|
||||
}
|
||||
}
|
||||
} else if settings.caption_source == CaptionSource::Inband {
|
||||
gst::debug!(
|
||||
CAT,
|
||||
imp = self,
|
||||
|
|
Loading…
Reference in a new issue