Newbie query: Boilerplate code created by gst-element-maker does not compile

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

Newbie query: Boilerplate code created by gst-element-maker does not compile

Mandeep Sandhu
Hi All,

I'm newbie who's recently jumped into playing around with GStreamer.

I have gone through "GStreamer Application Development Manual" to get
a basic idea of the various Gstreamer concepts. Currently, I'm reading
the "GStreamer Plugin Writer's Guide (1.0.2)" to get a very basic
plugin working (only for my own understanding).

For creating the basic template of a plugin, I was using the
"make_element" tool which comes along with the gst-template repo.

The template code created by this tool compiles fine, however it does
not get recognized when I try to use it a sample pipeline. I construct
the pipline as follows (after building the plugin):

$ gst-launch-0.10 -v
--gst-plugin-path=/home/mandeep/work/gstreamer/gst-template/gst-plugin/src/.libs/
fakesrc ! myfilter ! fakesink silent=TRUE
WARNING: erroneous pipeline: no element "myfilter"
$

Somehow, my plugin is not 'registered' with gstreamer. Any idea how to
get this working?

The plugin guide has a "NOTE" that states one should use
"gst-element-maker" from the gst-plugins-bad repo. However, the
template code created by this tool does not compile. Here's what I
did:

$ gst-element-maker MyFilter basesink
../../../gst-plugins-bad/tools/gst-element-maker: 376:
../../../gst-plugins-bad/tools/gst-element-maker: gst-indent: not
found
pkg is gstreamer-base-0.10
gstmyfilter.c: In function ‘gst_myfilter_base_init’:
gstmyfilter.c:109:3: warning: implicit declaration of function
‘gst_element_class_set_static_metadata’
[-Wimplicit-function-declaration]
gstmyfilter.c: At top level:
gstmyfilter.c:324:1: error: ‘myfilter’ undeclared here (not in a function)

Any idea how to fix this error?

