mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-10 20:31:10 +00:00
webrtcsink: add nvv4l2av1enc support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1735>
This commit is contained in:
parent
8ad882bed5
commit
dee0e32dde
1 changed files with 10 additions and 2 deletions
|
@ -954,6 +954,13 @@ fn configure_encoder(enc: &gst::Element, start_bitrate: u32) {
|
|||
enc.set_property("bitrate", start_bitrate / 1000);
|
||||
enc.set_property("gop-size", 2560u32);
|
||||
}
|
||||
"nvv4l2av1enc" => {
|
||||
enc.set_property("bitrate", start_bitrate);
|
||||
enc.set_property("maxperf-enable", true);
|
||||
enc.set_property_from_str("control-rate", "constant_bitrate");
|
||||
enc.set_property_from_str("preset-level", "UltraFastPreset");
|
||||
add_nv4l2enc_force_keyunit_workaround(enc);
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
@ -1169,6 +1176,7 @@ impl VideoEncoder {
|
|||
| "av1enc"
|
||||
| "rav1enc"
|
||||
| "vpuenc_h264"
|
||||
| "nvv4l2av1enc"
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -1178,7 +1186,7 @@ impl VideoEncoder {
|
|||
"av1enc" => (self.element.property::<u32>("target-bitrate") * 1000) as i32,
|
||||
"x264enc" | "nvh264enc" | "vaapih264enc" | "vaapivp8enc" | "qsvh264enc"
|
||||
| "nvav1enc" | "vpuenc_h264" => (self.element.property::<u32>("bitrate") * 1000) as i32,
|
||||
"nvv4l2h264enc" | "nvv4l2vp8enc" | "nvv4l2vp9enc" | "rav1enc" => {
|
||||
"nvv4l2h264enc" | "nvv4l2vp8enc" | "nvv4l2vp9enc" | "rav1enc" | "nvv4l2av1enc" => {
|
||||
(self.element.property::<u32>("bitrate")) as i32
|
||||
}
|
||||
_ => return Err(WebRTCSinkError::BitrateNotSupported),
|
||||
|
@ -1216,7 +1224,7 @@ impl VideoEncoder {
|
|||
self.element
|
||||
.set_property("bitrate", (bitrate / 1000) as u32);
|
||||
}
|
||||
"nvv4l2h264enc" | "nvv4l2vp8enc" | "nvv4l2vp9enc" => {
|
||||
"nvv4l2h264enc" | "nvv4l2vp8enc" | "nvv4l2vp9enc" | "nvv4l2av1enc" => {
|
||||
self.element.set_property("bitrate", bitrate as u32)
|
||||
}
|
||||
"rav1enc" => self.element.set_property("bitrate", bitrate),
|
||||
|
|
Loading…
Reference in a new issue