X-Git-Url: https://git.sesse.net/?p=nageru;a=blobdiff_plain;f=theme.cpp;fp=theme.cpp;h=71970c90f3ac4e849f3c0252172cb558f65544bc;hp=4ddea3a25915713191719c0da8c412d49933ac02;hb=f1ce3c5618f769b1388b39c637877d242c8ddeed;hpb=8ec5630a8e7ec089d2e39697d51642278d1977d7 diff --git a/theme.cpp b/theme.cpp index 4ddea3a..71970c9 100644 --- a/theme.cpp +++ b/theme.cpp @@ -439,6 +439,15 @@ int HTMLInput_reload(lua_State* L) return 0; } +int HTMLInput_set_max_fps(lua_State* L) +{ + assert(lua_gettop(L) == 2); + CEFCapture **video_input = (CEFCapture **)luaL_checkudata(L, 1, "HTMLInput"); + int max_fps = lrint(luaL_checknumber(L, 2)); + (*video_input)->set_max_fps(max_fps); + return 0; +} + int HTMLInput_get_signal_num(lua_State* L) { assert(lua_gettop(L) == 1); @@ -656,10 +665,11 @@ const luaL_Reg VideoInput_funcs[] = { }; const luaL_Reg HTMLInput_funcs[] = { - // TODO: execute_javascript, perhaps set_max_fps? + // TODO: execute_javascript { "new", HTMLInput_new }, { "set_url", HTMLInput_set_url }, { "reload", HTMLInput_reload }, + { "set_max_fps", HTMLInput_set_max_fps }, { "get_signal_num", HTMLInput_get_signal_num }, { NULL, NULL } };