});
}
+void CEFCapture::reload()
+{
+ post_to_cef_ui_thread([this] {
+ browser->Reload();
+ });
+}
+
void CEFCapture::OnPaint(const void *buffer, int width, int height)
{
steady_clock::time_point timestamp = steady_clock::now();
return 0;
}
+int HTMLInput_reload(lua_State* L)
+{
+ assert(lua_gettop(L) == 1);
+ CEFCapture **video_input = (CEFCapture **)luaL_checkudata(L, 1, "HTMLInput");
+ (*video_input)->reload();
+ return 0;
+}
+
int HTMLInput_get_signal_num(lua_State* L)
{
assert(lua_gettop(L) == 1);
};
const luaL_Reg HTMLInput_funcs[] = {
- // TODO: reload, execute_javascript, perhaps set_max_fps?
+ // TODO: execute_javascript, perhaps set_max_fps?
{ "new", HTMLInput_new },
{ "set_url", HTMLInput_set_url },
+ { "reload", HTMLInput_reload },
{ "get_signal_num", HTMLInput_get_signal_num },
{ NULL, NULL }
};