inputmanaged Lua Interface¶
get¶
Get a pointer to the InputManaged object
- Arguments:
- any ptr Pointer to Module object
- Returns:
- inputmanaged ptr Pointer to casted InputManaged object
Example
ptr = inputmanaged:.get(ptr)
getConfig¶
Get the configuration object for the plugin
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- Returns:
- table obj Map with configurations
Example
obj = inputmanaged:.getConfig(ptr)
saveConfig¶
Save the configuration object for the plugin
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- table new_config Map with configurations
Example
inputmanaged:.saveConfig(ptr,new_config)
getName¶
Get the plugin name
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- Returns:
- string name Plugin Name
Example
name = inputmanaged:.getName(ptr)
setSource¶
Set the input source
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- string source Source URI (or string array lo load playlist, only video files and not directories)
Example
inputmanaged:.setSource(ptr,source)
setSourceFromConfig¶
set the input source using the configuration file
Arguments:
Example
inputmanaged:.setSourceFromConfig()
canSeek¶
Get bool indicating if start and end frames can be set for the source
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- Returns:
- boolean canSeek Start and End frames can be set for the source
Example
canSeek = inputmanaged:.canSeek(ptr)
canRead¶
Get bool indicating if input source is available
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- Returns:
- boolean canRead Source is available
Example
canRead = inputmanaged:.canRead(ptr)
isPaused¶
Get bool indicating if input source is paused
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- Returns:
- boolean isPaused Source is paused
Example
isPaused = inputmanaged:.isPaused(ptr)
pause¶
Set Pause state for current playback
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- boolean state Set pause state for Source
Example
inputmanaged:.pause(ptr,state)
isEnded¶
Get bool indicating if input source is ended (Only active when no RepeatMode is set)
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- Returns:
- boolean isEnded Source is ended
Example
isEnded = inputmanaged:.isEnded(ptr)
readMetaFrames¶
Reads next frame(s) with metadata from source and place in vector of maps (table)
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- boolean ignoreSkipFrame If this parameter is enabled a frame is always returned manually, even if it was supposed to be skipped by current fps
- Returns:
- Frame[] vector of Frames with keys{"image", "metadata"}
Example
vector = inputmanaged:.readMetaFrames(ptr,ignoreSkipFrame)
readFrame¶
(Deprecated, check on readMetaFrames method instead) Reads next frame from source and place in 'default' framebuffer
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- boolean ignoreSkipFrame If this parameter is enabled a frame is always returned manually, even if it was supposed to be skipped by current fps
- Returns:
- buffer image **
Example
image = inputmanaged:.readFrame(ptr,ignoreSkipFrame)
getCurrentFrame¶
Get number from current frame playing
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- Returns:
- number cur_frame Current frame
Example
cur_frame = inputmanaged:.getCurrentFrame(ptr)
getFrameCount¶
Get total number of frames from input source
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- Returns:
- number total_frames Total source frames
Example
total_frames = inputmanaged:.getFrameCount(ptr)
setCurrentFrame¶
Set current frame for input source
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- number frameNum Frame number to set playback
Example
inputmanaged:.setCurrentFrame(ptr,frameNum)
setFPS¶
Set current input source FPS
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- number fps FPS to set
- Returns:
- boolean Set OK
Example
Set = inputmanaged:.setFPS(ptr,fps)
getFPS¶
Get current input source FPS
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- FPSType fpsType {input=0, output=1, target=2(default)}
- Returns:
- number fps Current FPS
Example
fps = inputmanaged:.getFPS(ptr,fpsType)
setRepeatMode¶
Set current repeat mode (0-Repeat All 1-Repeat Video 2-No Repeat)
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- InputRepeatMode repeat_mode Repeat mode (Enum: InputRepeatMode: 0-Repeat All 1-Repeat Video 2-No Repeat)
Example
inputmanaged:.setRepeatMode(ptr,repeat_mode)
getRepeatMode¶
Get current repeat mode (0-Repeat All 1-Repeat Video 2-No Repeat)
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- Returns:
- number repeat_mode Repeat mode (Enum: InputRepeatMode: 0-Repeat All 1-Repeat Video 2-No Repeat)
Example
repeat_mode = inputmanaged:.getRepeatMode(ptr)
setNextSource¶
Load the next input source if a source list is loaded
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- Returns:
- boolean ok Source loaded
Example
ok = inputmanaged:.setNextSource(ptr)
setPreviousSource¶
Load the previous input source if a source list is loaded
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- Returns:
- boolean ok Source loaded
Example
ok = inputmanaged:.setPreviousSource(ptr)
setSourceByIndex¶
Load the an input source by index (0 based) if a source list is loaded
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- number index Source index to load (0 based)
- Returns:
- boolean ok Source loaded
Example
ok = inputmanaged:.setSourceByIndex(ptr,index)
getSourceList¶
Get the current URI Playlist if exists
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- Returns:
- table uri_list Source URI List
Example
uri_list = inputmanaged:.getSourceList(ptr)
getSourceListSize¶
Get the current URI Playlist size if exists
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- Returns:
- number sz Current list size
Example
sz = inputmanaged:.getSourceListSize(ptr)
getSourceListIndex¶
Get the current URI Playlist index
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- Returns:
- number index Current video index on list
Example
index = inputmanaged:.getSourceListIndex(ptr)
getSourceURI¶
Get the URI of the current source
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- Returns:
- string uri Source URI
Example
uri = inputmanaged:.getSourceURI(ptr)
getSourceDesc¶
Get a description of the current loaded source
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- Returns:
- string desc Source Description
Example
desc = inputmanaged:.getSourceDesc(ptr)
playlistReachedEnd¶
Returns true if playlist has reached end, false when single file is played
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- Returns:
- boolean reached_end Playlist has reached end
Example
reached_end = inputmanaged:.playlistReachedEnd(ptr)
fileReachedEnd¶
Returns true if current file is on last frame
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- Returns:
- boolean reached_end File has reached end
Example
reached_end = inputmanaged:.fileReachedEnd(ptr)
setPrivacyMasks¶
Set privacy masks
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
- table masks Vector of vector of points
Example
inputmanaged:.setPrivacyMasks(ptr,masks)
clearReadAheadQueue¶
Clears the current read ahead frame queue
- Arguments:
- inputmanaged ptr Pointer to InputManaged object
Example
inputmanaged:.clearReadAheadQueue(ptr)
get¶
Get a pointer to the InputManaged object
- Arguments:
- rt_instance rt instance object
- Returns:
- inputmanaged ptr Pointer to casted InputManaged object
Example
ptr = inputmanaged:.get(rt)