Sophie

Sophie

distrib > Mandriva > 10.0-com > i586 > by-pkgid > f0a9f2b9c81d34eadc43f527947c0b70 > files > 164

libgstreamer0.7-devel-0.7.4-2mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML
><HEAD
><TITLE
>GstElement properties</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="GStreamer Application Development Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Elements"
HREF="chapter-elements-api.html"><LINK
REL="PREVIOUS"
TITLE="Elements"
HREF="chapter-elements-api.html"><LINK
REL="NEXT"
TITLE="GstElement signals"
HREF="section-elements-signals.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
> Application Development Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="chapter-elements-api.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 12. Elements</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="section-elements-signals.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="section-elements-properties"
>12.2. GstElement properties</A
></H1
><P
> 
      A <CODE
CLASS="classname"
>GstElement</CODE
> can have several properties
      which are implemented using standard <CODE
CLASS="classname"
>GObject</CODE
>
      properties. The usual <CODE
CLASS="classname"
>GObject</CODE
> methods to query,
      set and get property values and <CODE
CLASS="classname"
>GParamSpecs</CODE
>
      are therefore supported.
    </P
><P
> 
      Every <CODE
CLASS="classname"
>GstElement</CODE
> inherits at least
      one property of its parent <CODE
CLASS="classname"
>GstObject</CODE
>:
      the "name" property. This is the name you provide to the
      functions <CODE
CLASS="function"
>gst_element_factory_make</CODE
> or
      <CODE
CLASS="function"
>gst_element_factory_create</CODE
>. You can get and set 
      this property using the functions 
      <CODE
CLASS="function"
>gst_object_set_name</CODE
>
      and <CODE
CLASS="function"
>gst_object_get_name</CODE
> or use the
      <CODE
CLASS="classname"
>GObject</CODE
> property mechanism as shown below.
    </P
><PRE
CLASS="programlisting"
>&#13; GstElement *element;
 GValue value = { 0, }; /* initialize the GValue for g_object_get() */

 element = gst_element_factory_make ("mad", "decoder");
 g_object_set (G_OBJECT (element), "name", "mydecoder", NULL);
 ...

 g_value_init (&#38;value, G_TYPE_STRING);
 g_object_get_property (G_OBJECT (element), "name", &#38;value);
 ...
    </PRE
><P
> 
      Most plugins provide additional properties to provide more information
      about their configuration or to configure the element. 
      <B
CLASS="command"
>gst-inspect</B
> is a useful tool to query the properties
      of a particular element, it will also use property introspection to give
      a short explanation about the function of the property and about the
      parameter types and ranges it supports.
    </P
><P
> 
      For more information about <CODE
CLASS="classname"
>GObject</CODE
>
      properties we recommend you read the <A
HREF="http://developer.gnome.org/doc/API/2.0/gobject/index.html"
TARGET="_top"
>GObject manual</A
> and an introduction to <A
HREF="http://le-hacker.org/papers/gobject/index.html"
TARGET="_top"
>&#13;      The Glib Object system</A
>.
    </P
></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-elements-api.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-elements-signals.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Elements</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="chapter-elements-api.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>GstElement signals</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>