1 /* Copyright (C) 2012 Intel Corporation
3 * Permission to use, copy, modify, distribute, and sell this example
4 * for any purpose is hereby granted without fee.
5 * It is provided "as is" without express or implied warranty.
9 * Demo application for librygel-renderer-gst.
11 * Creates a simple stand-alone UPnP renderer that renders any visual content
12 * in ASCII-art using GStreamer's cacasink element.
15 * standalone-renderer [<network device>]
17 * If no network device is given on the commandline, the program falls back to
20 * To do anything useful, another UPnP server + UPnP controller is necessary
21 * to tell it which media file to show.
24 #include "rygel-renderer-gst.h"
25 #include "rygel-core.h"
27 int main(int argc, char *argv[])
29 GstElement *playbin, *sink, *asink;
30 RygelPlaybinRenderer *renderer;
35 gst_init (&argc, &argv);
37 g_set_application_name ("Standalone-Renderer");
39 renderer = rygel_playbin_renderer_new ("LibRygel renderer demo");
40 playbin = rygel_playbin_renderer_get_playbin (renderer);
41 sink = gst_element_factory_make ("cacasink", NULL);
42 g_object_set (G_OBJECT (sink),
44 "anti-aliasing", TRUE,
47 asink = gst_element_factory_make ("pulsesink", NULL);
49 g_object_set (G_OBJECT (playbin),
55 rygel_media_device_add_interface (RYGEL_MEDIA_DEVICE (renderer), argv[1]);
57 rygel_media_device_add_interface (RYGEL_MEDIA_DEVICE (renderer), "eth0");
60 loop = g_main_loop_new (NULL, FALSE);
61 g_main_loop_run (loop);