How do I make use of gst-plugins-rs that i built?

Noob here. Back at the New Year I was needing to build updated rtp and webrtc plugins so I could use the januswebrtcsink feature. I cloned the gst-plugins-rs tree and successfully built components following instructions at https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/#building.

I’ve tried to GST_PLUGIN_PATH="target/x86_64-unknown-linux-gnu/debug:$GST_PLUGIN_PATH" gst-inspect-1.0 webrtc but it finds\probes the library at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstwebrtc.so I’ve wiped $GST_PLUGIN_PATH, (which I think was empty anyway) but no joy. I’ve tried various paths for target/x86_64-unknown-linux-gnu/debug(which is where my builds are), no joy.

Also, my library build is named libgstrswebrtc.so not libgstwebrtc.so so I’ don’t understand how that substitution should work. My understanding is that the rust libraries should work.

Lastly, I re-ran `cargo cbuild -p gst-plugin-xxx` but the only change is in the ???.p files.

Any pointers as to what Im doing wrong?

Thanks,

rickbol

The webrtc plugin is from gst-plugins-bad and contains webrtcbin. The rswebrtc plugin built when running cargo cbuild -p gst-plugin-webrtc contains webrtcsink, webrtcsrc, and friends and uses webrtcbin under the hood to communicate with a peer.

If you run GST_PLUGIN_PATH="target/x86_64-unknown-linux-gnu/debug:$GST_PLUGIN_PATH" gst-inspect-1.0 rswebrtc you should get a list of webrtcsink/webrtcsrc related elements.

Ah, OK. So generally, plugins are “referred to” by dropping libgst (as a prefix) and .so (as a sufffix) of their compiled filename. The rust builds are gonna have rs??? beginning their plugin names.

Turns out that those plugins do appear in the list when I GST_PLUGIN_PATH="target/x86_64-unknown-linux-gnu/debug:$GST_PLUGIN_PATH" gst-inspect-1.0, I just didn’t know to look for the rs prefix.

I haven’t installed the builds yet. Since they’re debug builds, I think I’d install the into a directory separate from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/just to keep debug builds isolated.

If I cargo cinstall -p gst-plugin-??? --libdir=/<gst-debug-plugins-path> does this automatically add this path to the GST_PLUGIN_PATH registry?

For initial testing, I’ll just use GST_PLUGIN_PATH="target/x86_64-unknown-linux-gnu/debug:$GST_PLUGIN_PATH" gst-launch-1.0 <pipeline> to pickup the new plugins and their elements.

Thank you!

Ah, OK. So generally, plugins are “referred to” by dropping libgst (as a prefix) and .so (as a sufffix) of their compiled filename. The rust builds are gonna have rs??? beginning their plugin names.

Some have the ‘rs’ prefix, some don’t mostly depending on if there is already a non-rust plugin of the same name.

If I cargo cinstall -p gst-plugin-??? --libdir=/<gst-debug-plugins-path> does this automatically add this path to the GST_PLUGIN_PATH registry?

No. The default search path is relative to the location of libgstreamer-1.0.so/dylib/dll which is why the system paths are checked by default. You would need to add your directory GST_PLUGIN_PATH for plugins to be picked up.