Sophie

Sophie

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

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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML
><HEAD
><TITLE
>Constructing the Boilerplate</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="Building a Filter"
HREF="part-building.html"><LINK
REL="PREVIOUS"
TITLE="Building a Filter"
HREF="part-building.html"><LINK
REL="NEXT"
TITLE="Using the Project Stamp"
HREF="section-boiler-project-stamp.html"></HEAD
><BODY
CLASS="chapter"
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="part-building.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="section-boiler-project-stamp.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="chapter"
><H1
><A
NAME="chapter-building-boiler"
></A
>Chapter 3. Constructing the Boilerplate</H1
><P
>&#13;    In this chapter you will learn how to construct the bare minimum code for a
    new plugin. Starting from ground zero, you will see how to get the
    <SPAN
CLASS="application"
>GStreamer</SPAN
> template source. Then you will learn how to use a few basic
    tools to copy and modify a template plugin to create a new plugin. If you
    follow the examples here, then by the end of this chapter you will have a
    functional audio filter plugin that you can compile and use in <SPAN
CLASS="application"
>GStreamer</SPAN
>
    applications.
  </P
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="section-boiler-source"
>3.1. Getting the GStreamer Plugin Templates</A
></H1
><P
>&#13;      There are currently two ways to develop a new plugin for <SPAN
CLASS="application"
>GStreamer</SPAN
>: You
      can write the entire plugin by hand, or you can copy an existing plugin
      template and write the plugin code you need. The second method is by far
      the simpler of the two, so the first method will not even be described
      here. (Errm, that is, <SPAN
CLASS="QUOTE"
>"it is left as an exercise to the
      reader."</SPAN
>)
    </P
><P
>&#13;      The first step is to check out a copy of the
      <TT
CLASS="filename"
>gst-template</TT
> CVS module to get an important tool and
      the source code template for a basic <SPAN
CLASS="application"
>GStreamer</SPAN
> plugin. To check out the
      <TT
CLASS="filename"
>gst-template</TT
> module, make sure you are connected to
      the internet, and type the following commands at a command console:
    </P
><PRE
CLASS="screen"
>&#13;<SAMP
CLASS="prompt"
>shell $ </SAMP
><KBD
CLASS="userinput"
>cd .</KBD
>
<SAMP
CLASS="prompt"
>shell $ </SAMP
><KBD
CLASS="userinput"
>cvs -d:pserver:anonymous@cvs.freedesktop.org:/home/cvs/gstreamer login</KBD
>
Logging in to :pserver:anonymous@cvs.freedesktop.org:2401/home/cvs/gstreamer
CVS password:
<SAMP
CLASS="prompt"
>shell $ </SAMP
><KBD
CLASS="userinput"
>cvs -z3 -d:pserver:anonymous@cvs.freedesktop.org:/home/cvs/gstreamer co gst-template</KBD
>
U gst-template/README
U gst-template/gst-app/AUTHORS
U gst-template/gst-app/ChangeLog
U gst-template/gst-app/Makefile.am
U gst-template/gst-app/NEWS
U gst-template/gst-app/README
U gst-template/gst-app/autogen.sh
U gst-template/gst-app/configure.ac
U gst-template/gst-app/src/Makefile.am
...
    </PRE
><P
>&#13;      After the first command, you will have to press <B
CLASS="keycap"
>ENTER</B
> to
      log in to the CVS server. (You might have to log in twice.) The second
      command will check out a series of files and directories into <TT
CLASS="filename"
>./gst-template</TT
>. The template you will be
      using is in <TT
CLASS="filename"
>./gst-template/gst-plugin/</TT
> directory. You
      should look over the files in that directory to get a general idea of the
      structure of a source tree for a plugin.
    </P
></DIV
></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="part-building.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-boiler-project-stamp.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Building a Filter</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="part-building.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Using the Project Stamp</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>