從Directshow轉向 Media Foundation

 

對比Media Foundation 和DirectShow

         我們已經跨入了對高清數字媒體時代。未來的數字高清將無處不在。但是他非常需要健壯的保護,而這是當前的數字媒體平臺所不具備的。Media Fundation就是爲了這個而存在。
        讓我們審視高清數字,這個平臺需要很有彈性,便於從小故障下恢復。需要考慮大量的不同品質的video 和audio.Media Foundation就是爲了這個而存在。比如,支持下一代的HD技術:
  1:DirectX 視頻加速(DXVA) 2.0提供了比DXVA1.0更高效率的視頻加速,更穩定,最新的視頻解碼能力,和擴展的硬件視頻加速。在DXVA2.0下,windows可以直接處理某些高清內容,並容易錯誤恢復。
2:Color-space能得以保存在整個視頻處理流程中,所以中途可以無轉換損失,用戶可以享受到高逼真的畫質。這個也能減少CPU等消耗。
3:增強的視頻渲染器(enchanced video render EVR)增強了視頻處理和時鐘等。

        讓我們研究一下文件保護,在用戶購買了一部電影之後,他可以把電影傳到他的某個設備上(一些設備支持直接在播放的時候錄製),這個過程中會有多種保護模式,購買後的使用保護,播放時防錄製保護,複製保護,如果某一個保護沒有正確完成,就會使整套保護沒有了意義。所以這需要有一個無縫的平臺去相互協作。Media Foundation就是爲了這個而存在。
        最後,讓我們來總覽一下DirectShow. DirectShow的API對這些數字高清媒體的應用程序確實是非常通用的,萬能的,但是,DirectShow作爲一個10多年的老技術而言已經力不從心了。比如:
   1:流程是靜態static的,所以實現動態的Graph和Major format change是非常困難的。
  2:DirectShow filter的線程模型是非常複雜的,要完全理解並永不出錯是太困難了。
  3:DirectShow filter只能用於DirectShow。
  4:DirectShow不支持文件保護。
  作爲DirectShow的接替者,Media Foundation出現了,他不會馬上替代DirectShow,作爲第一步,他將在vista上慢慢展露他的影響。
  但是目前爲止,Media Foundation只能在媒體保護(Proteced media process))方面大施手腳,還未向DirectShow進行足夠的擴展和替代。


Appendix: Feature Comparisons

The following table compares the features of Media Foundation with those of DirectShow.

Feature
group
Feature Media
Foundation
DirectShow
Basic functionality Audio and video rendering Yes Yes
  Event notification Yes Yes
  Device enumeration No Yes
  Component enumeration Yes Yes
  Synchronization to reference clock Yes Yes
  Seeking Yes Yes
  Improved stress resilience Yes No
Content protection Component validation Yes No
  Content protection policy negotiation Yes No
  Interoperability between content protection technologies Yes No
  Protection against kernel-mode and user-mode threats Yes No
  Component revocation and renewal Yes No
  Video output protection management Yes Yes
Media tasks Audio capture No Yes
  Video capture No Yes
  Video editing No Yes
  DVD playback and navigation No Yes
  MPEG-2 support No Yes
  ASF support No Yes
  TV technologies No Yes
  Stream buffer engine No Yes
  Encoder API No Yes
Video renderer Substream mixing using per-pixel or planar alpha blending Yes Yes
  Customizable video composition No Yes
  Support for custom presenters Yes Yes
  Windowless rendering Yes Yes
  Multimonitor support Yes Yes
  DXVA Yes Yes
  DirectDraw exclusive mode Yes Yes
  Backward compatibility with existing applications Yes Yes
  Accurate frame stepping Yes Yes
  Alpha blending of image data Yes Yes
  Glitch resilience Yes No
  Enhanced video fidelity Yes No
  Enhanced content protection robustness Yes No
  Standalone use Yes No
  Standalone mixing component Yes No
Transforms (MFT or DMO) Synchronous data processing Yes Yes
  Simple programming model Yes Yes
  Standalone use Yes Yes
  Multiple inputs and multiple outputs Yes Yes
  Dynamic number of streams Yes No
  Access to sample-level metadata Yes No
  In-place processing Yes Yes
  Dynamic format changes Yes No
  Quality adjustment Yes No
  Rate change Yes No

The following table compares the features of Media Foundation with those of the Windows Media Format SDK.

Feature
group
Feature Media
Foundation
Format SDK
ASF file features Audio and video streams Yes Yes
  Image streams No Yes
  Arbitrary streams (text, file, Web, custom data) No Yes
  Script commands No Yes
  Data unit extensions Yes Yes
  SMPTE time code support No Yes
  Mutual exclusion Yes Yes
  Stream prioritization Yes Yes
  Bandwidth sharing No Yes
  Indexes Yes Yes
  Markers Yes Yes
  Multiple bit rate stream Yes Yes
  Multiple language support Yes Yes
Codec features CBR encoding Yes Yes
  VBR encoding Yes Yes
  Two-pass encoding Yes Yes
  High-resolution audio support Yes Yes
  Low delay audio Yes Yes
  S/PDIF audio output Yes Yes
  Video image Yes Yes
  Device conformance template Yes Yes
  Video complexity settings Yes Yes
  Frame interpolation Yes Yes
  DirectX Video Acceleration Yes Yes
File writing Video resizing Yes Yes
  Color space conversion Yes Yes
  Audio resampling Yes Yes
  ASF file sink Yes Yes
  Network sinks No Yes
  Push sinks No Yes
  Watermarking support No Yes
  Input formats, input settings, and data unit extensions Yes Yes
  WMA smart recompression No Yes
  Multichannel audio Yes Yes
File reading User-allocated sample support No Yes
  Synchronous reading No Yes
  Output format enumeration Yes Yes
  Multichannel audio Yes Yes
  MP3 support Yes Yes
  Network sources Yes Yes
Metadata ID3 support No Yes
  Custom metadata Yes Yes
Digital rights management Live DRM No Yes
  DRM Individualization Yes Yes
  Back up and restore DRM licenses Yes Yes
  View DRM attributes in the Metadata Editor Yes Yes
  Output protection levels Yes Yes
  License revocation Yes Yes
  Windows Media DRM for Network Devices Yes Yes
  Secure Audio Path No Yes
  Playlist burning Yes Yes
  Third-party transcription support Yes No
  Local license issuance Yes No
  Enhanced Windows Media DRM renewability Yes No

本文來自  http://www.cnitblog.com/vcommon/archive/2007/04/29/26384.html
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章