mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-08 18:25:30 +00:00
webrtcsink: Support nvv4l2vp9enc
Naive support for nvv4l2vp9enc by assuming configuration is equivalent to existing nvv4l2vp8enc. Validated to have relevant properties. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/983>
This commit is contained in:
parent
4604a6368c
commit
aa2abc50bf
1 changed files with 5 additions and 3 deletions
|
@ -436,7 +436,7 @@ fn configure_encoder(enc: &gst::Element, start_bitrate: u32) {
|
|||
enc.set_property("insert-aud", true);
|
||||
enc.set_property_from_str("control-rate", "constant_bitrate");
|
||||
}
|
||||
"nvv4l2vp8enc" => {
|
||||
"nvv4l2vp8enc" | "nvv4l2vp9enc" => {
|
||||
enc.set_property("bitrate", start_bitrate);
|
||||
enc.set_property_from_str("preset-level", "UltraFastPreset");
|
||||
enc.set_property("maxperf-enable", true);
|
||||
|
@ -600,7 +600,9 @@ impl VideoEncoder {
|
|||
"x264enc" | "nvh264enc" | "vaapih264enc" | "vaapivp8enc" => {
|
||||
(self.element.property::<u32>("bitrate") * 1000) as i32
|
||||
}
|
||||
"nvv4l2h264enc" | "nvv4l2vp8enc" => (self.element.property::<u32>("bitrate")) as i32,
|
||||
"nvv4l2h264enc" | "nvv4l2vp8enc" | "nvv4l2vp9enc" => {
|
||||
(self.element.property::<u32>("bitrate")) as i32
|
||||
}
|
||||
factory => unimplemented!("Factory {} is currently not supported", factory),
|
||||
}
|
||||
}
|
||||
|
@ -625,7 +627,7 @@ impl VideoEncoder {
|
|||
"x264enc" | "nvh264enc" | "vaapih264enc" | "vaapivp8enc" => self
|
||||
.element
|
||||
.set_property("bitrate", (bitrate / 1000) as u32),
|
||||
"nvv4l2h264enc" | "nvv4l2vp8enc" => {
|
||||
"nvv4l2h264enc" | "nvv4l2vp8enc" | "nvv4l2vp9enc" => {
|
||||
self.element.set_property("bitrate", bitrate as u32)
|
||||
}
|
||||
factory => unimplemented!("Factory {} is currently not supported", factory),
|
||||
|
|
Loading…
Reference in a new issue