The files generated by the above command are: gstmyfilter.h and
gstmyfilter.c (I have altered Makefile.am accordingly to add these 2
new files for building.

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

Re: Newbie query: Boilerplate code created by gst-element-maker does not compile

Mandeep Sandhu
Anyone?

How does one make an existing gstreamer package (installed in Ubuntu
12.10) recognize/register a custom plugin?

Thanks,
-mandeep


On Mon, Oct 29, 2012 at 7:13 PM, Mandeep Sandhu
<[hidden email]> wrote:

> Hi All,
>
> I'm newbie who's recently jumped into playing around with GStreamer.
>
> I have gone through "GStreamer Application Development Manual" to get
> a basic idea of the various Gstreamer concepts. Currently, I'm reading
> the "GStreamer Plugin Writer's Guide (1.0.2)" to get a very basic
> plugin working (only for my own understanding).
>
> For creating the basic template of a plugin, I was using the
> "make_element" tool which comes along with the gst-template repo.
>
> The template code created by this tool compiles fine, however it does
> not get recognized when I try to use it a sample pipeline. I construct
> the pipline as follows (after building the plugin):
>
> $ gst-launch-0.10 -v
> --gst-plugin-path=/home/mandeep/work/gstreamer/gst-template/gst-plugin/src/.libs/
> fakesrc ! myfilter ! fakesink silent=TRUE
> WARNING: erroneous pipeline: no element "myfilter"
> $
>
> Somehow, my plugin is not 'registered' with gstreamer. Any idea how to
> get this working?
>
> The plugin guide has a "NOTE" that states one should use
> "gst-element-maker" from the gst-plugins-bad repo. However, the
> template code created by this tool does not compile. Here's what I
> did:
>
> $ gst-element-maker MyFilter basesink
> ../../../gst-plugins-bad/tools/gst-element-maker: 376:
> ../../../gst-plugins-bad/tools/gst-element-maker: gst-indent: not
> found
> pkg is gstreamer-base-0.10
> gstmyfilter.c: In function ‘gst_myfilter_base_init’:
> gstmyfilter.c:109:3: warning: implicit declaration of function
> ‘gst_element_class_set_static_metadata’
> [-Wimplicit-function-declaration]
> gstmyfilter.c: At top level:
> gstmyfilter.c:324:1: error: ‘myfilter’ undeclared here (not in a function)
>
> Any idea how to fix this error?
>
> The files generated by the above command are: gstmyfilter.h and
> gstmyfilter.c (I have altered Makefile.am accordingly to add these 2
> new files for building.
>
> Regards,
> -mandeep
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Newbie query: Boilerplate code created by gst-element-maker does not compile

Atish Nazir
You can drop files into the plugin directory and they'll be picked up.  On my Xubuntu for example:

/usr/lib/x86_64-linux-gnu/gstreamer-0.10/

However IMHO using environment variable GST_PLUGIN_PATH to override the search path is a better thing to do during development.


On 31 October 2012 10:55, Mandeep Sandhu <[hidden email]> wrote:
Anyone?

How does one make an existing gstreamer package (installed in Ubuntu
12.10) recognize/register a custom plugin?

Thanks,
-mandeep


On Mon, Oct 29, 2012 at 7:13 PM, Mandeep Sandhu
<[hidden email]> wrote:
> Hi All,
>
> I'm newbie who's recently jumped into playing around with GStreamer.
>
> I have gone through "GStreamer Application Development Manual" to get
> a basic idea of the various Gstreamer concepts. Currently, I'm reading
> the "GStreamer Plugin Writer's Guide (1.0.2)" to get a very basic
> plugin working (only for my own understanding).
>
> For creating the basic template of a plugin, I was using the
> "make_element" tool which comes along with the gst-template repo.
>
> The template code created by this tool compiles fine, however it does
> not get recognized when I try to use it a sample pipeline. I construct
> the pipline as follows (after building the plugin):
>
> $ gst-launch-0.10 -v
> --gst-plugin-path=/home/mandeep/work/gstreamer/gst-template/gst-plugin/src/.libs/
> fakesrc ! myfilter ! fakesink silent=TRUE
> WARNING: erroneous pipeline: no element "myfilter"
> $
>
> Somehow, my plugin is not 'registered' with gstreamer. Any idea how to
> get this working?
>
> The plugin guide has a "NOTE" that states one should use
> "gst-element-maker" from the gst-plugins-bad repo. However, the
> template code created by this tool does not compile. Here's what I
> did:
>
> $ gst-element-maker MyFilter basesink
> ../../../gst-plugins-bad/tools/gst-element-maker: 376:
> ../../../gst-plugins-bad/tools/gst-element-maker: gst-indent: not
> found
> pkg is gstreamer-base-0.10
> gstmyfilter.c: In function ‘gst_myfilter_base_init’:
> gstmyfilter.c:109:3: warning: implicit declaration of function
> ‘gst_element_class_set_static_metadata’
> [-Wimplicit-function-declaration]
> gstmyfilter.c: At top level:
> gstmyfilter.c:324:1: error: ‘myfilter’ undeclared here (not in a function)
>
> Any idea how to fix this error?
>
> The files generated by the above command are: gstmyfilter.h and
> gstmyfilter.c (I have altered Makefile.am accordingly to add these 2
> new files for building.
>
> Regards,
> -mandeep
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


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

Re: Newbie query: Boilerplate code created by gst-element-maker does not compile

Krzysztof Konopko
In reply to this post by Mandeep Sandhu
Have you tried it with GStreamer-1.0? There might be some subtle
differences as the guide is updated to conform to GStreamer-1.0.

It worked for me with GStreamer-1.0 without a hitch (just make sure you
use "myfilter" consistently (rather than "my_filter").

Kris

On 31/10/12 10:55, Mandeep Sandhu wrote:

> Anyone?
>
> How does one make an existing gstreamer package (installed in Ubuntu
> 12.10) recognize/register a custom plugin?
>
> Thanks,
> -mandeep
>
>
> On Mon, Oct 29, 2012 at 7:13 PM, Mandeep Sandhu
> <[hidden email]> wrote:
>> Hi All,
>>
>> I'm newbie who's recently jumped into playing around with GStreamer.
>>
>> I have gone through "GStreamer Application Development Manual" to get
>> a basic idea of the various Gstreamer concepts. Currently, I'm reading
>> the "GStreamer Plugin Writer's Guide (1.0.2)" to get a very basic
>> plugin working (only for my own understanding).
>>
>> For creating the basic template of a plugin, I was using the
>> "make_element" tool which comes along with the gst-template repo.
>>
>> The template code created by this tool compiles fine, however it does
>> not get recognized when I try to use it a sample pipeline. I construct
>> the pipline as follows (after building the plugin):
>>
>> $ gst-launch-0.10 -v
>> --gst-plugin-path=/home/mandeep/work/gstreamer/gst-template/gst-plugin/src/.libs/
>> fakesrc ! myfilter ! fakesink silent=TRUE
>> WARNING: erroneous pipeline: no element "myfilter"
>> $
>>
>> Somehow, my plugin is not 'registered' with gstreamer. Any idea how to
>> get this working?
>>
>> The plugin guide has a "NOTE" that states one should use
>> "gst-element-maker" from the gst-plugins-bad repo. However, the
>> template code created by this tool does not compile. Here's what I
>> did:
>>
>> $ gst-element-maker MyFilter basesink
>> ../../../gst-plugins-bad/tools/gst-element-maker: 376:
>> ../../../gst-plugins-bad/tools/gst-element-maker: gst-indent: not
>> found
>> pkg is gstreamer-base-0.10
>> gstmyfilter.c: In function ‘gst_myfilter_base_init’:
>> gstmyfilter.c:109:3: warning: implicit declaration of function
>> ‘gst_element_class_set_static_metadata’
>> [-Wimplicit-function-declaration]
>> gstmyfilter.c: At top level:
>> gstmyfilter.c:324:1: error: ‘myfilter’ undeclared here (not in a function)
>>
>> Any idea how to fix this error?
>>
>> The files generated by the above command are: gstmyfilter.h and
>> gstmyfilter.c (I have altered Makefile.am accordingly to add these 2
>> new files for building.
>>
>> Regards,
>> -mandeep
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>

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

Re: Newbie query: Boilerplate code created by gst-element-maker does not compile

Mandeep Sandhu
In reply to this post by Atish Nazir
On Wed, Oct 31, 2012 at 5:40 PM, Atish Nazir
<[hidden email]> wrote:
> You can drop files into the plugin directory and they'll be picked up.  On
> my Xubuntu for example:
>
> /usr/lib/x86_64-linux-gnu/gstreamer-0.10/
>
> However IMHO using environment variable GST_PLUGIN_PATH to override the
> search path is a better thing to do during development.

Thats exactly what I did (as the docs too mention the same). However,
it still can't find my plugin! :/

...and I'm trying with gstreamer-0.10 (that comes with Ubuntu 12.10).

Neither gst-inspect nor gst-launch work.

Another thing I tried was to explicitly mention the path to the plugin
lib to the gst-launch command:

$ gst-launch-0.10 -v
--gst-plugin-path=/home/mandeep/work/gstreamer/gst-template/gst-plugin/src/.libs/
fakesrc ! myfilter ! fakesink silent=TRUE
WARNING: erroneous pipeline: no element "myfilter"
$

However, this too doesn't work.

Thanks,
-mandeep


> On 31 October 2012 10:55, Mandeep Sandhu <[hidden email]>
> wrote:
>>
>> Anyone?
>>
>> How does one make an existing gstreamer package (installed in Ubuntu
>> 12.10) recognize/register a custom plugin?
>>
>> Thanks,
>> -mandeep
>>
>>
>> On Mon, Oct 29, 2012 at 7:13 PM, Mandeep Sandhu
>> <[hidden email]> wrote:
>> > Hi All,
>> >
>> > I'm newbie who's recently jumped into playing around with GStreamer.
>> >
>> > I have gone through "GStreamer Application Development Manual" to get
>> > a basic idea of the various Gstreamer concepts. Currently, I'm reading
>> > the "GStreamer Plugin Writer's Guide (1.0.2)" to get a very basic
>> > plugin working (only for my own understanding).
>> >
>> > For creating the basic template of a plugin, I was using the
>> > "make_element" tool which comes along with the gst-template repo.
>> >
>> > The template code created by this tool compiles fine, however it does
>> > not get recognized when I try to use it a sample pipeline. I construct
>> > the pipline as follows (after building the plugin):
>> >
>> > $ gst-launch-0.10 -v
>> >
>> > --gst-plugin-path=/home/mandeep/work/gstreamer/gst-template/gst-plugin/src/.libs/
>> > fakesrc ! myfilter ! fakesink silent=TRUE
>> > WARNING: erroneous pipeline: no element "myfilter"
>> > $
>> >
>> > Somehow, my plugin is not 'registered' with gstreamer. Any idea how to
>> > get this working?
>> >
>> > The plugin guide has a "NOTE" that states one should use
>> > "gst-element-maker" from the gst-plugins-bad repo. However, the
>> > template code created by this tool does not compile. Here's what I
>> > did:
>> >
>> > $ gst-element-maker MyFilter basesink
>> > ../../../gst-plugins-bad/tools/gst-element-maker: 376:
>> > ../../../gst-plugins-bad/tools/gst-element-maker: gst-indent: not
>> > found
>> > pkg is gstreamer-base-0.10
>> > gstmyfilter.c: In function ‘gst_myfilter_base_init’:
>> > gstmyfilter.c:109:3: warning: implicit declaration of function
>> > ‘gst_element_class_set_static_metadata’
>> > [-Wimplicit-function-declaration]
>> > gstmyfilter.c: At top level:
>> > gstmyfilter.c:324:1: error: ‘myfilter’ undeclared here (not in a
>> > function)
>> >
>> > Any idea how to fix this error?
>> >
>> > The files generated by the above command are: gstmyfilter.h and
>> > gstmyfilter.c (I have altered Makefile.am accordingly to add these 2
>> > new files for building.
>> >
>> > Regards,
>> > -mandeep
>> _______________________________________________
>> gstreamer-devel mailing list
>> [hidden email]
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Newbie query: Boilerplate code created by gst-element-maker does not compile

Mandeep Sandhu
In reply to this post by Krzysztof Konopko
On Thu, Nov 1, 2012 at 6:02 PM, Krzysztof Konopko
<[hidden email]> wrote:
> Have you tried it with GStreamer-1.0? There might be some subtle

Nopes. Haven't tried gstreamer 1.0 yet. I guess I'll have to build
that from source

> differences as the guide is updated to conform to GStreamer-1.0.

Actually, leaving that 'NOTE' which asks the user to try
gst-element-maker, the rest of the docs seem to refer to the old
gstreamer (I might be wrong though). Some of the code snippets in the
manual don't _exactly_ match the boilerplate code generated by the old
'make_element' tool. Or maybe it's the other way around, i.e the code
snippet is from the newer gst-element-maker! :)


>
> It worked for me with GStreamer-1.0 without a hitch (just make sure you
> use "myfilter" consistently (rather than "my_filter").

Good point. I'll look into thie name's usage in my code.

Thanks,
-mandeep

>
> Kris
>
> On 31/10/12 10:55, Mandeep Sandhu wrote:
>> Anyone?
>>
>> How does one make an existing gstreamer package (installed in Ubuntu
>> 12.10) recognize/register a custom plugin?
>>
>> Thanks,
>> -mandeep
>>
>>
>> On Mon, Oct 29, 2012 at 7:13 PM, Mandeep Sandhu
>> <[hidden email]> wrote:
>>> Hi All,
>>>
>>> I'm newbie who's recently jumped into playing around with GStreamer.
>>>
>>> I have gone through "GStreamer Application Development Manual" to get
>>> a basic idea of the various Gstreamer concepts. Currently, I'm reading
>>> the "GStreamer Plugin Writer's Guide (1.0.2)" to get a very basic
>>> plugin working (only for my own understanding).
>>>
>>> For creating the basic template of a plugin, I was using the
>>> "make_element" tool which comes along with the gst-template repo.
>>>
>>> The template code created by this tool compiles fine, however it does
>>> not get recognized when I try to use it a sample pipeline. I construct
>>> the pipline as follows (after building the plugin):
>>>
>>> $ gst-launch-0.10 -v
>>> --gst-plugin-path=/home/mandeep/work/gstreamer/gst-template/gst-plugin/src/.libs/
>>> fakesrc ! myfilter ! fakesink silent=TRUE
>>> WARNING: erroneous pipeline: no element "myfilter"
>>> $
>>>
>>> Somehow, my plugin is not 'registered' with gstreamer. Any idea how to
>>> get this working?
>>>
>>> The plugin guide has a "NOTE" that states one should use
>>> "gst-element-maker" from the gst-plugins-bad repo. However, the
>>> template code created by this tool does not compile. Here's what I
>>> did:
>>>
>>> $ gst-element-maker MyFilter basesink
>>> ../../../gst-plugins-bad/tools/gst-element-maker: 376:
>>> ../../../gst-plugins-bad/tools/gst-element-maker: gst-indent: not
>>> found
>>> pkg is gstreamer-base-0.10
>>> gstmyfilter.c: In function ‘gst_myfilter_base_init’:
>>> gstmyfilter.c:109:3: warning: implicit declaration of function
>>> ‘gst_element_class_set_static_metadata’
>>> [-Wimplicit-function-declaration]
>>> gstmyfilter.c: At top level:
>>> gstmyfilter.c:324:1: error: ‘myfilter’ undeclared here (not in a function)
>>>
>>> Any idea how to fix this error?
>>>
>>> The files generated by the above command are: gstmyfilter.h and
>>> gstmyfilter.c (I have altered Makefile.am accordingly to add these 2
>>> new files for building.
>>>
>>> Regards,
>>> -mandeep
>> _______________________________________________
>> gstreamer-devel mailing list
>> [hidden email]
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel