LUA as GUI and C as logic
Posted: 22 Feb 2017 10:09
Short version of the question:
Can I make a LUA user interface as an extension which communicates with C, so C does the real work?
Long version of the question:
I'm currently developing a LUA extension that it's meant to stream local media to uPnP renderers on the LAN. The problem is that the actual streaming code it's way easier to develop in C, which already has libraries for that. So what I need is a way to make LUA and C communicate.
I have found this documentation about the LUA and C API: https://www.lua.org/pil/24.html
The problem I see with that is that the C code would work "out of VLC" and I wouldn't reuse the useful code already integrated in VLC. (Not sure about this, please correct me if I'm wrong)
Another option I am considering is to extend VLC's LUA API so it can access the code I develop, but seems really complicated.
Has somebody ever tried something similar? Any thoughts or recommendations?
Can I make a LUA user interface as an extension which communicates with C, so C does the real work?
Long version of the question:
I'm currently developing a LUA extension that it's meant to stream local media to uPnP renderers on the LAN. The problem is that the actual streaming code it's way easier to develop in C, which already has libraries for that. So what I need is a way to make LUA and C communicate.
I have found this documentation about the LUA and C API: https://www.lua.org/pil/24.html
The problem I see with that is that the C code would work "out of VLC" and I wouldn't reuse the useful code already integrated in VLC. (Not sure about this, please correct me if I'm wrong)
Another option I am considering is to extend VLC's LUA API so it can access the code I develop, but seems really complicated.
Has somebody ever tried something similar? Any thoughts or recommendations?