diff options
author | Raphael Dürscheid <raphael.duerscheid@aivero.com> | 2022-11-28 15:03:31 +0300 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2022-12-02 13:18:27 +0300 |
commit | aa2abc50bfe6a08c5c3318c303b6acdbb661498c (patch) | |
tree | 498fadf4104fa6f13a7c3a43d3f384f31d03d23d /net | |
parent | 4604a6368cb65ea983fa54770e640fe6d9f4a421 (diff) |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/webrtc/src/webrtcsink/imp.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/webrtc/src/webrtcsink/imp.rs b/net/webrtc/src/webrtcsink/imp.rs index 3e38ee47..64a98f4d 100644 --- a/net/webrtc/src/webrtcsink/imp.rs +++ b/net/webrtc/src/webrtcsink/imp.rs @@ -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), |