Decoder sample
Demonstrates how to implement a decoder in Media Foundation.
This sample implements a "fake" MPEG-1 decoder. The decoder does not actually decode the video streqam. Instead, it simply scans the bitstream for start codes. Then it finds the time code for each payload and outputs a blank video frame with the time code.
NOTE: An earlier version of this sample was built into the MPEG1Source sample.
Sample Language Implementations
C++
To build the sample using the command prompt
- Open the Command Prompt window and navigate to the Transcode directory.
- Type msbuild Decoder.sln.
To build the sample using Visual Studio (preferred method)
- Open Windows Explorer and navigate to the Decoder directory.
- Double-click the icon for the Decoder.sln file to open the file in Visual Studio.
- In the Build menu, select Build Solution. The application will be built in the default \Debug or \Release directory.
To run the sample
This sample builds a DLL that must be registered.
To register the DLL:
- Open an elevated command prompt.
- Naviage to the Debug or Release directory.
- Type "regsvr32 decoder.dll".
To unegister the DLL, type "regsvr32 /u decoder.dll"
You can use the decoder DLL with the MPEG1Source sample to play an MPEG-1 video file.