tmModule Functions¶
Fill in 0
for any unsupported calls. Thread safety is defined per-module, only a single thread will enter a module at a time.
+------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Member | Description | +====================================+==========================================================================================================================================================================================================================================================+ |Startup
| Initialize a transmitter, fill in basic plugin info, allocate memory to hold user settings and other data. | | | | | || | | | | | -tmResult (*Startup)( tmStdParms* ioStdParms, tmPluginInfo* outPluginInfo);
tmResult_ContinueIterate
may be returned to support multiple transmit plugins within the same module. | | | -ioPrivatePluginData
,ioSerializedPluginData
&ioSerializedPluginDataSize
may be written from Startup. | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |Shutdown
| Terminate a transmitter. | | | | | || | | | | | Dispose oftmResult (*Shutdown)( tmStdParms* ioStdParms);
ioPrivatePluginData
if previously allocated inStartup
. | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |QueryAudioMode
| Describe the audio modes supported by the transmitter, one at a time. | | | | | || | | | | | Note that currently one audio mode is currently supported. You can convert between audio formats using the Audio Suite. | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |tmResult (*QueryAudioMode)( const tmStdParms* inStdParms, const tmInstance* inInstance, csSDK_int32 inQueryIterationIndex, tmAudioMode* outAudioMode);
QueryVideoMode
| Describe the video modes supported by the transmitter, one at a time. | | | | | || | | | | | The video sent later intmResult (*QueryVideoMode)( const tmStdParms* inStdParms, const tmInstance* inInstance, csSDK_int32 inQueryIterationIndex, tmVideoMode* outVideoMode);
PushVideo
will be one of the formats specified here. | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |SetupDialog
| Display your own modal settings dialog. | | | | | || | | | | | Will only be called if the plugin returnedtmResult (*SetupDialog)( tmStdParms* ioStdParms, prParentWnd inParent);
outHasSetup
. | | | | | | Save any settings toioSerializedPluginData
and if needed updateioSerializedPluginDataSize
. | | | | | |NeedsReset
will be invoked after this call, to allow your transmitter a chance to reset all open plugins and startup with the new settings. | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |NeedsReset
| Will be called regularly on the first plugin of a module to allow rebuilding on state changes. | | | | | || | | | | | If the passed in settings differ enough from the created settings, or if the settings on the hardware itself have changed, the transmitter should specify a reset is needed. | | | | | | IftmResult (*NeedsReset)( const tmStdParms* inStdParms, prBool* outResetModule);
outResetModule
is set totrue
, all open plugins will be shutdown and started up again. | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |CreateInstance
| Creates an instance of a transmitter. | | | | | || | | | | |tmResult (*CreateInstance)( const tmStdParms* inStdParms, tmInstance* ioInstance);
inPlayID
andinTimelineID
may be 0 if not driven by a player. | | | | | | Multiple instances may be created at the same time. | | | | | | AllocateioPrivateInstanceData
. | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |DisposeInstance
| Dispose an instance of a transmitter. | | | | | || | | | | | AnytmResult (*DisposeInstance)( const tmStdParms* inStdParms, tmInstance* ioInstance);
ioPrivateInstanceData
should be disposed. | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |ActivateDeactivate
| Activate or deactivate a transmitter instance, for example during application suspend or switching between monitors. | | | | | || | | | | | Transmitters should manage hardware access with these calls, nottmResult (*ActivateDeactivate)( const tmStdParms* inStdParms, const tmInstance* inInstance, PrActivationEvent inActivationEvent, prBool inAudioActive, prBool inVideoActive);
Startup
/Shutdown
, since it is valid for multiple plugins to be simultaneously active for the same device. | | | | | | Audio and video may be independently activated. | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |StartPlaybackClock
| Start a clock for playback. | | | | | || | | | | | This will be sent not only when starting playback, but also for scrubbing. | | | | | | Will only be called if the transmitter returnedtmResult (*StartPlaybackClock)( const tmStdParms* inStdParms, const tmInstance* inInstance, const tmPlaybackClock* inClock);
outHasClock
. | | | | | | The provided callback must be called each time the time changes, for example once for each frame in response toPushVideo
. | | | | | | Start may be called multiple times without a stop in between to update playback parameters, for example if the speed changes during playback. | | | | | | Invoke the callback immediately duringStartPlaybackClock
with a negative number for preroll but do not use this to wait for frames. | | | | | | If video latency is specified, up to the latency's amount of frame marked asplaymode_Playing
will be sent beforeStartPlaybackClock
is called. | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |StopPlaybackClock
| Stop a clock for playback. | | | | | || +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |tmResult (*StopPlaybackClock)( const tmStdParms* inStdParms, const tmInstance* inInstance);
PushVideo
| Asynchronously pushes a video frame to a transmitter instance. | | | | | || | | | | | Will only be called if the transmitter returnedtmResult (*PushVideo)( const tmStdParms* inStdParms, const tmInstance* inInstance, const tmPushVideo* inPushVideo);
outHasVideo
. | | | | | | The list of video frames passed to the transmitter will be negotiated based on the properties returned fromQueryVideoMode
. | | | | | | The transmitter is responsible for disposing of all passed inPPixes
. | | | | | | The instance will be created with the properties of the creating video segments which may differ from the actual frames that will be sent to the transmitter. | | | | | | For example, if a sequence is being played at 1/2 resolution, the instance will be created with the dimensions of the sequence, but the frames rendered and sent to the transmitter will be at 1/2. | | | | | | These properties may change by segment, for example if your transmitter supports multiple pixel formats, different segments may render to different pixel formats. | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |StartPushAudio
| Asynchronously pushes audio samples to a transmitter instance. | | | | | || | | | | | Initializes the device for subsequent PushAudio() calls. Will only be called if the transmitter returnedtmResult (*StartPushAudio)( const tmStdParms* inStdParms, const tmInstance* inInstance, PrTime inStartTime, PrTime inOutTime, prBool inLoop, prBool inScrubbing, csSDK_int32* outSamplesPerFrame);
outPushAudioAvailable
. | | | | | | Device will be enabled for a "secondary" mode where audio from the "primary" or "clock" device, is pushed to a secondary device; very useful for remote devices. | | | | | | UnlikeStartPlaybackClock()
,StartPushAudio()
is only called once, untilStopPushAudio()
is called. | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |PushAudio
| Asynchronously pushes audio samples to a transmitter instance. Note: PushAudio() may be called even if another API is called at the same time. | | | | | || +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |tmResult (*PushAudio)( const tmStdParms* inStdParms, const tmInstance* inInstance, const tmPushAudio* inPushAudio);
StopPushAudio
| StopPushAudio() is called when playback via PushAudio() ends. | | | | | || +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |tmResult (*StopPushAudio)( const tmStdParms* inStdParms, const tmInstance* inInstance);
SetStreamingStateChangedCallback
| Set the host callback for notification streaming state changes, i.e. when the plugin becomes active or inactive due to changes connections or enablement from the host. | | | | | || +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |tmResult (*SetStreamingStateChangedCallback)( const tmStdParms* inStdParms, void* inContext, tmStreamingStateChangedCallback inCallback);
EnableStreaming
| Enable/disable streaming to connected clients without loading or unloading the plugin. | | | | | || +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |tmResult (*EnableStreaming)( const tmStdParms* inStdParms, prBool inEnabled);
IsStreamingEnabled
| Returns whether streaming is enabled. | | | | | || +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |tmResult (*IsStreamingEnabled)( const tmStdParms* inStdParms, prBool* outEnabled);
IsStreamingActive
| Returns whether the plugin is actively streaming, i.e. streaming is enabled and the plugin has active connections. | | | | | || +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |tmResult (*IsStreamingActive)( const tmStdParms* inStdParms, prBool* outActive);
Shutdown
| Terminate a transmitter. | | | | | || | | | | | Dispose oftmResult (*Shutdown)(<br />tmStdParms* ioStdParms);
ioPrivatePluginData
if previously allocated inStartup
. | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+