About lua plans

84 views
Skip to first unread message

Alex

unread,
Jun 8, 2011, 8:41:52 AM6/8/11
to C++ RTMP Server
Hi,

I am trying to learn internals and usage of rtmpd. I would like to
achieve the Lua application for rtmpd server. Does this make sence ?

As I understand the intended way is to create new project for
application that will produce shared object/dll and then add its usage
to crtmpserver.cpp.

What do You think about using LuaJIT2 and its FFI feature (http://
luajit.org/ext_ffi.html) to interface crtmpserver ? Actualy to
implement `crtmpserver.cpp` in Lua code and import all parts needed
from `thelib` by FFI declarations.

Andriy

unread,
Jun 8, 2011, 4:55:42 PM6/8/11
to C++ RTMP Server
Hi,
Let me ask question: for what need LUA JIT in real-time media server?
What overkill feature it provide?

Alex

unread,
Jun 9, 2011, 3:40:31 AM6/9/11
to C++ RTMP Server
Hi Andriy,

Main reason is integration with other software modules that are
written in Lua and Python. To avoid rewriting application and data
management logic.

Also in the mailing list I have stumbled upon

On Apr 8, 1:20 pm, C++ RTMP Server <crtmp...@gmail.com> wrote:
> To make a little personal note here: lua amazes me with every hour spent working with it. Up until now I was just scratching the surface. I was using it only to provide a config file by simply reading a table. Now, after putting it to good use (as scripting engine), my brain is sparking with ideas and ideas :)
> Of course, I'm 100% I will re-invent the wheel many times before mastering it. But that's just an ongoing process of learning

Based on that, Lua will become dynamic language used in crtmpserver
more than just to parse config table.

It would be nice to know planned improvements.

C++ RTMP Server

unread,
Jun 9, 2011, 5:19:11 AM6/9/11
to c-rtmp...@googlegroups.com
Hi Alex,

Lua is already integrated as a scripting language inside crtmpserver. The interface is not as complete as I wanted it to be, but has the basics and can be useful. If more functionality is needed, it can be easily added by looking at the existing one as an example. It works quite nice.

The main reason for not using lua the other way around (host C inside lua) is that crtmpserver is a C++ application and has a lot of C++ specific things, especially classes (objects). So, for it to work nice, one should wrap all classes and make them available to lua. While this is perfectly doable, I prefer doing the other way around because not all languages supports this. That's the reason for hosting a "virtual machine" inside crtmpserver. This "virtual machine" has all the bits and pieces necessary for hosting an external language inside c++ runtime.

Cheers,
Andrei

> You received this message because you are subscribed to "C++ RTMP Server" mailing list.
> To post to this group, send email to c-rtmp...@googlegroups.com
> To unsubscribe from this group, send email to
> c-rtmp-serve...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/c-rtmp-server?hl=en

------
Eugen-Andrei Gavriloaie
Web: http://www.rtmpd.com

Alex

unread,
Jun 9, 2011, 7:23:32 AM6/9/11
to C++ RTMP Server
Thanks Andrei

On Jun 9, 11:19 am, C++ RTMP Server <crtmpser...@gmail.com> wrote:
> Hi Alex,
>
> Lua is already integrated as a scripting language inside crtmpserver. The interface is not as complete as I wanted it to be, but has the basics and can be useful. If more functionality is needed, it can be easily added by looking at the existing one as an example. It works quite nice.
>
> The main reason for not using lua the other way around (host C inside lua) is that crtmpserver is a C++ application and has a lot of C++ specific things, especially classes (objects). So, for it to work nice, one should wrap all classes and make them available to lua. While this is perfectly doable, I prefer doing the other way around because not all languages supports this. That's the reason for hosting a "virtual machine" inside crtmpserver. This "virtual machine" has all the bits and pieces necessary for hosting an external language inside c++ runtime.
>
> Cheers,
> Andrei
>
> On Jun 9, 2011, at 8:40 AM, Alex wrote:
>
>
>
>
>
>
>
>
>
> > Hi Andriy,
>
> > Main reason is integration with other software modules that are
> > written in Lua and Python. To avoid rewriting application and data
> > management logic.
>
> > Also in the mailing list I have stumbled upon
>
Reply all
Reply to author
Forward
0 new messages