The ILMRTSPSrcDataCallback interface is a user-defined interface. It must be registered by setting the ILMRTSPSrc::DataCallbackObj property. After you do this, the LEAD RTSP Source filter will call its members.
typedef enum DataFlagConstants
{
DataFlag_BeginSample = 1, /* This packet is the beginning of a private data sample */
DataFlag_EndSample = 2, /* This packet is the end of a private data sample */
DataFlag_IsKLV = 4, /* The buffer seems to be KLV data */
DataFlag_IsAscii = 8, /* The buffer seems to be ASCII data */
DataFlag_IsBinary = 0x10, /* The buffer is binary data */
DataFlag_IsSyncPoint = 0x20, /* This is a sync point */
DataFlag_EndOfStream = 0x40, /* The end of stream has been reached */
} DataFlagConstants;
pData | Pointer to a variant containing the private data. |
lDataSize | A value that represents the size of the data contained in pData. |
streamPID | A PID identifying the stream containing the private data. Use this value to distinguish between the different private data streams in the file. |
PTS | Presentation Time Stamp that indicates the time when this data was generated. The PTS should be ignored if PTSType is set to PTS_Invalid. |
flags | One or more DataFlagConstants enumeration values or-ed together. |
Enumerates the private data packets present in the file. There can be more than one private data stream in the file and you should use streamPID to distinguish between the various streams. This chunk might be a portion of a private data packet. Use the Flags value to determine whether this packet is:
A whole packet (DataFlag_BeginSample and DataFlag_EndSample are both set) or
The beginning (only DataFlag_BeginSample is set) or
The middle (neither DataFlag_BeginSample or DataFlag_EndSample is set)
The end (only DataFlag_EndSample is set)
If the private data stream is a KLV type (that is, if Flags has DataFlag_IsKLV set), then each packet contains a list of KLV keys and subkeys. In this case, it is best to use ILMRTSPSrc::GetKlvParser to obtain an ILMKlvParser interface. You can use the ILMKlvParser interface to enumerate all the KLV keys present in a packet. For more information on KLV keys and format, see SMPTE 336M-2001.
You can examine Flags to see if the data seems to be:
KLV (DataFlag_IsKLV is set)
Ascii (DataFlag_IsAscii is set)
Binary (DataFlag_IsBinary is set)
The demux estimates the type of data based on its contents. If you believe this estimation is wrong, you can interpret the data any way you want.
S_OK if successful.
< 0 if you want to indicate an error situation and abort the playback or conversion.