This avoids the need to get the default player just to get the playbin.
int main(int argc, char *argv[])
{
int main(int argc, char *argv[])
{
- GstElement *sink, *asink;
- RygelPlaybinPlayer *player;
+ GstElement *playbin, *sink, *asink;
RygelPlaybinRenderer *renderer;
GError *error = NULL;
GMainLoop *loop;
RygelPlaybinRenderer *renderer;
GError *error = NULL;
GMainLoop *loop;
g_set_application_name ("Standalone-Renderer");
renderer = rygel_playbin_renderer_new ("LibRygel renderer demo");
g_set_application_name ("Standalone-Renderer");
renderer = rygel_playbin_renderer_new ("LibRygel renderer demo");
- player = rygel_playbin_player_get_default ();
+ playbin = rygel_playbin_renderer_get_playbin (renderer);
sink = gst_element_factory_make ("cacasink", NULL);
g_object_set (G_OBJECT (sink),
"dither", 53,
sink = gst_element_factory_make ("cacasink", NULL);
g_object_set (G_OBJECT (sink),
"dither", 53,
asink = gst_element_factory_make ("pulsesink", NULL);
asink = gst_element_factory_make ("pulsesink", NULL);
- g_object_set (G_OBJECT (rygel_playbin_player_get_playbin (player)),
+ g_object_set (G_OBJECT (playbin),
"video-sink", sink,
"audio-sink", asink,
NULL);
"video-sink", sink,
"audio-sink", asink,
NULL);
this.prepare_upnp (title);
}
this.prepare_upnp (title);
}
+ /**
+ * Get the GstPlaybin2 used by this Renderer.
+ */
+ public Gst.Element? get_playbin () {
+ var player = Rygel.Playbin.Player.get_default ();
+ return_val_if_fail (player != null, null);
+
+ return player.playbin;
+ }
+
private void prepare_upnp (string title) {
this.plugin.title = title;
private void prepare_upnp (string title) {
this.plugin.title = title;