]> git.sesse.net Git - nageru/blobdiff - theme.cpp
Add a Lua function to rewind the video.
[nageru] / theme.cpp
index 46803ba92394321412a8617bef8d34acfc082ecf..7ece56a928330bc1baad55ac357e06ebf231b963 100644 (file)
--- a/theme.cpp
+++ b/theme.cpp
@@ -352,6 +352,14 @@ int VideoInput_new(lua_State* L)
        return ret;
 }
 
+int VideoInput_rewind(lua_State* L)
+{
+       assert(lua_gettop(L) == 1);
+       FFmpegCapture **video_input = (FFmpegCapture **)luaL_checkudata(L, 1, "VideoInput");
+       (*video_input)->rewind();
+       return 0;
+}
+
 int WhiteBalanceEffect_new(lua_State* L)
 {
        assert(lua_gettop(L) == 0);
@@ -553,6 +561,7 @@ const luaL_Reg ImageInput_funcs[] = {
 
 const luaL_Reg VideoInput_funcs[] = {
        { "new", VideoInput_new },
+       { "rewind", VideoInput_rewind },
        { NULL, NULL }
 };