[DirectShow] 003 - DirectShow System Overview

来源:互联网 发布:叶启田心情无人知 编辑:程序博客网 时间:2024/04/28 02:18

Working with multimedia presents several major challenges。

Multimedia streams contain large amounts of data, which must beprocessed very quickly。

Audio and video must be synchronized so that it starts and stops atthe same time, and plays at the same rate。

Data can come from many sources, including local files, computernetworks, television broadcasts, and video cameras。

Data comes in a variety of formats, such as Audio-Video Interleaved(AVI), Advanced Streaming Format (ASF), Motion Picture Experts Group (MPEG),and Digital Video (DV)。

The programmer does not know in advance what hardware devices willbe present on the end-user's system。

多媒体处理呈现几个主要难点:

多媒体流包含大量的数据,必须开苏处理这些数据。

视频和音频必须同步以至于同时开始同时结束,按照相同的速率播放。

数据有多种来源,包括本地文件,计算机网络,电视广播和摄像机。

数据有多种格式,例如AVI,ASF,MPEG和DV 。

在终端用户系统,程序员预先不知道硬件设备呈现哪些。

DirectShow is designed to address each of these challenges. Its maindesign goal is to simplify the task of creating digital media applications onthe Windows® platform, by isolating applications from the complexities of datatransports, hardware differences, and synchronization。

DirectShow被设计用来解决每一个难点。DirectShow主要目标就是通过分离应用程序复杂的数据传输、硬件差异和同步问题来简化在Windows平台创建数字媒体任务。

To achieve the throughput needed to stream video and audio,DirectShow uses DirectDraw® and DirectSound® whenever possible. Thesetechnologies render data efficiently to the user's sound and graphics cards.DirectShow synchronizes playback by encapsulating media data in time-stampedsamples. To handle the variety of sources, formats, and hardware devices thatare possible, DirectShow uses a modular architecture, in which the applicationmixes and matches different software components called filters。

为打到视频流和音频流所需要的性能,DirectShow使用DirectDraw和DirectSound。前提条件是系统支持。这些技术为用户的声卡和显卡高效的提供数据。DirectShow利用数据中的时间戳同步回放。为了尽可能的处理不同的数据源,数据格式和硬件设备,DirectShow使用模块机制,在应用程序中混合匹配不同的软件组件,这些组件称为filters。

DirectShow provides filters that support capture and tuning devicesbased on the Windows Driver Model (WDM), as well as filters that support legacyVideo for Windows (VfW) capture cards, and codecs written for the AudioCompression Manager (ACM) and Video Compression Manager (VCM) interfaces。

DirectShow提供filters支持基于Windows Driver Model的采集和调谐设备,也支持VFW采集卡,ACM编码器VCM接口。

The following diagram shows the relationship between an application,the DirectShow components, and some of the hardware and software componentsthat DirectShow supports.

下面的图展现了DirectShow支持的组件和硬件,应用程序之间的关系。

As illustrated here, DirectShow filters communicate with, andcontrol, a wide variety of devices, including the local file system, TV tunerand video capture cards, VfW codecs, the video display (through DirectDraw orGDI), and the sound card (through DirectSound). Thus, DirectShow insulates theapplication from many of the complexities of these devices. DirectShow alsoprovides native compression and decompression filters for certain file formats.

在插图上看到,DirectShow充分的连接和控制多种设备,包括本地文件系统,TV,视频采集卡,VFW编码器,视频显示器,声卡。因此,DirectShow从复杂的设备中分解应用程序。DirectShow为确定的文件格式提供自带的压缩与解压缩filters

 

 

原创粉丝点击