<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML ><HEAD ><TITLE >Getting Started</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="GStreamer Plugin Writer's Guide" HREF="index.html"><LINK REL="UP" TITLE="Supporting Dynamic Parameters" HREF="chapter-dparams.html"><LINK REL="PREVIOUS" TITLE="Supporting Dynamic Parameters" HREF="chapter-dparams.html"><LINK REL="NEXT" TITLE="Defining Parameter Specificiations" HREF="section-dparam-define.html"></HEAD ><BODY CLASS="sect1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" ><SPAN CLASS="application" >GStreamer</SPAN > Plugin Writer's Guide</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="chapter-dparams.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Chapter 16. Supporting Dynamic Parameters</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="section-dparam-define.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="sect1" ><H1 CLASS="sect1" ><A NAME="section-dparam-start" >16.2. Getting Started</A ></H1 ><P > The dparams subsystem is contained within the <TT CLASS="filename" >gstcontrol</TT > library. You need to include the header in your element's source file: </P ><PRE CLASS="programlisting" > #include <gst/control/control.h> </PRE ><P > Even though the <TT CLASS="filename" >gstcontrol</TT > library may be linked into the host application, you should make sure it is loaded in your <TT CLASS="filename" >plugin_init</TT > function: </P ><PRE CLASS="programlisting" > static gboolean plugin_init (GModule *module, GstPlugin *plugin) { ... /* load dparam support library */ if (!gst_library_load ("gstcontrol")) { gst_info ("example: could not load support library: 'gstcontrol'\n"); return FALSE; } ... } </PRE ><P > You need to store an instance of <TT CLASS="filename" >GstDParamManager</TT > in your element's struct: </P ><PRE CLASS="programlisting" > struct _GstExample { GstElement element; ... GstDParamManager *dpman; ... }; </PRE ><P > The <TT CLASS="filename" >GstDParamManager</TT > can be initialised in your element's init function: </P ><PRE CLASS="programlisting" > static void gst_example_init (GstExample *example) { ... example->dpman = gst_dpman_new ("example_dpman", GST_ELEMENT(example)); ... } </PRE ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="chapter-dparams.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="section-dparam-define.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Supporting Dynamic Parameters</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="chapter-dparams.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Defining Parameter Specificiations</TD ></TR ></TABLE ></DIV ></BODY ></HTML >