ILMSrcCallback Interface

This interface should be implemented by the user. The object implementing this interface should be set to ILMUDPSrc::CallbackObj, ILMRTSPSrc::CallbackObj or to ILMONVIFSrc::CallbackObj. The LEAD RTSP, ONVIF, or UDP Source will call the EventNotification whenever appropriate.

Data Types

SrcEventNotificationConstants

Summary

Lists the possible values for the event notification constants passed to the EventNotification method.

Syntax

typedef enum 
{ 
   EVENTTYPE_NODATAAVAILABLE = 0, /* The filter is not receiving any data */ 
   EVENTTYPE_DATASTOPPED = 1, /* The filter has stopped receiving data */ 
   EVENTTYPE_CONNECTIONLOST = 2, /* The connection was lost and playback has stopped */ 
} SrcEventNotificationConstants; 
Enumeration Description
EVENTTYPE_NODATAAVAILABLE [0] The source filter has not received any data. This allows the user to abort the wait operation by returning an error code from EventNotifications. This even will be called at regular intervals (every second) until the source receives some data or until the user returns an error from this method. If you return an error from the callback, the loading process will be aborted. Param1 = the amount of time in milliseconds elapsed since the source received data the last time. Param2 = Unused (will be zero).
EVENTTYPE_DATASTOPPED [1] The LEAD RTSP Source sends this event every second if it has stopped receiving data from the remote server. It indicates some data has been received in the past, but it has stopped arriving. Normally, a server will send end of stream notifications to indicate no more data is expected. In this case, no end of stream notification has been received, so there is a high possibility the connection was lost. This event is often followed by the EVENTTYPE_CONNECTIONLOST event.Param1 = the amount of time in milliseconds elapsed since the last time the source received data.Param2 = Unused (will be zero).
EVENTTYPE_CONNECTIONLOST [2] The connection was lost and playback has stopped. Param1 and Param2 are unused (will be zero).

Methods

HRESULT EventNotification(SrcEventNotificationConstants notificationType, double Param1, double Param2);

Description

This method will be called by the LEAD RTSP, ONVIF, or UDP Source when there is a notification.

Parameters

notificationType

Notification type.

Param1

First parameter. Its value depends on the notification type.

Param1

Second parameter. Its value depends on the notification type.

Comments

The LEADTOOLS Multimedia toolkit will automatically use an ILMSrcCallback interface to process these notifications. These notifications are translated into EC_LOADSTATUS events. For more information, refer to the ltmmLoadStatusEventCode Constants topic.

If you set your own ILMSrcCallback interface, the toolkit will not receive the EC_LOADSTATUS events anymore.

Returns

Return Description
S_OK Successful.
< 0 An error occurred.
Help Version 22.0.2023.2.15
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Filters C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.