[gst-devel] My First Plugin - Help please

Zhao Liang-E3423C E3423C at motorola.com
Wed Feb 4 02:26:32 CET 2009


Maybe you don't create pad when init, and just add template into class.

Try to create pad in element init. Example:

  srcpad = gst_pad_new_from_static_template (&srctemplate, "src");
  gst_element_add_pad (GST_ELEMENT (elem), srcpad); 

Zhao Liang

-----Original Message-----
From: Daniel James Laird [mailto:daniel.j.laird at nxp.com] 
Sent: Tuesday, February 03, 2009 9:34 PM
To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] My First Plugin - Help please

Thanks that solved it,

I am now busy trying to work out the following debug message:
GStreamer-WARNING **: Element myframedvideo0 has an ALWAYS template sink, but no pad of the same name

Any pointers appreciated!  
But I am now past the initial hurdles, many thanks for the help

Daniel Laird

-----Original Message-----
From: Tim-Philipp Müller [mailto:t.i.m at zen.co.uk]
Sent: 2009 Feb 03 12:28
To: gstreamer-devel at lists.sourceforge.net
Subject: Re: [gst-devel] My First Plugin - Help please

On Tue, 2009-02-03 at 13:05 +0100, Daniel James Laird wrote:

> That solved that issue.  The problem now is that it does not show up as a plugin at all.
> using gst-inspect to list plugins.

Try:

 $ GST_DEBUG=*:2 gst-inspect-0.10 /path/to/yourplugin.so

(or *:3 if the above didn't show any warnings).

Make sure the license string in your plugin's GST_PLUGIN_DEFINE() is one of the 'approved' strings (Use "Proprietary" if in doubt).

> I cannot work out when I should use BOILERPLATE_FULL and when I should  
> use GST_PLUGIN_DEFINE and gst_element_register as I cannot get a  
> GST_BOILERPLATE_FULL and GstVideoSink to register.  Am I missing  
> something really obvious? The manual is a bit vague at this point and  
> any help would be appreciated.

You absolutely need the GST_PLUGIN_DEFINE() block. In it you will reference a plugin_init() function, which you also need. In the
plugin_init() function you call gst_element_register() for each element you want to register. In order to do this, you need a GType. You *can* use GST_BOILERPLATE* if you like (it will define a foo_bar_get_type() function for you), but you don't have to if you prefer to do the
_get_type() function yourself.

Cheers
 -Tim



------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
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