<chapter><title>How is a stream broadcasted ?</title>

<sect1><title>What happens when a stream is started ?</title>

<para>

Here is a simplified sequence diagram to show what happens when a "start"
command is sent through the telnet interface:

<mediaobject>
  <imageobject>
    <imagedata fileref="stream_start.eps" format="EPS" scalefit="1" scale="90">
  </imageobject>
  <imageobject>
    <imagedata fileref="stream_start.jpg" format="JPG">
  </imageobject>
  <textobject>
    <phrase>Sequence diagram</phrase>
  </textobject>
</mediaobject>

</para>
</sect1>

<sect1><title>How is a TS packet sent ?</title>

<para>

<mediaobject>
  <imageobject>
    <imagedata fileref="stream_send.eps" format="EPS" scalefit="1" scale="90">
  </imageobject>
  <imageobject>
    <imagedata fileref="stream_send.jpg" format="JPG">
  </imageobject>
  <textobject>
    <phrase>Sequence diagram</phrase>
  </textobject>
</mediaobject>

The Packet Handler (C_SyncFifo) is shared between two threads: in one thread 
the Converter pushes TS packets in the fifo, and in another thread the Streamer
pops them.

</para>
</sect1>

</chapter>

