mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-10 19:25:26 +00:00
webrtcsink: also support nvvidconv in lieu of nvvideoconvert
nvvideoconvert may not exist and nvvidconv might on some Jetson platforms. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1107>
This commit is contained in:
parent
bca4af0c79
commit
542c7e12b8
1 changed files with 7 additions and 3 deletions
|
@ -336,9 +336,13 @@ fn make_converter_for_video_caps(caps: &gst::Caps) -> Result<gst::Element, Error
|
|||
(glupload, glscale)
|
||||
} else if feature.contains(NVMM_MEMORY_FEATURE) {
|
||||
let queue = make_element("queue", None)?;
|
||||
let nvconvert = make_element("nvvideoconvert", None)?;
|
||||
nvconvert.set_property("compute-hw", 0);
|
||||
nvconvert.set_property("nvbuf-memory-type", 0);
|
||||
let nvconvert = if let Ok(nvconvert) = make_element("nvvideoconvert", None) {
|
||||
nvconvert.set_property("compute-hw", 0);
|
||||
nvconvert.set_property("nvbuf-memory-type", 0);
|
||||
nvconvert
|
||||
} else {
|
||||
make_element("nvvidconv", None)?
|
||||
};
|
||||
|
||||
ret.add_many(&[&queue, &nvconvert])?;
|
||||
gst::Element::link_many(&[&queue, &nvconvert])?;
|
||||
|
|
Loading…
Reference in a new issue