Microsoft DirectX 9.0 |
Note The ICaptureGraphBuilder interface is deprecated. Use ICaptureGraphBuilder2 instead.
Creates the rendering section of the filter graph, which will save bits to disk with the specified file name.
Syntax
HRESULT SetOutputFileName(
const GUID *pType,
LPCOLESTR lpwstrFile,
IBaseFilter **ppf,
IFileSinkFilter **pSink
);
Parameters
pType
[in] Pointer to a GUID representing the media subtype. Must be &MEDIASUBTYPE_Avi
.
lpwstrFile
[in] Pointer to a wide-character string containing the output file name.
ppf
[out] Address of a pointer to an IBaseFilter interface representing the multiplexer filter. This method increments the reference count on the IBaseFilter interface so you must decrement the reference count by using the Release method on this parameter when done using the filter.
pSink
[out] Address of a pointer to an IFileSinkFilter interface representing the file writer. This method increments the reference count on the IFileSinkFilter interface so you must decrement the reference count using Release when done using the filter.
Return Value
Returns an HRESULT value. Possible values include the following.
Value | Description |
E_FAIL | Failure. |
E_INVALIDARG | Invalid argument. Audio-Video Interleaved (AVI) is the only supported output format. |
E_OUTOFMEMORY | Out of memory. |
E_POINTER | Null pointer argument. |
E_UNEXPECTED | Unexpected error occurred. |
NOERROR | Success. |
S_OK | Instance of the AVI multiplexer filter was successfully created. |
Remarks
This method inserts the multiplexer and the file writer into the filter graph and calls IFileSinkFilter::SetFileName to set the output file name.
You can use the ppf parameter returned by this method as the pfRenderer parameter in calls to RenderStream.
You can use the pSink parameter from this method in a call to SetFileName to change the file name set by ICaptureGraphBuilder::SetOutputFileName.
See Also