Re: [Patch] - Add GI introspection to RygelRendererGst



I might have found out the problem.  You need to call .new() to construct it.  I got rid of the critical and all constructors are being called.  I just need to verify the actual renderer is working.

On Feb 25, 2015 11:29 AM, "Jens Georg" <mail jensge org> wrote:
Hi,

I'm watching the GNOME github repositories so I've noticed your pr, thanks.

Usually we use GNOME Bugzilla for patch submission, but, I guess PR is fine as well.

About your issue: It might be that this library is not using GObject-Syle construction properly. I would have to check but I'm currently moving house so time is limited.

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 [1]
[2] -
https://github.com/tripzero/rygel/blob/master/src/librygel-renderer/rygel-media-renderer.vala#L51
[2]
[3] -
https://github.com/tripzero/rygel/blob/master/src/librygel-renderer/rygel-media-renderer.vala#L60
[3]

Links:
------
[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

_______________________________________________
rygel-list mailing list
rygel-list gnome org
https://mail.gnome.org/mailman/listinfo/rygel-list



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