-->
We use VMR9 in renderless mode, with a custom Allocator (the same approach as the VMR9Allocator sample from the SDK), but the main difference is that our program renders the escene in another thread, totally independent on frame arrivals. In fact, out video engine maintains a buffer of frames (about 10 per video playing) which are presented. The interface IVMRSurfaceAllocatorNotify is defined in DirectShow.NET's srcVmRender.cs. The library also provides you with a sample for VMR-9 in SamplesVMR9VMR9Allocator (and SamplesVMR9VMR9Allocator2). You can implement renderless VMR-7 in a similar way (VMR-7's interface is actually somewhat simpler).
The DirectShow samples are included with the Windows SDK. They are located under the path [SDK Root] SamplesMultimediaDirectShow.
The following table lists all of the DirectShow samples provided in the Windows SDK. For instructions on how to build the samples, refer to the documentation provided in the Windows SDK.
If there is additional documentation for a sample, the first column of this table links to it.
Sample | Area | Description | Additional Dependencies |
---|---|---|---|
DirectShow Base Classes | Base class library | C++ classes and utility functions designed for implementing DirectShow filters. | |
AmCap Sample | Capture | Video capture application. | strmbase.lib |
DVApp Sample | Capture | Digital Video (DV) capture application. | |
PlayCap Sample | Capture | Simple capture application. | |
DMO Demo Sample | DMO | Streams audio data from a WAV file through an audio effect DMO. | DirectX SDK |
DVD Sample | DVD | Demonstrates basic DVD playback and navigation, plus advanced features such as parental level management, bookmarks, karaoke, and command synchronization. | |
InfTee Filter Sample | Filters, miscellaneous | Sample implementation of the Infinite Pin Tee filter. | strmbase.lib |
Metronome Filter Sample | Filters, miscellaneous | Shows how to implement a reference clock. | strmbase.lib |
PSI Parser Filter Sample | Filters, miscellaneous | Receives Program Specific Information (PSI) tables from an MPEG-2 transport stream and extracts program information. | strmbase.lib |
Dump Filter Sample | Filters, renderer | Writes media samples receives to a text file. | strmbase.lib |
SampVid Filter | Filters, renderer | Video renderer filter. | strmbase.lib |
Scope Filter Sample | Filters, renderer | Displays sound data as wave forms. | strmbase.lib |
Async Filter Sample | Filters, source | File reader filter that supports progressive download. | strmbase.lib |
Ball Filter Sample | Filters, source | Video source filter that produces an image of a bouncing ball. | strmbase.lib |
Push Source Filters Sample | Filters, source | Source filters that provide the following data as a video stream: A single bitmap, a set of bitmaps, a copy of the current desktop image. | strmbase.lib |
Synth Filter Sample | Filters, source | Source filter that generates audio waveforms. This sample demonstrates dynamic graph building. | strmbase.lib |
EZRGB24 Filter Sample | Filters, transform | Image processing filter. | strmbase.lib |
Gargle Filter Sample | Filters, transform | Audio effect filter. | strmbase.lib |
WavDest Filter Sample | Filters, transform | Writes an audio stream to a WAV file. | strmbase.lib |
DMOEnum Sample | Miscellaneous | Shows how to enumerate DirectX Media Objects (DMOs). | |
Mapper Sample | Miscellaneous | Shows how to use the Filter Mapper to find filters in the registry. | |
SysEnum Sample | Miscellaneous | Demonstrates using the System Device Enumerator to enumerate devices and filters. | |
CutScene Sample | Playback | Plays a video file in full-screen mode. | |
DDrawXCL Sample | Playback | Plays video in DirectDraw exclusive full-screen mode, using the IDDrawExclModeVideo interface on the Overlay Mixer filter. | |
DShowPlayer Sample | Playback | Video playback application. | |
EVRPlayer Sample | Playback | Demonstrates how to use the DirectShow EVR filter.[!Note] This sample is available in the Windows SDK for Windows Server 2008 or later. | strmbase.lib |
Texture3D9 Sample | Playback | Draws video on a Microsoft DirectX 9.0 texture surface. | strmbase.lib, DirectX SDK |
Ticker Sample | VMR-9 | Uses the VMR-9 to blend video and text. | |
VMR9Allocator Sample | VMR-9 | Implements a custom allocator-presenter for the VMR-9. | strmbase.lib |
VMR9Compositor Sample | VMR-9 | Implements a custom mixer for the VMR-9. | |
VMRPlayer Sample | VMR-9 | Uses the VMR-9 to blend one or two running videos and a static image. | |
Watermark Sample | VMR-9 | Blends a static bitmap onto a video during playback, using the VMR-9. | |
Windowless Sample | VMR-9 | Demonstrates windowless mode in the VMR-9. |
Additional Dependencies
Some of the samples link to the DirectShow base class library. To build these samples, you must first build the base class library. For more information, see DirectShow Base Classes. The base class library is required for all of the sample filters.
A few of the samples also require the DirectX SDK, in addition to the Windows SDK. To build these samples, you must install the DirectX SDK and set the %DXSDK_DIR% environment variable equal to your DirectX SDK installation path.
Many of the DirectShow samples use a set of common headers and source files located in the directrory [SDK Root]SamplesMultimediaDirectShowCommon. If you copy a sample folder to another directory, make sure to copy the Common folder as well.
Related topics
Hello.
I build an application based on the Microsoft DirectX9 SDK sample called ‘VMR9Allocator’. The sample is located at...SamplesC++DirectShowVMR9VMR9Allocator.
This sample is designed to show how to render streaming media in to a D3D scene using the Video Mixing Render filter 9(VMR9).
The problem is that the ‘VMR9Allocator’ application does not handle the ‘Reset’ states of the D3D device, and when I tried to add my code that handles the reset states (as it is usually expected from D3D applications each time the window is being resized ) ,the application crashes or stops to work .
So how do I handle the ‘Reset’ states?
I will very appreciate it if you can answer me.
Motty Brami
[email protected] :wave:
I build an application based on the Microsoft DirectX9 SDK sample called ‘VMR9Allocator’. The sample is located at...SamplesC++DirectShowVMR9VMR9Allocator.
This sample is designed to show how to render streaming media in to a D3D scene using the Video Mixing Render filter 9(VMR9).
The problem is that the ‘VMR9Allocator’ application does not handle the ‘Reset’ states of the D3D device, and when I tried to add my code that handles the reset states (as it is usually expected from D3D applications each time the window is being resized ) ,the application crashes or stops to work .
So how do I handle the ‘Reset’ states?
I will very appreciate it if you can answer me.
Motty Brami
[email protected] :wave: