網頁

2016年1月29日 星期五

VLC 之 VLM command 追蹤

share/lua/intf/cli.lua
function client_command( client )
-> call_command(cmd,client,arg) 呼叫 CLI commands
-> call_vlm_command(cmd,client,arg) 呼叫 VLM command
function call_vlm_command(cmd,client,arg)
-> vlm:execute_command( cmd )

modules/lua/intf.c
static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
-> luaopen_vlm( L );

modules/lua/libs/vlm.c
static const luaL_Reg vlclua_vlm_reg[] = {
    { "execute_command", vlclua_vlm_execute_command },
    { NULL, NULL }
};
void luaopen_vlm( lua_State *L )
{
    lua_pushcfunction( L, vlclua_vlm_new );
    lua_setfield( L, -2, "vlm" );
}
static int vlclua_vlm_new( lua_State *L )
-> luaL_register( L, NULL, vlclua_vlm_reg );
static int vlclua_vlm_execute_command( lua_State *L )
-> i_ret = vlm_ExecuteCommand( *pp_vlm, psz_command, &message );

src/input/vlm.c
int vlm_ExecuteCommand( vlm_t *p_vlm, const char *psz_command, vlm_message_t **pp_message)
-> i_result = ExecuteCommand( p_vlm, psz_command, pp_message );

src/input/vlmshell.c
int ExecuteCommand( vlm_t *p_vlm, const char *psz_command, vlm_message_t **pp_message )
del -> ExecuteDel
show -> ExecuteShow
help -> ExecuteHelp
control -> ExecuteControl
save -> ExecuteSave
export -> ExecuteExport
load -> ExecuteLoad
new -> ExecuteNew
setup -> ExecuteSetup
static int ExecuteControl( vlm_t *p_vlm, const char *psz_name, const int i_arg, char ** ppsz_arg, vlm_message_t **pp_status )
play -> vlm_ControlInternal
stop -> vlm_ControlInternal
pause -> vlm_ControlInternal
seek -> vlm_ControlInternal



沒有留言:

張貼留言