<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,<div>Thanks for the response. </div><div>I tried with GST_DEBUG=6, and based on the logs it looks like gstreamer itself is being loaded with 1.19 which is the correct version. However, the plugins are being loaded from the global installation which are at 1.18. I have all the plugins compiled for 1.19 in gst-build. How do I get gstreamer-rs to point to those instead of the global installation? </div><div><br></div><div>Thanks!</div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 25, 2021 at 3:25 PM Sebastian Dröge <<a href="mailto:sebastian@centricular.com">sebastian@centricular.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>On Fri, 2021-06-25 at 14:26 +0530, Samyak via gstreamer-devel wrote:</div><blockquote type="cite" style="margin:0px 0px 0px 0.8ex;border-left:2px solid rgb(114,159,207);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hey,<div>Please let me know if this is the wrong place to ask questions or if my question has been answered before. </div><div><br></div><div>My question is I want to use a newer version of gstreamer with gstreamer-rs. I am using gst-build to build a local version of gstreamer to build the master branch and I want gstreamer-rs to use that instead of using my global gstreamer which is on 1.18. </div><div><br></div><div>To give some context around my reasoning to use the master branch (I'm giving this context so that I can get a better overall solution in case I'm taking the wrong approach here). I am using Arch Linux which means I'm using cuda 11.3.0-2. Based on this issue: <a href="https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1469" target="_blank">https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1469</a>, gstreamer 1.18 has issues with that. Because of this when I use gst-inspect, I don't get cudascale or any of the cuda functions. When I use gst-build to build the master branch, everything works when I try gst-launch. But I want to actually use the gstreamer-rs bindings.</div><div>I have tried to clone the gstreamer-rs repo, and run the instructions from here: <a href="https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/blob/master/DEVELOPMENT.md" target="_blank">https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/blob/master/DEVELOPMENT.md</a> and also set PKG_CONFIG env variable to the meson-private directory from the gst-build. I then compiled using the v1_20 feature on Cargo and the compilation worked. But, when I try using gst::ElementFactory::make("cudaupload", Some("cudaupoad"), I get this error: </div><div>BoolError { message: "Failed to create element from factory name", filename: "<home_dir>/Documents/projects/gstreamer-rs/gstreamer/src/auto/<a href="http://element_factory.rs" target="_blank">element_factory.rs</a>", function: "gstreamer::auto::element_factory", line: 204 }', src/main.rs:10:82</div><div><br></div><div>Here's the full backtrace if that helps: <a href="https://pastebin.com/1U0qWWkH" target="_blank">https://pastebin.com/1U0qWWkH</a></div><div><br></div><div>Couple of questions on my end:</div><div>1. Do we know for a fact if gstreamer-rs is using my local build? How do I verify this? It seems weird that when I run the devenv on gst-build I am able to run cudascale with gst-launch but it does not seem to be working with gstreamer-rs.</div></div></div></div></div></blockquote><div><br></div><div>Check the GStreamer debug logs. If you run with GST_DEBUG=6 you'll see a lot of output, and especially at the beginning you'll see which GStreamer version from where it is using and where it's trying to load the plugins.</div><div>At the moment you're trying to create the element you should also see something meaningful in the logs.</div><div><br></div><blockquote type="cite" style="margin:0px 0px 0px 0.8ex;border-left:2px solid rgb(114,159,207);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>2. Am I writing the rust code wrong? Is elementfactory the wrong way to create cuda elements on Rust?</div></div></div></div></div></blockquote><div><br></div><div>That's the correct way.</div><div><br></div><blockquote type="cite" style="margin:0px 0px 0px 0.8ex;border-left:2px solid rgb(114,159,207);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>3. Is there any sample I can refer to so maybe I can try reverse engineering this? Or has gstreamer-rs never been tested with cuda support before?</div></div></div></div></div></blockquote><div><br></div><div>I'm not aware of any CUDA example or anybody having used gstreamer-rs with CUDA elements, but there's nothing special about the bindings in that regard.</div><div>If it works with gst-launch then it will also work with the bindings as long as the environment setup is the same.</div><div><br></div><div><span><pre>-- <br></pre><div style="width:71ch">Sebastian Dröge, Centricular Ltd · <a href="http://www.centricular.com" target="_blank">https://www.centricular.com</a></div><div style="width:71ch"><br></div></span></div></div>
</blockquote></div>