ASFParser Sample
Shows how to parse data from an Advanced Systems Format (ASF) file by using the low-level ASF components in Media Foundation. The sample demonstrates the following tasks:
- Enumerating the audio and video streams in an ASF file.
- Selecting an audio or a video stream for parsing.
- Seeking to a packet at a desired playback time.
- Generating compressed samples for the selected stream.
- Decoding audio and video samples.
APIs Demonstrated
This sample demonstrates the following Microsoft Media Foundation interfaces:
Usage
- To open an ASF file, click the Open Media File... button.
- Select an ASF file and click Open. Information about the file is shown on the Information pane.
- Under Parser Configuration, select a stream to parse.
- To generate samples in reverse, select Reverse.
- To specify the start point, drag the slider to the desired location.
- To begin parsing, click the Generate Samples button. Information about the samples is shown on the Information pane.
- To test the samples for the audio stream, click the Test Audio button.
- To test the samples for the video stream, click the Show Bitmap button.
Requirements
Product | Version |
---|---|
Windows SDK | Windows 7 |
Downloading the Sample
This sample is available in the Windows classic samples github repository.
Related topics