writedatamanaged Lua Interface¶
get¶
Get a pointer to the WriteDataManaged object
- Arguments:
- any ptr Pointer to Module object
- Returns:
- writedatamanaged ptr Pointer to casted WriteDataManaged object
Example
ptr = writedatamanaged:.get(ptr)
getConfig¶
Get the configuration object for the plugin
Arguments:
- Returns:
- table obj Map with configurations
Example
obj = writedatamanaged:.getConfig()
saveConfig¶
Save the configuration object for the plugin
- Arguments:
- any ptr Pointer to WriteDataManaged object
- table new_config Map with configurations
Example
writedatamanaged:.saveConfig(ptr,new_config)
getName¶
Get the plugin name
Arguments:
- Returns:
- string name Plugin Name
Example
name = writedatamanaged:.getName()
createVideo¶
Create a new video that will be written with frames
- Arguments:
- string key Identifier for the video
- string filename Path to write the video file
- number width New video width
- number height New video height
- number fps New video FPS
Example
writedatamanaged:.createVideo(key,filename,width,height,fps)
writeFrame¶
Write a frame from specified framebuffers to a video file
- Arguments:
- string key Identifier for the video
- number x New frame x pos on framebuffer
- number y New frame y pos on framebuffer
- number width New frame width (set at 0 to use framebuffer width)
- number height New frame height (set at 0 to use framebuffer height)
- string[] sources Framebuffer names to be used as sources (all will be concat'd and written as a frame)
Example
writedatamanaged:.writeFrame(key,x,y,width,height,sources)
writeImage¶
Write an image file from a specified framebuffer
- Arguments:
- number x New image x pos on framebuffer
- number y New image y pos on framebuffer
- number width New image width (set at 0 to use framebuffer width)
- number height New image height (set at 0 to use framebuffer height)
- string filename Path to write the image file
- buffer source Framebuffer name to be used as source
Example
writedatamanaged:.writeImage(x,y,width,height,filename,source)
writeStructuredData¶
Write a string to a file
- Arguments:
- any ptr Pointer to WriteDataManaged object
- string filename Path to write the data file
- any sdata Data to be written to file (String or any lua object)
Example
writedatamanaged:.writeStructuredData(ptr,filename,sdata)
writeText¶
Write a string to a file
- Arguments:
- any ptr Pointer to WriteDataManaged object
- string filename Path to write the data file
- string sdata Data to be written to file
Example
writedatamanaged:.writeText(ptr,filename,sdata)
writeJson¶
Write a json string to a file
- Arguments:
- any ptr Pointer to WriteDataManaged object
- string filename Path to write the data file
- any sdata Lua Object to be written to file
Example
writedatamanaged:.writeJson(ptr,filename,sdata)
appendStructuredData¶
Append a string to a newly created file
- Arguments:
- any ptr Pointer to WriteDataManaged object
- string filename Path to write the data file
- any sdata Data to be written to file (String or any lua object)
- string separator (Optional) Separator to be written after data
Example
writedatamanaged:.appendStructuredData(ptr,filename,sdata,separator)
appendText¶
Append a string to a file
- Arguments:
- any ptr Pointer to WriteDataManaged object
- string filename Path to write the data file
- any sdata Data to be written to file (String)
- string separator (Optional) Separator to be written after data
Example
writedatamanaged:.appendText(ptr,filename,sdata,separator)