<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML ><HEAD ><TITLE >GStreamer Plugin Writer's Guide</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="NEXT" TITLE="Introduction" HREF="part-introduction.html"></HEAD ><BODY CLASS="book" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="BOOK" ><A NAME="index" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" ><A NAME="AEN2" ><SPAN CLASS="application" >GStreamer</SPAN > Plugin Writer's Guide</A ></H1 ><H3 CLASS="author" ><A NAME="AEN4" ></A >Richard John Boulton</H3 ><H3 CLASS="author" ><A NAME="AEN11" ></A >Erik Walthinsen</H3 ><H3 CLASS="author" ><A NAME="AEN17" ></A >Steve Baker</H3 ><H3 CLASS="author" ><A NAME="AEN23" ></A >Leif Johnson</H3 ><H3 CLASS="author" ><A NAME="AEN29" ></A >Ronald S. Bultje</H3 ><DIV CLASS="legalnotice" ><P ></P ><A NAME="misc-legalnotice" ></A ><P > This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at <A HREF="http://www.opencontent.org/openpub/" TARGET="_top" >http://www.opencontent.org/openpub/</A >). </P ><P ></P ></DIV ><HR></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Table of Contents</B ></DT ><DT >I. <A HREF="part-introduction.html" >Introduction</A ></DT ><DD ><DL ><DT >1. <A HREF="chapter-intro-preface.html" >Preface</A ></DT ><DD ><DL ><DT >1.1. <A HREF="chapter-intro-preface.html#section-preface-who" >Who Should Read This Guide?</A ></DT ><DT >1.2. <A HREF="section-preface-reading.html" >Preliminary Reading</A ></DT ><DT >1.3. <A HREF="section-preface-structure.html" >Structure of This Guide</A ></DT ></DL ></DD ><DT >2. <A HREF="chapter-intro-basics.html" >Basic Concepts</A ></DT ><DD ><DL ><DT >2.1. <A HREF="chapter-intro-basics.html#section-basics-elements" >Elements and Plugins</A ></DT ><DT >2.2. <A HREF="section-basics-pads.html" >Pads</A ></DT ><DT >2.3. <A HREF="section-basics-data.html" >Data, Buffers and Events</A ></DT ><DT >2.4. <A HREF="section-basics-types.html" >Mimetypes and Properties</A ></DT ></DL ></DD ></DL ></DD ><DT >II. <A HREF="part-building.html" >Building a Filter</A ></DT ><DD ><DL ><DT >3. <A HREF="chapter-building-boiler.html" >Constructing the Boilerplate</A ></DT ><DD ><DL ><DT >3.1. <A HREF="chapter-building-boiler.html#section-boiler-source" >Getting the GStreamer Plugin Templates</A ></DT ><DT >3.2. <A HREF="section-boiler-project-stamp.html" >Using the Project Stamp</A ></DT ><DT >3.3. <A HREF="section-boiler-examine.html" >Examining the Basic Code</A ></DT ><DT >3.4. <A HREF="section-boiler-details.html" >GstElementDetails</A ></DT ><DT >3.5. <A HREF="section-boiler-padtemplates.html" >GstStaticPadTemplate</A ></DT ><DT >3.6. <A HREF="section-boiler-constructors.html" >Constructor Functions</A ></DT ><DT >3.7. <A HREF="section-boiler-plugininit.html" >The plugin_init function</A ></DT ></DL ></DD ><DT >4. <A HREF="chapter-building-pads.html" >Specifying the pads</A ></DT ><DD ><DL ><DT >4.1. <A HREF="chapter-building-pads.html#section-pads-linkfn" >The link function</A ></DT ><DT >4.2. <A HREF="section-pads-getcapsfn.html" >The getcaps function</A ></DT ><DT >4.3. <A HREF="section-pads-explicitcaps.html" >Explicit caps</A ></DT ></DL ></DD ><DT >5. <A HREF="chapter-building-chainfn.html" >The chain function</A ></DT ><DT >6. <A HREF="chapter-statemanage-states.html" >What are states?</A ></DT ><DD ><DL ><DT >6.1. <A HREF="chapter-statemanage-states.html#section-statemanage-filters" >Mangaging filter state</A ></DT ></DL ></DD ><DT >7. <A HREF="chapter-building-args.html" >Adding Arguments</A ></DT ><DT >8. <A HREF="chapter-building-signals.html" >Signals</A ></DT ><DT >9. <A HREF="chapter-building-testapp.html" >Building a Test Application</A ></DT ><DT >10. <A HREF="chapter-building-filterfactory.html" >Creating a Filter with a Filter Factory</A ></DT ></DL ></DD ><DT >III. <A HREF="part-advanced.html" >Advanced Filter Concepts</A ></DT ><DD ><DL ><DT >11. <A HREF="chapter-loopbased-sched.html" >How scheduling works</A ></DT ><DD ><DL ><DT >11.1. <A HREF="chapter-loopbased-sched.html#section-sched-basic" >The Basic Scheduler</A ></DT ><DT >11.2. <A HREF="section-sched-opt.html" >The Optimal Scheduler</A ></DT ></DL ></DD ><DT >12. <A HREF="chapter-loopbased-loopfn.html" >How a loopfunc works</A ></DT ><DD ><DL ><DT >12.1. <A HREF="chapter-loopbased-loopfn.html#section-loopfn-multiinput" >Multi-Input Elements</A ></DT ><DT >12.2. <A HREF="section-loopfn-bytestream.html" >The Bytestream Object</A ></DT ><DT >12.3. <A HREF="section-loopbased-secnd.html" >Adding a second output</A ></DT ><DT >12.4. <A HREF="section-loopbased-modappl.html" >Modifying the test application</A ></DT ></DL ></DD ><DT >13. <A HREF="chapter-building-types.html" >Types and Properties</A ></DT ><DD ><DL ><DT >13.1. <A HREF="chapter-building-types.html#section-types-test" >Building a Simple Format for Testing</A ></DT ><DT >13.2. <A HREF="section-types-typefind.html" >Typefind Functions and Autoplugging</A ></DT ><DT >13.3. <A HREF="section-types-definitions.html" >List of Defined Types</A ></DT ></DL ></DD ><DT >14. <A HREF="chapter-advanced-request.html" >Request and Sometimes pads</A ></DT ><DD ><DL ><DT >14.1. <A HREF="chapter-advanced-request.html#section-reqpad-sometimes" >Sometimes pads</A ></DT ><DT >14.2. <A HREF="section-reqpad-request.html" >Request pads</A ></DT ></DL ></DD ><DT >15. <A HREF="chapter-advanced-clock.html" >Clocking</A ></DT ><DT >16. <A HREF="chapter-dparams.html" >Supporting Dynamic Parameters</A ></DT ><DD ><DL ><DT >16.1. <A HREF="chapter-dparams.html#section-dparams-compare" >Comparing Dynamic Parameters with GObject Properties</A ></DT ><DT >16.2. <A HREF="section-dparam-start.html" >Getting Started</A ></DT ><DT >16.3. <A HREF="section-dparam-define.html" >Defining Parameter Specificiations</A ></DT ><DT >16.4. <A HREF="chapter-dparam-loop.html" >The Data Processing Loop</A ></DT ></DL ></DD ><DT >17. <A HREF="chapter-advanced-midi.html" >MIDI</A ></DT ><DT >18. <A HREF="chapter-advanced-interfaces.html" >Interfaces</A ></DT ><DD ><DL ><DT >18.1. <A HREF="chapter-advanced-interfaces.html#section-iface-general" >How to Implement Interfaces</A ></DT ><DT >18.2. <A HREF="section-iface-mixer.html" >Mixer Interface</A ></DT ><DT >18.3. <A HREF="section-iface-tuner.html" >Tuner Interface</A ></DT ><DT >18.4. <A HREF="section-iface-colorbalance.html" >Color Balance Interface</A ></DT ><DT >18.5. <A HREF="section-iface-propprobe.html" >Property Probe Interface</A ></DT ><DT >18.6. <A HREF="section-iface-profile.html" >Profile Interface</A ></DT ><DT >18.7. <A HREF="section-iface-xoverlay.html" >X Overlay Interface</A ></DT ><DT >18.8. <A HREF="section-iface-navigation.html" >Navigation Interface</A ></DT ></DL ></DD ><DT >19. <A HREF="chapter-advanced-tagging.html" >Tagging (Metadata and Streaminfo)</A ></DT ><DD ><DL ><DT >19.1. <A HREF="chapter-advanced-tagging.html#section-tagging-read" >Reading Tags from Streams</A ></DT ><DT >19.2. <A HREF="section-tagging-write.html" >Writing Tags to Streams</A ></DT ></DL ></DD ><DT >20. <A HREF="chapter-advanced-events.html" >Events: Seeking, Navigation and More</A ></DT ><DD ><DL ><DT >20.1. <A HREF="chapter-advanced-events.html#section-events-downstream" >Downstream events</A ></DT ><DT >20.2. <A HREF="section-events-upstream.html" >Upstream events</A ></DT ><DT >20.3. <A HREF="section-events-definitions.html" >All Events Together</A ></DT ></DL ></DD ></DL ></DD ><DT >IV. <A HREF="part-other.html" >Other Element Types</A ></DT ><DD ><DL ><DT >21. <A HREF="chapter-other-source.html" >Writing a Source</A ></DT ><DT >22. <A HREF="chapter-other-sink.html" >Writing a Sink</A ></DT ><DT >23. <A HREF="chapter-other-oneton.html" >Writing a 1-to-N element</A ></DT ><DD ><DL ><DT >23.1. <A HREF="chapter-other-oneton.html#section-other-demuxer" >Writing a Demuxer</A ></DT ></DL ></DD ><DT >24. <A HREF="chapter-other-ntoone.html" >Writing a N-to-1 Element</A ></DT ><DD ><DL ><DT >24.1. <A HREF="chapter-other-ntoone.html#section-other-muxer" >Writing a Muxer</A ></DT ></DL ></DD ><DT >25. <A HREF="chapter-other-nton.html" >Writing a N-to-N element</A ></DT ><DT >26. <A HREF="chapter-other-autoplugger.html" >Writing an Autoplugger</A ></DT ><DT >27. <A HREF="chapter-other-manager.html" >Writing a Manager</A ></DT ></DL ></DD ><DT >V. <A HREF="part-appendix.html" >Appendices</A ></DT ><DD ><DL ><DT >28. <A HREF="chapter-checklist-element.html" >Things to check when writing an element</A ></DT ><DT >29. <A HREF="chapter-checklist-filter.html" >Things to check when writing a filter</A ></DT ><DT >30. <A HREF="chapter-checklist-srcsink.html" >Things to check when writing a source or sink</A ></DT ></DL ></DD ></DL ></DIV ><DIV CLASS="LOT" ><DL CLASS="LOT" ><DT ><B >List of Tables</B ></DT ><DT >2-1. <A HREF="section-basics-types.html#table-basictypes" >Table of Basic Types</A ></DT ><DT >13-1. <A HREF="section-types-definitions.html#table-audio-types" >Table of Audio Types</A ></DT ><DT >13-2. <A HREF="section-types-definitions.html#table-video-types" >Table of Video Types</A ></DT ><DT >13-3. <A HREF="section-types-definitions.html#table-container-types" >Table of Container Types</A ></DT ><DT >13-4. <A HREF="section-types-definitions.html#table-subtitle-types" >Table of Subtitle Types</A ></DT ><DT >13-5. <A HREF="section-types-definitions.html#table-other-types" >Table of Other Types</A ></DT ></DL ></DIV ><DIV CLASS="LOT" ><DL CLASS="LOT" ><DT ><B >List of Examples</B ></DT ><DT >3-1. <A HREF="section-boiler-examine.html#ex-boiler-examine-h" >Example Plugin Header File</A ></DT ></DL ></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" > </TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="part-introduction.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" > </TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Introduction</TD ></TR ></TABLE ></DIV ></BODY ></HTML >