Audio/Video Playback in DirectShow
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
This tutorial shows how to write a DirectShow application that plays a media file.
Before reading this tutorial, you might want to read the following topics:
- Introduction to DirectShow Application Programming
- How To Play a File
- About DirectShow Filters
- About the Filter Graph Manager
In this section
- Step 1: Declare the DShowPlayer Class
- Step 2: Declare CVideoRenderer and Derived Classes
- Step 3: Build the Filter Graph
- Step 4: Add the Video Renderer
- Step 5: Add Video Functionality
- Step 6: Handle Graph Events
- Step 7: Transport Controls
- DirectShow Playback Example
Related topics