Re: What about GrlMedia resolving?



2014-11-05 14:12 GMT+01:00 Bastien Nocera <hadess hadess net>:
On Wed, 2014-11-05 at 14:09 +0100, Guilhem Bonnefille wrote:
2014-11-05 11:11 GMT+01:00 Bastien Nocera <hadess hadess net>:
On Tue, 2014-11-04 at 23:58 +0100, Guilhem Bonnefille wrote:
Hi,

I revive my project to create a plugin for weboob. In order to refresh
my code, I merged my topic branch into grilo-plugins-0.2.13 (my topic
branch was started on grilo-plugins-0.2.12).

After fixing some issues, I'm faced to something too complex for me:
Totem no more play the selected media. Instead, I have the following
error message:

Totem-WARNING **: Cannot find URL for 044916-000_PLUS7-F arte (source:
grl-weboob-arte), please file a bug at https://bugzilla.gnome.org/

After some debug, I realized that totem do not fire a grl-resolve on
my GrlMedia. And the GrlMedia created by the grl-browse function of my
plugin do not have the url. This information is computed in the
grl-resolve function of my plugin (need a second call to weboob).

Can you give me an help? What should I do to fix this issue?

Totem just passes the URL to totem-pl-parser, which then uses quvi to
resolve the URL. Totem doesn't call resolve() in grilo plugins when a
URL is missing.


I can certainly find the information in the grilo's documentation, but
how can I force totem to call the resolve function before trying to
retrieve the URL information?

By writing code in totem to do that. Though I'd rather somebody wrote
code to do that in quvi. Totem tries hard to avoid adding one-time urls
in the playlist, so it does a quvi resolution after the fact.

OK. So I'm not sure to understand the meaning of the grilo "resolve" function.

The Weboob's understanding of a media needs a two pass:
- first pass: the media is initialized from a list (for exemple after a search)
- second pass: the page dedicated to the media is analyzed to find the
direct video URL
I think this is quite common for all tools like weboob as it is mostly
directd by the design of the web sites hosting media.

So, in the grilo "browse" function, my plugin build GrlMedia without
URL, just enough information to be able to prepare the second pass.
When grilo invoke the "resolve" function, my plugin is then able to
fill the URL with the direct URL to the media.

Should I revise this logic?
Should I fill the GrlMedia.URL with the URL of the web page of a media
in the first pass, expecting that totem will be satisfied with this as
it will call totem-pl-parser/quvi on it to retrieve the direct URL to
the media?
As Weboob is able to retrieve direct URL to media, I feel
unconfortable to expect the resolution is made by an other tool
(quvi).


What's the role of grilo resolve function? When it is planned to be called?


 If the resolve function is not designed
for this use case, how should I design my plugin as it needs a two
pass resolution for any media?




-- 
Guilhem BONNEFILLE
-=- JID: guyou im apinc org MSN: guilhem_bonnefille hotmail com
-=- mailto:guilhem bonnefille gmail com
-=- http://nathguil.free.fr/


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