ILMMpg2MxT Interface

Data types:

 

typedefenum Mpg2MxT_WriteFlag
{
   Mpg2MxT_WriteFlag_PTSValid = 0x00000001,        /* The PTS value is valid */
   Mpg2MxT_WriteFlag_PTSInSeconds = 0x00000002,    /* The PTS value is specified in seconds */
   Mpg2MxT_WriteFlag_UseStreamPTS = 0x00000004,    /* The current stream time should be used instead of the provided PTS */
   Mpg2MxT_WriteFlag_SyncPoint = 0x00000008,       /* The data is a synchronization point, and is seekable */
   Mpg2MxT_WriteFlag_Discontinuity = 0x00000010,   /* reserved */
} Mpg2MxT_WriteFlags;

Interface Properties:

 

Type

Property name

Description

VARIANT_BOOL

AutoClosePrivateData

Set to VARIANT_TRUE to allow the multiplexer to close the application provided private data stream when the normal audio/video stream has reached its end. Otherwise, the multiplexer will wait until the user has called ClosePrivateData. This is typically set to VARIANT_TRUE in a live capture situation.

VARIANT_BOOL

EnablePrivateData

Set to VARIANT_TRUE to enable the use of application provided private data.

VARAINT_BOOL

IsEndOfStream

A read-only property that indicates whether the multiplexer is at the end of the audio/video streams.

ILMKlvBuilder *

KlvBuilder

A read-only property. Contains a pointer to the multiplexer's default KLVBuilder object. This object can be used to construct KLV-specific private data.

long

PrivateDataFormatID

The 32 bit Format ID used in the application-provided private data’s registration descriptor. For example mmioFOURCC('K', 'L', 'V', 'A').

long

PrivateDataPID

The PID of the application-provided private data.

double

ResyncInterval

Specifies the time interval (in seconds) between header packets. This will effectively set the maximum time required for a demultiplexer to start decoding the stream at any given point.

 

Interface Methods:

 

HRESULT ClosePrivateData();

Description

Informs the multiplexer that the application will not be providing any more private data. This will allow the multiplexer to properly close the output stream. This method is not required if the AutoClosePrivateData property is set to VARIANT_TRUE.

Returns

S_OK if successful, < 0 if an error occurred.

 

HRESULT GetPrivateDataFormatInfo(VARIANT* pInfo);

Parameters

pInfo

Pointer to a location to be filled with a byte array containing the user-specified private format information.

Description

Retrieves the information set with SetPrivateFormatInfo.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

E_POINTER                  [0x80004003] pInfo is NULL

 

 

HRESULT SetPrivateDataFormatInfo(VARIANT Info, long InfoLength);

Parameters

pInfo

Variant containing a byte array with user-specified private format information

InfoLength

The size of the data to be written.

Description

Sets the user-specified private format information. It is used as the additional identification information in the registration descriptor. By default, no additional information is written.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

E_INVALIDARG             [0x80070057] Info is not a byte array variant

 

 

HRESULT WritePrivateData(long Flags, double PTS, VARAINT Data, long DataLength);

Parameters

Flags

Long value containing combinations of the Mpg2MxT_WriteFlag constants.

PTS

A double value containing the presentation time stamp of the user-provided data.

Data

A variant containing a byte array of user-provided data.

DataLength

The length of the data to write.

Description

Writes the application-provided data to multiplexer output.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

E_INVALIDARG             [0x80070057] Data is not a byte array variant