Re: gsoc-2013 - lua plugins



On Sun, 2013-04-14 at 23:51 -0300, victortozo gmail com wrote:
Juan,


I've been looking into libquvi project in order to understand how they
integrate their lua scripts with c code.

It works really nice[0] (lua 5.1) we just need to be careful with
stack control...


Great. I was to suggest you to take a look at libquvi, because it's a
great project that shows how to use plugins written in Lua. So good you
stepped ahead :)



ps: I'm calling as 'lua-factory' the glue code between grilo and lua
plugins.


Makes sense.


Calling a c function from lua also works fine[1].
We can create a 'module' in c to give lua some help functions and also
a way to alert the lua-factory that an async call has finished.



If I understand right, the lua plugins would take care of
search/browse/query procedures with lua code; the lua-factory (c code)
would translate the return from lua into GrlMedia / GrlSource besides
dealing with calls and async responses from lua code.



Mostly you read my mind :)

Yeah, that is the way I was thinking on implementing it. 

Maybe we want to add some utility functions in the lua-factory part that
the lua plugins could use to ease the implementation.



There are some core understandings that I'm still looking into but any
thoughts would be very appreciated.



Sure. I suggest to join our #grilo channel in irc.gnome.org.

One of the best ways to understand how Grilo works is implementing a
plugin. Thus you get lot of feedback for what a plugin developer would
need.

There are different services you could write a plugin to deal with.

As suggestion, one of them could be Magnatune. Rationale is that you can
download a full sqlite3 database with all the content. So writing the
plugin would be as easier as downloading that sqlite3 database, and then
implementing the grilo functions on top of sqlite3. You could get
inspiration from podcasts or bookmarks plugins to write it.

        J.A.





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