<?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'">
<!ENTITY url_git_browse_base_src "http://git.gnome.org/browse/rygel/tree/src/">
<!ENTITY url_refdocs_librygel_renderer_gst "http:/developer.gnome.org/librygel-renderer-gst/unstable/">
]>

<chapter id="implementing-renderer-plugins">
<title>Implementing Rygel Renderer Plugins</title>

<section id="implementing-renderer-plugins-overview">
<title>Implementing Renderer Plugins: Overview</title>


<para>
This library may be used to create Rygel renderer plugins by
implementing the <link linkend="RygelMediaRendererPlugin">RygelMediaRendererPlugin</link> class.
</para>

<para>The <link linkend="RygelMediaRendererPlugin">RygelMediaRendererPlugin</link> reference documentation
and this example explain how to implement these plugins.
</para>

</section>

<section id="implementing-renderer-plugins-simple-example">
<title>Implementing Renderer Plugins: Simple Example</title>

<!-- TODO: Find a way to mention this C example code in the RygelMediaRendererPlugin valadoc comments instead. -->
<para>
This example source code shows how to implement a Rygel Renderer plugin.</para>

<para>This example implements module that provides a <link linkend="RygelMediaPlayer">RygelMediaPlayer</link>
that simply prints the addresses of any URIs provided to it by a UPnP/DLNA controller. A real Rygel renderer
plugin's player would render the actual media content to some device. See, for instance, the
<ulink url="&url_refdocs_librygel_renderer_gst;RygelPlaybinPlayer.html">RygelPlaybinPlayer</ulink> from the
librygel-renderer-gst library, used in the <ulink url="&url_git_browse_base_src;plugins/playbin/">Rygel Playbin plugin</ulink>.
</para>

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

</section>

</chapter>

