[gst-devel] Specifying Pads (Ch4)

Brian Michalk michalk at awpi.com
Wed Feb 9 19:25:17 CET 2011


I'm reading the plugin developer guide, chapter 4, and reading some 
sample plugins, in this case gstgamma.c.

In chapter 4, it says:
"In the element |_init ()| function, you create the pad from the pad 
template that has been registered with the element class in the 
|_base_init ()| function. After creating the pad, you have to set a 
|_setcaps ()| function pointer and optionally a |_getcaps ()| function 
pointer. Also, you have to set a |_chain ()| function pointer. 
Alternatively, pads can also operate in looping mode, which means that 
they can pull data themselves. More on this topic later. After that, you 
have to register the pad with the element. This happens like this:"

gstgamma sets a set_caps, transform_ip and before_transform functions, 
but does not set a chain function.
In my code that I started from boilerplate, set_caps is not set 
anywhere, but the plugin installs, and the trivial case displays video.  
As I progress, I'm finding some functionality that I assume doesn't work 
because I need to initialize the capability.  For example, calling 
gst_video_format_get_component_width() complains because it says the 
format doesn't match.

I suppose I'm asking if these functions get added by default, and 
second, should I take the writers guide as truth, or more of a suggestion?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110209/d4218b21/attachment.htm>
-------------- next part --------------
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
-------------- next part --------------
_______________________________________________
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