mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
CLuaInstance: Add script function zapitStopPlayBack
- For safe running ShowPicture() in the plugin - Set Lua api version to 1.19
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include <global.h>
|
||||
#include <system/debug.h>
|
||||
#include <gui/movieplayer.h>
|
||||
#include <zapit/zapit.h>
|
||||
#include <video.h>
|
||||
#include <neutrino.h>
|
||||
|
||||
@@ -97,3 +98,18 @@ int CLuaInstance::PlayFile(lua_State *L)
|
||||
lua_pushinteger(L, ret);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int CLuaInstance::zapitStopPlayBack(lua_State *L)
|
||||
{
|
||||
bool stop = true;
|
||||
int numargs = lua_gettop(L);
|
||||
if (numargs > 1)
|
||||
stop = _luaL_checkbool(L, 2);
|
||||
if (stop) {
|
||||
CMoviePlayerGui::getInstance().stopPlayBack();
|
||||
g_Zapit->stopPlayBack();
|
||||
}
|
||||
else
|
||||
g_Zapit->startPlayBack();
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user