<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
]>

<chapter id="implementing-renderers-gst">
<title>Implementing GStreamer-based Renderers</title>

<section id="implementing-renderers-gst-overview">
<title>Implementing GStreamer-based Renderers: Overview</title>

<para>
This library may be used to create in-process UPnP/DLNA Renderers, or Players based on GStreamer, via
the <link linkend="RygelPlaybinRenderer">RygelPlaybinRenderer</link> class. For instance,
this may be used to add UPnP/DLNA Renderer or Player capability to an existing GStreamer-based media player application.
</para>

<para>The <link linkend="RygelPlaybinRenderer">RygelPlaybinRenderer</link> reference documentation
and these examples explain how to implement renderers.
</para>

</section>

<section id="implementing-renderers-gst-simple-example">
<title>Implementing GStreamer-based Renderers: Simple Example</title>

<!-- TODO: Find a way to mention this C example code in the RygelPlaybinRenderer valadoc comments instead. -->
<para>
This simple example program shows how to instantiate the renderer then configure its GStreamer playbin element
and connect it to a network interface, rendering the content to stdout as ASCII.
</para>

<!-- Do not indent the xi:include node. That puts spaces at the start of the code. -->
<programlisting role="C">
<xi:include  href="@EXAMPLEDIR@/standalone-renderer-gst.c"
    parse="text"
    xmlns:xi="http://www.w3.org/2001/XInclude"/>
</programlisting>

</section>

<section id="implementing-renderers-gst-x-window-example">
<title>Implementing GStreamer-based Renderers: X Window Example</title>

<!-- TODO: Find a way to mention this C example code in the RygelPlaybinRenderer valadoc comments instead. -->
<para>
This slightly fuller example program shows how to instantiate the renderer then configure its GStreamer playbin element and connect it to a network interface, rendering the content in a full-screen X window.
</para>

<!-- Do not indent the xi:include node. That puts spaces at the start of the code. -->
<programlisting role="C">
<xi:include  href="@EXAMPLEDIR@/fullscreen-renderer.c"
    parse="text"
    xmlns:xi="http://www.w3.org/2001/XInclude"/>
</programlisting>

</section>

</chapter>
