blob: 18a4517b78a356c2d258dd476b60afb9707434dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
This sample demonstrates how to play clear content in Media Foundation. The
code is taken and modified from Media Foundation sample code website:
http://code.msdn.microsoft.com/mediafoundation
Requirements: Windows 7
6/28/2010 - Version 1
6/29/2010 - Added option for saving file in .mp4 format
7/1/2010 - Changed return types of public methods, disabled audio since the
purpose is to use Media Foundation's video capabilities only.
Usage: mf_playback.exe (-r|-f) (-s|-h) input-file [output-file]
There are two flags that needs to be specified, plus an input file.
Flag 1:
-r: Render to window. This is the playback mode. During playback mode, press
spacebar to switch between play/pause.
-f: Transcode. A media file is transcoded into mp4 format (H.264/AAC). An
output file needs to be specified as the argument after input file.
Flag 2:
-s: Software decoding.
-h: Hardware decoding using DXVA2. Not implemented yet.
Todos:
- Add flags to support hardware decoding
|