ltmmLoadStatusEventCode Constants

The ltmmLoadStatusEventCode constants are used to differentiate between the different ltmmEC_LOADSTATUS events. When the ltmmEC_LOADSTATUS event is received, Param1 parameter is set to one of the following values.

Members

ltmmAM_LOADSTATUS_PROGRAM_PACKET_RECEIVED

[0x0100] The LEAD MPEG-2 Transport Demultiplexer sends this event to signal that it has been added to the graph and that it has detected the number, type and approximate format of the elementary streams in the current program. For example, it might know that there is a H264 video stream and an MPEG Audio stream, but it does not yet know the exact format of these streams (width, height, sampling rate, etc). It might still need to process more data to get the exact format.Use this event to speed up the load by instructing the multiplexer not to wait until it receives data from streams that you do not consider important. For example, if the speed with which the graph is built is more important to you than playing the audio stream, instruct the demultiplexer that the audio stream is not important and that you want to start playing the graph as soon as the video stream has been identified. This can speed up playback in situations in which certain streams have packets that occur at rare intervals. By default, the demultiplexer will wait until it identifies all important streams so if the audio stream is signalled as present but the audio packets are never received, the graph might wait a long time for audio packets that will never come.

ltmmAM_LOADSTATUS_WAITING_FOR_DATA

[0x0101] The LEAD MPEG-2 Transport UDP Source and LEAD RTSP Source filters send this event every second if they have not yet received any image data. Param2 is the number of milliseconds elapsed since the filter started waiting for data.The LEAD MPEG-2 Transport UDP Source filter sends this event during the load process. The LEAD RTSP Source filter can send this event during load or when you try to run the graph.If this event is received during the load, you can use this event to abort the load by calling IltmmPlay::ResetSource or IltmmConvert::ResetSource. If the event is sent when you try to run the graph, you can abort the Run operation by calling IltmmPlay::Stop or IltmmConvert::StopConvert.See the Aborting Loading From The RTSP and UDP Source Filters topic for more information on this event.

ltmmAM_LOADSTATUS_PROGRAM_COUNT_DETECTED

[0x0102] The LEAD MPEG-2 Transport Demultiplexer sends this event to signal that it has been added to the graph and that it has detected the number of programs in the stream or file. But it does not yet know how many elementary streams are in each program. By default, the demultiplexer will load the streams in the first program. But you can intercept this event and instruct it to load a different program using IltmmPlay::put_CurrentProgram or IltmmConvert::put_CurrentSourceProgram. You can also get the demux interface and call ILMMpgDmx::put_CurrentProgram directly.

ltmmAM_LOADSTATUS_PROGRAM_INFO_DETECTED

[0x0103] The LEAD MPEG-2 Transport Demultiplexer sends this event when it has received more information (metadata) about the available programs in the source. This is sent in response to receiving and parsing Program and System Information Protocol (PSIP) tables. PSIP tables contain information about the name of the TV channel associated with each program, etc. Call ILMMpgDmx::GetProgramInfoAsLong and ILMMpgDmx::GetProgramInfoAsString to get this extra information.

ltmmAM_LOADSTATUS_VIDEO_SIZE_CHANGED

[0x104] The video size has changed. This event is usually received while playing DVDs. It is common for DVDs to have video of one size in the menu and another size in the main title.

ltmmAM_LOADSTATUS_DATA_STOPPED

0x105] 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 notification 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 ltmmAM_LOADSTATUS_CONNECTION_LOST event.

Param2 is the number of milliseconds elapsed since the last time the filter received any data.

The toolkit will use an ILMSrcCallback interface to implement these notifications. If you set your own callback interface using the ILMRTSPSrc::CallbackObj property, you will not get these notifications anymore.

ltmmAM_LOADSTATUS_CONNECTION_LOST

The LEAD RTSP Source sends this event when playback has stopped because the connection to the server has been lost. It is an indication of some kind of error.

This event is not sent if the playback stopped normally by reaching the end of stream.

The toolkit will use a ILMSrcCallback interface to implement these notifications. If you set your own callback interface using the ILMRTSPSrc::CallbackObj property, you will not get these notifications anymore.

Comments

These events are typically sent while the file is loaded and will often be sent before the file is fully loaded.

For more detailed information, refer to the Microsoft documentation for Event Notification Codes and DVD Event Notification Codes.

If you receive ltmmEC_LOADSTATUS but lParam1 is not set to one of the values listed above, then the event might have been sent by other filters. See the Microsoft documentation for the DirectShow EC_LOADSTATUS event for more details.

See the Programming with the MPEG-2 Transport Demultiplexer topic in the filters help file for more information and for an example.

See the ltmmMediaEventCode constants topic for a list of the other events.

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

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