summaryrefslogtreecommitdiff
path: root/doc/reference/librygel-renderer/gtkdoc/implementing-renderer-plugins.xml
blob: 1996270809cf35bf67457215b18d1d9a37d959a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?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>