lua-users home
lua-l archive

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


Do you think it's necessary to wrap\couple ffi headers with lua
metatables and functions? Ex. if two people have independently loaded
the OpenAL\OpenGL\etc API headers, they can't share utility functions
they've written on top of that API without getting ffi redefine
errors, if said functions are coupled to (encapsulating) the loading
of headers.

- David Hollander

On Sat, Oct 29, 2011 at 9:06 PM, Daurnimator <quae@daurnimator.com> wrote:
> On 30 October 2011 12:01, David Hollander <dhllndr@gmail.com> wrote:
>> What type of media are you streaming? If it's audio and not video, I
>> have audio streaming working with OpenAL and the LuaJIT FFI
>> (generating sine waves and passing through filters), as no callbacks
>> are needed for that API. The FFI headers are attached.
>>
>> - David Hollander
>
> I ended up made nice lua based ffi bindings:
>
> Root project:
> https://github.com/daurnimator/lomp2
>
> Open AL component:
> https://github.com/daurnimator/openal-lua-ffi
>
> FFmpeg component:
> https://github.com/daurnimator/ffmpeg-lua-ffi
>
> You can run `luajit test.lua` to try it out.
> Each component also has it's own tests, but they require ffi_utils and
> general.lua out of the lomp2 project
> BUT, ffmpeg turns out to not be a very nice library to use: I've
> decided to only use it as a backup: creating bindings for each codec I
> want to use.
>
> D
>
>