mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-18 16:16:28 +00:00
webrtc: use the nick to set enum type properties on openh264enc
The properties `rate-control` and `complexity` are of enum types and passing a gint value is resulting in a panic. So pass the corresponding nick of the enum value instead Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1970>
This commit is contained in:
parent
be6074f4f4
commit
c9a0731e61
1 changed files with 2 additions and 2 deletions
|
@ -762,8 +762,8 @@ fn configure_encoder(enc: &gst::Element, start_bitrate: u32) {
|
|||
"openh264enc" => {
|
||||
enc.set_property("bitrate", start_bitrate);
|
||||
enc.set_property("gop-size", 2560u32);
|
||||
enc.set_property("rate-control", 1);
|
||||
enc.set_property("complexity", 0);
|
||||
enc.set_property_from_str("rate-control", "bitrate");
|
||||
enc.set_property_from_str("complexity", "low");
|
||||
enc.set_property("background-detection", false);
|
||||
enc.set_property("scene-change-detection", false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue