Medialooks Knowledge Base Support Center

Contact Us

SCTE-35 triggers detection

You can detect SCTE-35 triggers embed into local files, network streams or live feeds with MPlatform SDK. For detection, you should use OnEvent events. MFile, MLive and MPlaylist objects support a special event - "SCTE35". The event is raised the moment an SCTE-35 trigger has been received. As a parameter bsEventParam, the event has a parsed SCTE-35 message.

void m_objFile_OnEvent(string bsChannelID, string bsEventName, string bsEventParam, object pEventObject)         
         if (bsEventName == "SCTE35")    
              string strSCTE35_Msg = bsEventParam;
              // manage a playback based on the information

In general, OnEvent and OnEventSafe events are not synchronous with the main object - they are raised in a separated thread to not affect playback. But in the case of SCTE-35 triggers, time is critical. So you should set the event to be synchronous. For this, you should set "on_event.sync" property to "true" via the system registry or with the PropsSet method.

For example, for MFile:

m_objFile.PropsSet("object::on_event.sync", "true");