Microsoft DirectX 9.0

WM ASF Writer Filter

The WM ASF Writer is a wrapper filter for the writer object provided with the Windows Media™ Format SDK. The filter accepts a variable number of input streams and creates an Advanced Systems Format (ASF) file. The filter handles all compression and multiplexing (although the compression mechanism can be bypassed). You can use the WM ASF Writer in various scenarios including digital video (DV) capture, audio recompression, and conversion of Audio-Video Interleaved (AVI) or MPEG multimedia files for network streaming. This filter provides the only way to create Microsoft® Windows Media™ Audio and Windows Media Video files in Microsoft DirectShow.

For more information, see Creating ASF Files in DirectShow.

Filter interfaces IAMFilterMiscFlags, IBaseFilter, IConfigAsfWriter, IFileSinkFilter2, IMediaSeeking, IPersistStream, IServiceProvider, ISpecifyPropertyPages
Input pin media types Depends on the ASF profile. Typically uncompressed audio and video types, although the filter will accept compressed types if they match the ASF profile.
Input pin interfaces IPin, IMemInputPin, IAMStreamConfig
Output pin media types Not applicable.
Output pin interfaces Not applicable.
Filter CLSID CLSID_WMAsfWriter
Property page CLSID CLSID_AsfWriterProperties
Executable Qasf.dll
Merit MERIT_DO_NOT_USE
Filter Category Not specified

Remarks

The filter requires the Windows Media Format Software Development Kit (SDK) and its underlying dependencies.

The number of input pins on the filter dependings on the profile or profile identifier of the ASF stream.

The input pins support one method from the IAMStreamConfig interface: IAMStreamConfig::GetFormat. All other methods return E_NOTIMPL. Call the GetFormat method to query the pin's destination compression format, which is defined by the current ASF profile. Use the IConfigAsfWriter interface to set the profile.

The filter's IServiceProvider interface enable applications to retrieve the IWMWriterAdvanced2 interface, which is defined in the Windows Media Format SDK. This interface can only be obtained after the filter has been added to the filter graph. The IWMWriterAdvanced2 interface controls video deinterlacing, and is useful if the input is an interlaced source, such as DV video. Use the GetInputSetting and SetInputSetting methods to control deinterlacing. It is not recommended that clients use any of the other methods on this interface. The following example shows how to query for this interface:

// Assume that m_pGraph is a valid IGraphBuilder interface pointer
// and that pAsfWriter points to the IBaseFilter interface
// on the WM ASF Writer filter

IServiceProvider *pProvider = NULL;
IWMWriterAdvanced2 *pWMWA2 = NULL;

hr = m_pGraph->AddFilter(pAsfWriter, L"WM ASF Writer");
...
hr = pAsfWriter->QueryInterface(IID_IServiceProvider, (void**)&pProvider)
if (SUCCEEDED(hr))
{
    hr = pProvider->QueryService(IID_IWMWriterAdvanced2,
        IID_IWMWriterAdvanced2, (void**)&pWMWA2);
    pProvider->Release();
}