2 * Copyright (C) 2012 Openismus GmbH.
4 * Author: Jens Georg <jensg@openismus.com>
6 * This file is part of Rygel.
8 * Rygel is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * Rygel is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 * Demo application for librygel-renderer.
26 * Creates a simple stand-alone UPnP renderer that renders any visual content
27 * in ASCII-art using GStreamer's cacasink element.
30 * standalone-renderer [<network device>]
32 * If no network device is given on the commandline, the program falls back to
35 * To do anything useful, another UPnP server + UPnP controller is necessary
36 * to tell it which media file to show.
39 #include "rygel-renderer-gst.h"
40 #include "rygel-renderer-gst.h"
41 #include "rygel-core.h"
43 int main(int argc, char *argv[])
45 GstElement *sink, *asink;
46 RygelPlaybinPlayer *player;
47 RygelPlaybinRenderer *renderer;
52 gst_init (&argc, &argv);
54 g_set_application_name ("Standalone-Renderer");
56 renderer = rygel_playbin_renderer_new ("LibRygel renderer demo");
57 player = rygel_playbin_player_get_default ();
58 sink = gst_element_factory_make ("cacasink", NULL);
59 g_object_set (G_OBJECT (sink),
61 "anti-aliasing", TRUE,
64 asink = gst_element_factory_make ("pulsesink", NULL);
66 g_object_set (G_OBJECT (rygel_playbin_player_get_playbin (player)),
72 rygel_media_device_add_interface (RYGEL_MEDIA_DEVICE (renderer), argv[1]);
74 rygel_media_device_add_interface (RYGEL_MEDIA_DEVICE (renderer), "eth0");
77 loop = g_main_loop_new (NULL, FALSE);
78 g_main_loop_run (loop);