GStreamer will not recognize my plugin

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

GStreamer will not recognize my plugin

William
So I'm trying to write a plugin and seemed to have tripped over the starting
line. I have read in the docs that I should use gst-element-maker to create
a basic template for a plugin. So I give it a try:

./gst-element-maker myplugin382 basetransform

So not only did that create the .h and .c files, it also creates the .so
library file gstmyplugin382.so.
Wow, cool. So now I only have to copy the gstmyplugin382.so into the
directory where all the other gst-plugins reside and GStreamer will
magically see recognize it. Excellent! And so I copied gstmyplugin382.so to
/usr/lib/x86_64-linux-gnu and ran gst-inspect-1.0. But no joy. It doesn't
work.
I have spent the day trying slight variations, searching the internet for
solutions, and trying out different suggestions. And still no joy.
Was this supposed to work? Am I missing a step? How is GStreamer supposed to
recognize plugins?



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer will not recognize my plugin

Philippe Normand
On Mon, 2019-10-21 at 16:43 -0500, William wrote:

> So I'm trying to write a plugin and seemed to have tripped over the
> starting
> line. I have read in the docs that I should use gst-element-maker to
> create
> a basic template for a plugin. So I give it a try:
>
> ./gst-element-maker myplugin382 basetransform
>
> So not only did that create the .h and .c files, it also creates the
> .so
> library file gstmyplugin382.so.
> Wow, cool. So now I only have to copy the gstmyplugin382.so into the
> directory where all the other gst-plugins reside and GStreamer will
> magically see recognize it. Excellent! And so I copied
> gstmyplugin382.so to
> /usr/lib/x86_64-linux-gnu and ran gst-inspect-1.0. But no joy. It
> doesn't
> work.
> I have spent the day trying slight variations, searching the internet
> for
> solutions, and trying out different suggestions. And still no joy.
> Was this supposed to work? Am I missing a step? How is GStreamer
> supposed to
> recognize plugins?

The plugin name needs to match the lib.so name. If your plugin is named
"foo", the lib file should be named "libgstfoo.so".

Philippe
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer will not recognize my plugin

William
In reply to this post by William
Well OK. This is lame, but for the record the problem was that I was
putting it in the wrong directory. While there are a lot of libgst*.so
files in /usr/lib/x86_64-linux-gnu the place it actually needed to be
was in /usr/lib/x86_64-linux-gnu/gstreamer-1.0. Yeah, that cost me a
day. LOL

On 10/21/2019 4:43 PM, William wrote:

> So I'm trying to write a plugin and seemed to have tripped over the starting
> line. I have read in the docs that I should use gst-element-maker to create
> a basic template for a plugin. So I give it a try:
>
> ./gst-element-maker myplugin382 basetransform
>
> So not only did that create the .h and .c files, it also creates the .so
> library file gstmyplugin382.so.
> Wow, cool. So now I only have to copy the gstmyplugin382.so into the
> directory where all the other gst-plugins reside and GStreamer will
> magically see recognize it. Excellent! And so I copied gstmyplugin382.so to
> /usr/lib/x86_64-linux-gnu and ran gst-inspect-1.0. But no joy. It doesn't
> work.
> I have spent the day trying slight variations, searching the internet for
> solutions, and trying out different suggestions. And still no joy.
> Was this supposed to work? Am I missing a step? How is GStreamer supposed to
> recognize plugins?
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer will not recognize my plugin

David Ing
Another option is to set an environment variable GST_PLUGIN_PATH which points to a folder where your plugins are stored.  Sorry I didn't notify you a day earlier.

On Tue, Oct 22, 2019 at 7:42 AM William Johnston <[hidden email]> wrote:
Well OK. This is lame, but for the record the problem was that I was
putting it in the wrong directory. While there are a lot of libgst*.so
files in /usr/lib/x86_64-linux-gnu the place it actually needed to be
was in /usr/lib/x86_64-linux-gnu/gstreamer-1.0. Yeah, that cost me a
day. LOL

On 10/21/2019 4:43 PM, William wrote:
> So I'm trying to write a plugin and seemed to have tripped over the starting
> line. I have read in the docs that I should use gst-element-maker to create
> a basic template for a plugin. So I give it a try:
>
> ./gst-element-maker myplugin382 basetransform
>
> So not only did that create the .h and .c files, it also creates the .so
> library file gstmyplugin382.so.
> Wow, cool. So now I only have to copy the gstmyplugin382.so into the
> directory where all the other gst-plugins reside and GStreamer will
> magically see recognize it. Excellent! And so I copied gstmyplugin382.so to
> /usr/lib/x86_64-linux-gnu and ran gst-inspect-1.0. But no joy. It doesn't
> work.
> I have spent the day trying slight variations, searching the internet for
> solutions, and trying out different suggestions. And still no joy.
> Was this supposed to work? Am I missing a step? How is GStreamer supposed to
> recognize plugins?
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer will not recognize my plugin

William
I tried the and it didn't work when I tried it, but not because there was
anything wrong with the path. It turns out that the plugin I was trying to
use I compiled myself and the options weren't set just right for GStreamer
to recognize that it was a plugin. I have finally figured that out. Now I'm
trying to tell cmake how to compile plugins.


David Ing wrote
> Another option is to set an environment variable GST_PLUGIN_PATH which
> points to a folder where your plugins are stored.  Sorry I didn't notify
> you a day earlier.





--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer will not recognize my plugin

William
Well, I wanted to post this as it might be useful to someone else. The
biggest problem I has was in naming the library file. If the plugin is X
then the library file needs to be named "X.so" or "gstX.so" or "libgstX.so."
If it's anything else then gst-inspect-1.0 will give you the message:
Could not load plugin file: File "./libgstmyplugin38.so" is not a GStreamer
plugin
So, if you name your library "test.so" like I did, you will never get it to
work. This is for 1.16, naming the library "test.so" on 1.8 did work.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel