[Patch] - Add GI introspection to RygelRendererGst



I submitted a pull request on github[1].  I'm not sure that's the appropriate place, but it's there.  This is an attempt to provide introspection data about the rygel-renderer-gst interfaces so that python and other languages that use GI will be able to build renderers.  It doesn't quite work just yet, I'm running into some issues testing it.

Consider the following example python code:

#!/usr/bin/env python

import gi
from gi.repository import Gst, GObject, RygelRendererGst, GLib


GObject.threads_init()
Gst.init(None)

renderer = RygelRendererGst.PlaybinRenderer(title = "my awesome title")

GLib.MainLoop().run()

When run it produces two CRITICAL errors:

(python:28864): RygelRenderer-CRITICAL **: plugin_construct: assertion 'player != NULL' failed (python:28864): RygelCore-CRITICAL **: rygel_plugin_set_title: assertion 'self != NULL' failed

I am not very familiar with vala, but it seems like the constructor[2] for RygelRenderer is not being called.  Instead, the "constructed()" override is being called first, and tries to construct the plugin, which fails because player is still null.  I can test this by inserting a "debug(...)" and "assert_not_reached ()" in both MediaRenderer(...) and constructed() and see which one gets called first.  The output of the above example becomes (run with "G_MESSAGES_DEBUG=all")

(python:2136): RygelCore-DEBUG: rygel-media-device.vala:65: No listening port specified, using random TCP port (python:2136): RygelRenderer-CRITICAL **: plugin_construct: assertion 'player != NULL' failed (python:2136): RygelCore-CRITICAL **: rygel_plugin_set_title: assertion 'self != NULL' failed (python:2136): RygelRenderer-DEBUG: rygel-media-renderer.vala:68: constructed() called
**
RygelRenderer:ERROR:rygel-media-renderer.c:346:rygel_media_renderer_real_constructed: code should not be reached
Aborted (core dumped)

Any guidance on how to debug this further would be appreciated.

-Kevron
[1] - https://github.com/GNOME/rygel/pull/1
[2] - https://github.com/tripzero/rygel/blob/master/src/librygel-renderer/rygel-media-renderer.vala#L51
[3] - https://github.com/tripzero/rygel/blob/master/src/librygel-renderer/rygel-media-renderer.vala#L60


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]