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:

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; 

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

Interface Methods:

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

Parameters

notificationType

Notification type.

Param1

First parameter. Its value depends on the notification type

Param1

Second parameter. Its value depends on the notification type

Description

This method will be called by the LEAD RTSP, ONVIF, or UDP Source when there is a notification. The following notifications are available:

Notification type

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).

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

S_OK if successful, < 0 if there is an error

Help Version 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Filters C API Help