mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-26 05:21:00 +00:00
webrtcsink: initial support for vpuenc_h264 encoder for imx8mp, default values set to cover a common streaming scenario
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1639>
This commit is contained in:
parent
718e757669
commit
f303992e0c
1 changed files with 7 additions and 2 deletions
|
@ -785,6 +785,10 @@ fn configure_encoder(enc: &gst::Element, start_bitrate: u32) {
|
|||
enc.set_property("max-key-frame-interval", 715827882);
|
||||
enc.set_property("speed-preset", 10);
|
||||
}
|
||||
"vpuenc_h264" => {
|
||||
enc.set_property("bitrate", start_bitrate / 1000);
|
||||
enc.set_property("gop-size", 2560u32);
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
@ -988,6 +992,7 @@ impl VideoEncoder {
|
|||
| "nvav1enc"
|
||||
| "av1enc"
|
||||
| "rav1enc"
|
||||
| "vpuenc_h264"
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -996,7 +1001,7 @@ impl VideoEncoder {
|
|||
"vp8enc" | "vp9enc" => self.element.property::<i32>("target-bitrate"),
|
||||
"av1enc" => (self.element.property::<u32>("target-bitrate") * 1000) as i32,
|
||||
"x264enc" | "nvh264enc" | "vaapih264enc" | "vaapivp8enc" | "qsvh264enc"
|
||||
| "nvav1enc" => (self.element.property::<u32>("bitrate") * 1000) as i32,
|
||||
| "nvav1enc" | "vpuenc_h264" => (self.element.property::<u32>("bitrate") * 1000) as i32,
|
||||
"nvv4l2h264enc" | "nvv4l2vp8enc" | "nvv4l2vp9enc" | "rav1enc" => {
|
||||
(self.element.property::<u32>("bitrate")) as i32
|
||||
}
|
||||
|
@ -1031,7 +1036,7 @@ impl VideoEncoder {
|
|||
.element
|
||||
.set_property("target-bitrate", (bitrate / 1000) as u32),
|
||||
"x264enc" | "nvh264enc" | "vaapih264enc" | "vaapivp8enc" | "qsvh264enc"
|
||||
| "nvav1enc" => {
|
||||
| "nvav1enc" | "vpuenc_h264" => {
|
||||
self.element
|
||||
.set_property("bitrate", (bitrate / 1000) as u32);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue