幾天前,我想試試Media Foundation。神祕的MFSourceFilter
我注意到的第一件事是不播放MPEG2文件(至少在Windows 7上不播放),但是,Windows Media Player 12卻沒有。因此,我跑了mftrace wmplayer.exe
並檢查了輸出。
9052,2BF4 14:06:36.00364 COle32ExportDetours::CoCreateInstance @ Created {14D7A407-396B-44B3-BE85-5199A0F0F80A} Media Foundation DShow Source Resolver (C:\Windows\SysWOW64\mfds.dll) @0984E950 - traced interfaces:
9052,1BEC 14:06:36.00450 COle32ExportDetours::CoCreateInstance @ Created {CDA42200-BD88-11D0-BD4E-00A0C911CE86} Filter Mapper2 (C:\Windows\SysWOW64\quartz.dll) @0821B894 - traced interfaces:
9052,2BF4 14:06:36.00723 COle32ExportDetours::CoCreateInstance @ Created {E436EBB3-524F-11CE-9F53-0020AF0BA770} Filter Graph (C:\Windows\SysWOW64\quartz.dll) @081C7DD0 - traced interfaces: IGraphBuilder @081C7DD0, IMediaControl @04E6D66C,
9052,2BF4 14:06:36.00741 COle32ExportDetours::CoCreateInstance @ Created {0344EC28-5339-4124-A186-2E8EEF168785} MFSourceFilter (C:\Windows\SysWOW64\mfds.dll) @09934228 - traced interfaces:
9052,2BF4 14:06:36.00742 CMFPlatExportDetours::MFStartup @ Version=0x00020070, dwFlags=0x00000000
9052,2BF4 14:06:36.01176 CGraphBuilderDetours::AddFilter @081C7DD0 filter: 'MF Source Filter'
9052,2BF4 14:06:36.01194 COle32ExportDetours::CoCreateInstance @ Created {336475D0-942A-11CE-A870-00AA002FEAB5} MPEG-I Stream Splitter (C:\Windows\SysWOW64\quartz.dll) @08084574 - traced interfaces:
9052,2BF4 14:06:36.COle32ExportDetours::CoCreateInstance @ Created {AFB6C280-2C41-11D3-8A60-0000F81E0E4A} MPEG-2 Demultiplexer (C:\Windows\SysWOW64\mpg2splt.ax) @082003E4 - traced interfaces:
9052,2BF4 14:06:36.01328 COle32ExportDetours::CoCreateInstance @ Created {E1F1A0B8-BEEE-490D-BA7C-066C40B5E2B9} Microsoft DTV-DVD Audio Decoder (C:\Windows\SysWOW64\msmpeg2adec.dll) @0829C77C - traced interfaces:
9052,2BF4 14:06:36.04667 COle32ExportDetours::CoCreateInstance @ Created {212690FB-83E5-4526-8FD7-74478B7939CD} Microsoft DTV-DVD Video Decoder (C:\Windows\SysWOW64\msmpeg2vdec.dll) @082C04BC - traced interfaces:
9052,2BF4 14:06:36.04668 CGraphBuilderDetours::AddFilter @081C7DD0 filter: ''
看起來他們似乎在創建一個使用DirectShow的Media Source。他們正在構建一個帶有MFSourceFilter
的DirectShow圖形,我猜,它將解碼的音頻/視頻信息傳遞給Media Foundation。由於在網上搜索MFSourceFilter
根本沒有幫助,我想知道是否有人在我開始之前和之後使用了MFSourceFilter
。
(我已經閱讀問題decode MPEG1/2 video with Media Foundation但它不包含什麼我要找的。)
如果WMP無法通過MF,則通過DirectShow播放。 –
是的,但他們仍然使用MF來播放DirectShow源代碼(通過使用該MFSourceFilter)。所以基本上,這就是我所追求的。我想知道我是否可以重用該MFSourceFilter。 –