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-gst.
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-core.h"
42 int main(int argc, char *argv[])
44 GstElement *playbin, *sink, *asink;
45 RygelPlaybinRenderer *renderer;
50 gst_init (&argc, &argv);
52 g_set_application_name ("Standalone-Renderer");
54 renderer = rygel_playbin_renderer_new ("LibRygel renderer demo");
55 playbin = rygel_playbin_renderer_get_playbin (renderer);
56 sink = gst_element_factory_make ("cacasink", NULL);
57 g_object_set (G_OBJECT (sink),
59 "anti-aliasing", TRUE,
62 asink = gst_element_factory_make ("pulsesink", NULL);
64 g_object_set (G_OBJECT (playbin),
70 rygel_media_device_add_interface (RYGEL_MEDIA_DEVICE (renderer), argv[1]);
72 rygel_media_device_add_interface (RYGEL_MEDIA_DEVICE (renderer), "eth0");
75 loop = g_main_loop_new (NULL, FALSE);
76 g_main_loop_run (loop);