mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-25 04:51:26 +00:00
transcriberbin: support both latency and transcribe-latency properties
Also don't set translate-latency property if not present Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1831>
This commit is contained in:
parent
8fae519c8d
commit
5eccb180be
1 changed files with 10 additions and 3 deletions
|
@ -513,11 +513,18 @@ impl TranscriberBin {
|
||||||
|
|
||||||
if let Some(ref transcriber) = pad_state.transcriber {
|
if let Some(ref transcriber) = pad_state.transcriber {
|
||||||
let latency_ms = settings.latency.mseconds() as u32;
|
let latency_ms = settings.latency.mseconds() as u32;
|
||||||
transcriber.set_property("transcribe-latency", latency_ms);
|
|
||||||
|
|
||||||
|
if transcriber.has_property("transcribe-latency", None) {
|
||||||
|
transcriber.set_property("transcribe-latency", latency_ms);
|
||||||
|
} else if transcriber.has_property("latency", None) {
|
||||||
|
transcriber.set_property("latency", latency_ms);
|
||||||
|
}
|
||||||
|
|
||||||
|
if transcriber.has_property("translate-latency", None) {
|
||||||
let translate_latency_ms = settings.translate_latency.mseconds() as u32;
|
let translate_latency_ms = settings.translate_latency.mseconds() as u32;
|
||||||
transcriber.set_property("translate-latency", translate_latency_ms);
|
transcriber.set_property("translate-latency", translate_latency_ms);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
pad_state
|
pad_state
|
||||||
.queue_passthrough
|
.queue_passthrough
|
||||||
.set_property("max-size-bytes", 0u32);
|
.set_property("max-size-bytes", 0u32);
|
||||||
|
|
Loading…
Reference in a new issue