Re: Lua plugins - checkpoint



Hey,

Em Mon, 2013-07-08 às 00:50 -0300, Victor Toso escreveu:
Folks,

Sorry for the big e-mail. If your time is short, I guess the item 4 is
the one I would love some expertise.

So, I have implemented a few things and I would love to hear your
feedback to see if I'm going in the right way.

A little explanation about everything:
- grl-lua-factory.c: load/remove lua-plugins, get the operations from
application and pass it to lua-pluging;
- grl-lua-library.c: This is a module to lua-plugins. There are two
functions implemented: callback and fetch;
- grl-metrolyrics.lua: The plugin which I'm using to develop both
glue-codes above.

The code is here: https://github.com/victortoso/grilo-plugins [on master]

A few comments about the code I saw:
- Something like:
grilo.callback(nil, 0, userdata) 
is particularly ugly. We should have a better way to tell that we
finished the parsing. I'd rather the C plugin assumed that we finished
the call when the lua function returns.
- The above seems to be caused by the async model being done inside the
LUA sources instead of in the C plugin factory.
- The JSON parsing will need to be done on the C-plugin side, not in the
lua plugin. The substitutions look fragile.

Cheers



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