<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML ><HEAD ><TITLE >Element states</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="Basic Concepts" HREF="part-basic-concepts.html"><LINK REL="PREVIOUS" TITLE="Buffers" HREF="chapter-buffers.html"><LINK REL="NEXT" TITLE="The NULL state" HREF="section-states-null.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 > Application Development Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="chapter-buffers.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="section-states-null.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="chapter" ><H1 ><A NAME="chapter-states" ></A >Chapter 10. Element states</H1 ><P > Once you have created a pipeline packed with elements, nothing will happen right away. This is where the different states come into play. </P ><DIV CLASS="sect1" ><H1 CLASS="sect1" ><A NAME="section-states" >10.1. The different element states</A ></H1 ><P > An element can be in one of the following four states: <P ></P ><UL ><LI ><P > NULL: this is the default state all elements are in when they are created and are doing nothing. </P ></LI ><LI ><P > READY: An element is ready to start doing something. </P ></LI ><LI ><P > PAUSED: The element is paused for a period of time. </P ></LI ><LI ><P > PLAYING: The element is doing something. </P ></LI ></UL > </P ><P > All elements start with the NULL state. The elements will go throught the following state changes: NULL -> READY -> PAUSED -> PLAYING. When going from NULL to PLAYING, GStreamer will internally go throught the intermediate states. </P ><P > You can set the following states on an element: </P ><DIV CLASS="informaltable" ><P ></P ><A NAME="AEN351" ></A ><TABLE BORDER="0" FRAME="void" WIDTH="100%" CLASS="CALSTABLE" ><COL><COL><TBODY ><TR ><TD ><VAR CLASS="literal" >GST_STATE_NULL</VAR ></TD ><TD >Reset the state of an element. </TD ></TR ><TR ><TD ><VAR CLASS="literal" >GST_STATE_READY</VAR ></TD ><TD >will make the element ready to start processing data. </TD ></TR ><TR ><TD ><VAR CLASS="literal" >GST_STATE_PAUSED</VAR ></TD ><TD >temporary stops the data flow. </TD ></TR ><TR ><TD ><VAR CLASS="literal" >GST_STATE_PLAYING</VAR ></TD ><TD >means there really is data flowing through the graph. </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></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="chapter-buffers.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-states-null.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Buffers</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="part-basic-concepts.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >The NULL state</TD ></TR ></TABLE ></DIV ></BODY ></HTML >