Microsoft DirectX 8.0 |
The IConfigAsfWriter interface is implemented by the DirectShow ASF Writer filter and provides methods for getting and setting the Advanced Streaming Format (ASF) profiles the filter will use to write files.
When the ASF Writer filter is created, it is configured automatically with a default ASF audio-visual profile based on the incoming streams. A profile describes various attributes of an ASF file such as bit rate, number and type of streams, compression quality, and so on. The filter uses the profile to determine what kind of ASF file to write, how many input pins it must set up, and what media types they can accept. In most cases, the default profile should be suitable, but if it is not, an application can modify it using the filter's IConfigAsfWriter interface methods. For full details on ASF profiles, see the Microsoft® Windows Media Software Development Kit (SDK).For more information on how to write ASF files, see Creating ASF Files in DirectShow.
Requirements
Requires Dshowasf.h, Windows Media Format SDK.
Methods in Vtable Order
IUnknown methods Description QueryInterface Retrieves pointers to supported interfaces. AddRef Increments the reference count. Release Decrements the reference count. IConfigAsfWriter methods Description ConfigureFilterUsingProfileId Configures the filter to write an ASF file with a profile identifier (ID) index from the system profile list. (For Windows Media Format 4.0 profiles only.) GetCurrentProfileId Retrieves the current ASF profile ID. (For Windows Media Format 4.0 profiles only.) ConfigureFilterUsingProfileGuid Configures the filter to write an ASF file based on the specified predefined Windows Media Format SDK profile GUID. GetCurrentProfileGuid Retrieves the current ASF profile GUID defined by the Windows Media Format SDK. ConfigureFilterUsingProfile Configures the filter to write an ASF file based on the specified application-defined profile. GetCurrentProfile Retrieves the application-defined ASF profile. SetIndexMode Enables the application to control whether the file will be indexed and therefore seekable. GetIndexMode Retrieves the current index mode.
Configures the filter to write an ASF file based on the specified application-defined profile.
Syntax
HRESULT ConfigureFilterUsingProfile( IWMProfile *pProfile );
Parameters
- pProfile
- [in] IWMProfile interface pointer to the application-defined profile.
Return Value
Returns one of the following values.
S_OK Success. VFW_E_WRONG_STATE The graph is stopped. E_POINTER The IWMProfile interface pointer is invalid.
Remarks
IWMProfile is defined in the Windows Media Format SDK.
If successful, this method will cause an EC_GRAPH_CHANGED event notification to be sent to the application.
Configures the filter to write an ASF file based on the specified predefined profile.
Syntax
HRESULT ConfigureFilterUsingProfileGuid( REFGUID guidProfile );
Parameters
- guidProfile
- [in] Profile GUID as defined in the Windows Media Format SDK header file Wmsysprf.h.
Return Value
Returns one of the following values.
S_OK Success. E_FAIL The profile is invalid. VFW_E_WRONG_STATE The filter graph is stopped.
Configures the filter to write an ASF file with a profile identifier (ID) index from the system profile list. (For Windows Media Format 4.0 profiles only.)
Syntax
HRESULT ConfigureFilterUsingProfileId( DWORD dwProfileId );
Parameters
- dwProfileId
- [in] Profile ID as defined in the Windows Media Format SDK.
Return Value
Returns one of the following values.
S_OK Success. E_FAIL The profile is invalid. VFW_E_WRONG_STATE The filter graph is stopped.
Remarks
This method is now obsolete because it assumes version 4.0 Windows Media Format SDK profiles. To configure the filter for version 7.0 and later profiles, use ConfigureFilterUsingProfile or ConfigureFilterUsingProfileGuid.
Retrieves the application-defined ASF profile.
Syntax
HRESULT GetCurrentProfile( IWMProfile **ppProfile );
Parameters
- ppProfile
- [out] Address of a pointer that receives the IWMProfile interface of the application-defined profile.
Return Value
Returns S_OK if successful, or an HRESULT error code otherwise.
Remarks
If the method succeeds, the IWMProfile pointer that it returns has an outstanding reference count. Be sure to release the interface when you are finished using it.
Retrieves the current ASF profile ID.
Syntax
HRESULT GetCurrentProfileGuid( GUID *pProfileGuid );
Parameters
- pProfileGuid
- [out] Pointer to a variable of type GUID that receives the profile ID.
Return Value
Returns S_OK if successful, or an HRESULT error code otherwise.
Retrieves the current ASF profile ID. (For Windows Media Format 4.0 profiles only.)
Syntax
HRESULT GetCurrentProfileId( DWORD *pdwProfileId );
Parameters
- pdwProfileId
- [out] Pointer to a variable of type DWORD that receives the current profile ID.
Return Value
Returns S_OK if successful, or an HRESULT error code otherwise.
Remarks
This method is now obsolete because it assumes version 4.0 Windows Media Format SDK profiles. Use GetCurrentProfile or GetCurrentProfileGuid instead to correctly identify a profile for version 4.0, 7.0 and later.
Retrieves the current index mode.
Syntax
HRESULT GetIndexMode( BOOL *pbIndexFile );
Parameters
- pbIndexFile
- [out] Pointer to a variable of type BOOL that receives the index mode setting. A value of TRUE indicates that the ASF Writer is configured to write indexed files.
Return Value
Returns S_OK if successful, or an HRESULT error code otherwise.
Remarks
Use this method to determine whether the ASF Writer is currently configured to write indexed ASF files. See the Remarks for SetIndexMode for more information.
Enables the application to control whether the file will be indexed and therefore seekable.
Syntax
HRESULT SetIndexMode( BOOL bIndexFile );
Parameters
- bIndexFile
- [in] Variable of type BOOL; TRUE specifies that the file will be indexed.
Return Value
Returns S_OK if successful, or an HRESULT error code otherwise.
Remarks
By default, the ASF Writer creates indexed ASF files. It performs the indexing when the graph stops. You can disable this behavior if you want to do your own indexing as a post-processing step.