SplitCam plugins  1.0.0
Get your own video or still image source as an integral part of SplitCam user interface
Functions
ISource

Required by every source provider. More...

Functions

const GUID splitcam::plugin::getSourceInterfaceId ()
 
const wchar_t * splitcam::plugin::getSourceName ()
 
void splitcam::plugin::getSourceSize (size_t &width, size_t &height)
 
void splitcam::plugin::setCanvasSize (size_t width, size_t height)
 
void splitcam::plugin::openSource (const wchar_t *srcId)
 
void splitcam::plugin::closeSource (const wchar_t *srcId)
 
void splitcam::plugin::pauseSource (const wchar_t *srcId, bool val)
 

Detailed Description

Required by every source provider.

Function Documentation

◆ closeSource()

void splitcam::plugin::closeSource ( const wchar_t *  srcId)

Notifies the plugin that the user have chosen to delete the source from the scene or the program is exiting. You should free up all resources used by this source instance and the srcId becomes invalid in this session unless it is assigned to a new source instance in the openSource function call.

Parameters
srcIdThe source instance identifier

◆ getSourceInterfaceId()

const GUID splitcam::plugin::getSourceInterfaceId ( )

SplitCam calls this function to get the source interface identifier. The interface identifier defines the function set supported by the current plugin module.

Returns
GUID of the supported source interface version

◆ getSourceName()

const wchar_t* splitcam::plugin::getSourceName ( )

Source name will be used in SplitCam user interface as a display name for this source element. This name is how user sees your source.

Returns
Human readable name of the source

◆ getSourceSize()

void splitcam::plugin::getSourceSize ( size_t &  width,
size_t &  height 
)

SplitCam calls this function to get the original size of the source in pixels. The original size may be used to proportionally resize the layer, for example.

Parameters
widthOriginal source width in pixels
heightOriginal source height in pixels

◆ openSource()

void splitcam::plugin::openSource ( const wchar_t *  srcId)

Create a new image source instance and assign the identifier to it. This identifier will be used in future calls to other source management functions. This identifier is also used in a call to IImageSource::DataCallback as the first parameter of the function.

Source identifier is required because user can create more than one instance of the source on the same scene or she can create multiple instances of the image source on different scenes. Each image source can provide its own image or all of the can provide the same image in all instances. It up to plugin developer to define the exact behaviour.

Parameters
srcIdThe source identifier assigned to newly created instance

◆ pauseSource()

void splitcam::plugin::pauseSource ( const wchar_t *  srcId,
bool  val 
)

The user paused the source, made it invisible or switched to another scene. The source should not be deleted but it is required to lower down resource usage to a minimum. Ideally the resource instance should not consume any CPU at all in paused state and it should free up all not immediately required memory resources.

Parameters
srcIdThe source instance identifier

◆ setCanvasSize()

void splitcam::plugin::setCanvasSize ( size_t  width,
size_t  height 
)

SplitCam notifies the source about the canvas size as soon as the source is created. Please note that the canvas size may change during the lifetime of the source. If the canvas size changes the plugin will be notified about the change with this function.

Parameters
widthCurrent canvas width
heightCurrent canvas height