A command is an element of a playlist or a break or a schedule item. To add commands to a playlist or to breaks you should use PlaylistCommandAdd or BreaksCommandAdd methods.
Parameters of command:
(for example, "stop", "pause", "play")
- Additional parameters
They can be simple parameters (for example, 1.0) or attributes (for example, track=1 ramp=10.0).
- Target object
It is an object that executes the command (for example, DeckLink Renderer). If this parameter is not specified then the current upper-level object executes the command. For example, if you have a break in a playlist item (MItem object) then the playlist (MPlaylist object) executes the command.
To set a command you should get an item (from a playlist or from a break) and use ItemCommandSet method.
To check the command you should go through this workflow:
- Get the command through BreakGetByIndex, PlaylistGetByIndex.
Here is example of how to add command to playlist:
int nIndex = -1;
m_pPlaylist.PlaylistCommandAdd("pause", "", null, ref nIndex, out pItem);
pItem.ItemCommandSet("pause", "10", null); // to pause for 10 seconds
List of commands
|Command||Basic parameters||Complex parameters||Description|
|start||Starts file/playlist/live or renderer (in this case pTargetObject is used).|
|pause||time (1.0)||time=1.0||Pauses file on a specified time (in seconds).
If the command is placed in the playlist then pause will be on the first frame of the next item.
|pause_last||time=1.0||Pauses playback on the last frame of the previous file. If there is no out-point for the previous file then the time parameter is not supported.|
|stop||time (1.0)||time=1.0||Stops playlist (background will be displayed) at a specified time (in seconds).|
|rate||rate (2.0)||rate=2.0||Changes the rate of playback.|
|skip||time (5.0)||time=5.0||Only for breaks
This command skips the specified time (in seconds).
|Mutes specified a channel of the specified track. The ramp is the time of change (in seconds).
If Channel/Track is set as "-1" then all channels/tracks should be muted.
|gain||sound level (-20.0)||track=-1
|Changes sound level of the specified channel of the specified track.
If Channel/Track is set as "-1" then the sound level should be changed of all channels and all tracks.
|Changes/mutes the specified channel of the specified track.
If Channel/Track is set as "-1" then all channels/tracks should be changed /muted.
|audio-track||track number (1)||track=0
|Switches between audio tracks ( sets the mode of the specified track. See IMAudio for details).
All tracks or required tracks should be selected because switching occurs through IMAudio. For example, audio_tracks=-1 or audio_tracks=1,2
This command doesn’t change tracks selected from file (e.g. using PropsSet( file::audio_track, “x” )).
|loop||number of the last files (0)||files=0||Loops some last files.|