Articles in this section

Events

Events help you to monitor what happens with objects that you operate. There are 2 types of events:

OnFrame (OnFrameSafe) - raises on each processed frame. Available only in MPlatform SDK. With MFormats SDK you control each frame separately so there is no need in such events.

OnEvent (OnEventSafe) - raises when each significant event happens with an object.

Difference between -Safe events and usual events

The difference between OnEventSafe and OnFrameSafe events is noticeable only with .Net-based languages, e.g. C# and VB.Net. The -Safe events were implemented to avoid objects handles leakage specific to the way .Net technology works with COM objects.

For Delphi and C++ you should use OnEvent and OnFrame events through IMCallback interfaces. See the article about memory release issues for additional information.

"SCTE35" - raises the moment an SCTE-35 trigger is received. As bsEventParam it uses a parsed SCTE-35 message string.

MLive & MFLive

"no_signal" - raises when a source signal is lost ("No Video Signal" message appears).Possible bsEventParam values: true (the signal is lost) and false (the signal is restored).

"format_changed" - raises the moment a source video format is changed. bsEventParam shows the name of a new video format.

"SCTE35" - raises the moment an SCTE-35 trigger is received. As bsEventParam it uses a parsed SCTE-35 message string.

MPlaylist

"switch" - raises the moment playlist switches from one item to another.bsEventParam: "from" - indicates a previous item (a path to a file or an object name) as the bsChannels parameter. "to" - indicates the item (a path to a file or an object name) as the bsChannels parameter.

"playlist-command" - raises the moment an MPlaylist executes a command. Indicates a command as the bsChannels parameter.

"playlist_add" - raises the moment you add a new item with the PlaylistAdd method. Shows a name of the MPlaylist object as the bsChannels parameter.bsEventParam is a target index of a new item.

"playlist_remove" - raises the moment you remove an item with the PlaylistRemove or the PlaylistRemoveByIndex methods. Shows a name of the MPlaylist object as the bsChannels parameter.bsEventParam is a target index of a removed item.

"EOL" - raises the moment the playlist is over. Shows a name of the MPlaylist object as the bsChannels parameter.

"pause" - raises the time you set the object in pause state by the FilePlayPause method.bsEventParam is a duration of the pause.

"start" - raises the moment the object is started with the ObjectStart method.

"stop" - raises the time you set the object in stop state by the FilePlayStop method.bsEventParam is: a duration of the stop "stop-done" - raises when stop time is over and playback is resumed. "error-OutOfMemory" - raises when the playlist is stopped because of an OutOfMemory exception.

"EOF" - raises the moment an item is over.

"break-command" - raises the moment a break command is executed.bsEventParam is: a position of a break "error-execute" - indicates that command can't be executed.

"break-start" - raises the moment a break is started.bsEventParam is: a position of a break "error-start" - indicates that a break can't be started.

"break-done" - raises the moment a break is over.

"SCTE35" - raises the moment an SCTE-35 trigger is received. As bsEventParam it uses a parsed SCTE-35 message string.

MWriter & MFWriter

bsChannelID is the name of an object.

"file-close" - raises the moment when the encoded file is available for usage by the system. Available for both MWriter and MFWriter object.bsEventParam is a path to the encoded file.

"error-abort" - raises on any error during recorder. Available for MFWriter only.bsEventParam can be "disk-full" (raises when the target disk is full) or an error code.

"switch" - raises the moment you switch from one destination to another.bsEventParam is a path to the encoded file.

"start" - raises the moment the encoding is started.bsEventParam is a path to the encoded file.

"stop" - raises the moment you stop the encoding.bsEventParam is a path to the encoded file.

"file-close-info" - raises the moment when the encoded file is available for usage by the system.bsEventParam is information about a file.

"disk-full" - raises when the target disk is full.

"end-of-media" - raises when the end of a source is reached.

"max-switch" - raises when the maximal amount of switches is reached.

MMixer

"scene_active_set" - raises the moment you set an active scene.bsEventParam indicates whether the active scene is set ("true", "false").

"pause" - raises the time you set the object in pause state by the FilePlayPause method.bsEventParam is: duration of the pause. "pause-done" - indicates that the pause is over "pause-start" - indicates that the pause is started

"start" - raises the moment you start the object with the ObjectStart method.

"stop" - raises the moment you set the object in stop state by the FilePlayStop method.bsEventParam is a duration of the stop.

"source_disconnected" - raises when a stream is disconnected.

"source_connected" - raises when a stream is connected back.

"disconnect" - raises when you remove a stream with the StreamsRemove method.

"connect" - raises when you add a stream with the StreamsAdd method.

MPreview

"wpf_nextframe" - raises on each received frame in wpf_preview=true mode. See the article about WPF Preview for more details.