[gst-devel] Re : Plugin creation

cammille at polytech.unice.fr cammille at polytech.unice.fr
Thu Mar 5 16:17:12 CET 2009


Thanks everybody !

I'm ok with you Albert, I think the simplest is RGB.. but there still is a
problem.
If I define a cap I have an error which is :
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not
negotiate format

So I tried to force the format in the pipeline and I have the same error !

here is my command : gst-launch
--gst-plugin-path=$HOME/gst-template/gst-plugin/src/.libs/ v4l2src  ! 
videoscale !  ffmpegcolorspace ! testfilter ! xvimagesink

I have searched in vain other examples...

It's strange, because in my code, if I change my buffer like that :
int i;
int size = GST_BUFFER_CAST(buf)->size;

for(i=1; i < size; i++) {
  (buf->data)[i] = 0;
}

The images become all green... I really don't understand why.

I think there is a simple way to just keep the red color.. but I don't
find it.



> Hi,
> the plugin name and description can (must...) be changed in the
> plugin_init function and GST_PLUGIN_DEFINE macro definition in the code
> that must be present in your code.
> Concerning the filtering itself, you must check that you have RGB (I guess
> that's the simplest) image buffers coming to your plugin in order to make
> your processing in the chain function. Best way would be to set the caps
> of your sink pad to video/x-rgb flow. Check other exisitng plugins to see
> how to do this. You'll need a ffmpegcolorspace element before your plugin
> to let the flow be in the good format.
> The example plugin is just a skeleton, you need now to specialize it with
> your own code... Read the gstreamer plugin writer's guide, it will give
> you information.
> Regards,
> Al
>
>
>
> ________________________________
> De : "cammille at polytech.unice.fr" <cammille at polytech.unice.fr>
> À : Discussion of the development of GStreamer
> <gstreamer-devel at lists.sourceforge.net>
> Envoyé le : Jeudi, 5 Mars 2009, 12h15mn 55s
> Objet : Re: [gst-devel] Plugin creation
>
> I found the problem ! The fact is that my plugin is not named
> "testfilter".. It's named "plugin". How can I change this name ? beacause
> I have never specified that my plugin is named "plugin".
>
> Another question, : now, I would like to create a simple plugin :
> I would like to filter the video taken by my webcam and filter the red
> color (i would like to apply an effect like the effectv plugin).
> I know the algorithm, but I'm not sure how to do that.
>
> Do you think I should create this plugin by using the example plugin ?
>
>
>> assuming that the shared library name is libgsttestfilters.so
>>
>> On Thu, Mar 5, 2009 at 4:28 PM, ved kpl <ved.kpl at gmail.com> wrote:
>>> Try gst-inspect on your plugin
>>>
>>> Assuming that the plugin is installed in
>>> "$HOME/gst-template/gst-plugin/src/.libs/"
>>> do the following and see what you get
>>>
>>>  gst-inspect
>>> $HOME/gst-template/gst-plugin/src/.libs/libgsttestfilters.so
>>>
>>> On Thu, Mar 5, 2009 at 4:15 PM,  <cammille at polytech.unice.fr> wrote:
>>>> Hello !
>>>> I would like to create a simple plugin such as effectv..
>>>>
>>>> But, first of all, I would like to create a "test plugin".
>>>> So, I tried to make the example described in the GStreamer Plugin
>>>> Writer's
>>>> Guide.
>>>>
>>>> I compiled the "test plugin" with the makefile, and now I'm trying to
>>>> launch this plugin, but I have an error..
>>>>
>>>> What's wrong with :
>>>>
>>>> $ gst-launch
>>>> --gst-plugin-path=$HOME/gst-template/gst-plugin/src/.libs/
>>>> fakesrc ! testfilters ! fakesink silent=TRUE
>>>>  > WARNING: erroneous pipeline: no element "testfilters"
>>>>
>>>> Maybe I have forgotten something ?
>>>>
>>>>
>>>> Thank you.
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Open Source Business Conference (OSBC), March 24-25, 2009, San
>>>> Francisco, CA
>>>> -OSBC tackles the biggest issue in open source: Open Sourcing the
>>>> Enterprise
>>>> -Strategies to boost innovation and cut costs with open source
>>>> participation
>>>> -Receive a $600 discount off the registration fee with the source
>>>> code:
>>>> SFAD
>>>> http://p.sf.net/sfu/XcvMzF8H
>>>> _______________________________________________
>>>> gstreamer-devel mailing list
>>>> gstreamer-devel at lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>>>
>>>
>>
>> ------------------------------------------------------------------------------
>> Open Source Business Conference (OSBC), March 24-25, 2009, San
>> Francisco,
>> CA
>> -OSBC tackles the biggest issue in open source: Open Sourcing the
>> Enterprise
>> -Strategies to boost innovation and cut costs with open source
>> participation
>> -Receive a $600 discount off the registration fee with the source code:
>> SFAD
>> http://p.sf.net/sfu/XcvMzF8H
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>
>
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
> CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the
> Enterprise
> -Strategies to boost innovation and cut costs with open source
> participation
> -Receive a $600 discount off the registration fee with the source code:
> SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
>
>       ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
> CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the
> Enterprise
> -Strategies to boost innovation and cut costs with open source
> participation
> -Receive a $600 discount off the registration fee with the source code:
> SFAD
> http://p.sf.net/sfu/XcvMzF8H_______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>






More information about the gstreamer-devel mailing list