Index Topic Contents | |||
Previous Topic: ICaptureGraphBuilder Interface Next Topic: IConfigInterleaving Interface |
IConfigAviMux Interface
The IConfigAviMux interface controls how the AVI multiplexer filter writes files out to disk. Microsoft® DirectShow currently exposes this interface through the property page of the AVI multiplexer filter and you can use it to set the master stream and compatibility indexes.
IConfigAviMux provides backward compatibility with older Video for Windows® audio-video interleaved (AVI) index formats (idx1) as well as extended AVI 2.0 index formats (indx) to allow for file sizes greater than 1 gigabyte (GB). Set and retrieve the compatibility indexes by using the IConfigAviMux::SetOutputCompatibilityIndex and IConfigAviMux::GetOutputCompatibilityIndex methods. See AVI 2.0 File Format Extensions for more information on AVI 2.0.
When to Implement
DirectShow implements this interface and makes its functionality available to anyone through the property page of an AVI multiplexer filter. However, you can implement this interface yourself if you're writing a filter that takes audio and video streams from a capture graph and generates an AVI file.
When to Use
Use this interface when your application must control how a file is captured.
Methods in Vtable Order
IUnknown methods Description QueryInterface Retrieves pointers to supported interfaces. AddRef Increments the reference count. Release Decrements the reference count.
IConfigAviMux methods Description SetMasterStream Sets the master stream that other streams must synchronize to after the file is saved to disk. GetMasterStream Retrieves the master stream that other streams must synchronize to after the file is written out. SetOutputCompatibilityIndex Sets the AVI index format for the file that the multiplexer saves to. GetOutputCompatibilityIndex Retrieves the AVI index format for the file that the multiplexer will write to. IConfigAviMux Interface
IConfigAviMux::GetMasterStreamRetrieves the master stream that other streams must synchronize to after the file is written out.
HRESULT GetMasterStream(
LONG *pStream
);Parameters
- pStream
- [out] Pointer to the master stream.
Return Values
Returns an HRESULT value that depends on the implementation of the interface.
Remarks
To eliminate capture drifts that can occur between audio sampling rates and video frame rates, it is recommended that you use combined audio/video cards for capture of large files.
See Also
IConfigAviMux::SetMasterStream
IConfigAviMux Interface
IConfigAviMux::GetOutputCompatibilityIndexRetrieves the AVI index format for the file that the multiplexer will write to.
HRESULT GetOutputCompatibilityIndex(
BOOL *pfOldIndex
);Parameters
- pfOldIndex
- [out] Value indicating the index format. Returns TRUE if AVI 1.0 (idx1) index format or AVI 2.0 (indx) index format is set; returns FALSE if only AVI 2.0 (indx) index format is set.
Return Values
Returns an HRESULT value that depends on the implementation of the interface.
See Also
IConfigAviMux Interface
IConfigAviMux::SetMasterStreamSets the master stream that other streams must synchronize to after the file is saved to disk.
HRESULT SetMasterStream(
LONG iStream
);Parameters
- iStream
- [in] Master input stream. Set to 1 to disable.
Return Values
Returns an HRESULT value that depends on the implementation of the interface.
Remarks
Different streams in the capture scenario can capture at different rates if you are using separate audio and video capture cards. By specifying a master stream that all others must synchronize to, this method adjusts the frame rate or audio sampling rate to account for drifts in the rates.
To eliminate capture drifts that can occur between audio sampling rates and video frame rates, it is recommended that you use combined audio/video cards for capture of large files.
See Also
IConfigAviMux::GetMasterStream
IConfigAviMux Interface
IConfigAviMux::SetOutputCompatibilityIndexSets the AVI index format for the file that the multiplexer saves to.
HRESULT SetOutputCompatibilityIndex(
BOOL fOldIndex
);Parameters
- fOldIndex
- [in] TRUE indicates either AVI 1.0 (idx1) index format or AVI 2.0 (indx) index format; FALSE indicates only AVI 2.0 (indx) index format.
Return Values
Returns an HRESULT value that depends on the implementation of the interface.
Remarks
In addition to backward compatibility with Video for Windows® AVI index formats (idx1), DirectShow also supports extended AVI 2.0 index format (indx), which this method can specify. AVI 2.0 index format allows for increased AVI file size (greater than 1 GB), hierarchical indexing, incremental growth of files, and minimal disk seeks. See AVI 2.0 File Format Extensions for more information on AVI 2.0.
See Also
IConfigAviMux::GetOutputCompatibilityIndex
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.