directShow 介绍

《directshow开发指南及代码》 可以在csdn中下载到,有文档和源码。

 

GStreamer是一个跨平台的多媒体开发框架(http://gstreamer.freedesktop.org/),不过由于在Windows平台上已经有了成熟的DirectShow,因此其在Linux平台上更加受到追捧,在Linux上的地位也与DirectShow在Windows上的地位相当。GStreamer中的很多概念与DirectShow中的相似,很多设计也借鉴了DirectShow,似乎找不到在Windows平台上应用它的理由。但是仔细考虑一下,还是会发现研究它的诸多好处:

    1、GStreamer是跨平台的,如果想开发更加通用的应用程序,无疑是目前最有效率的框架;

    2、GStreamer框架是基于插件的,开发、扩展与维护都非常方便,相对于DirectShow的COM框架,插件更小巧灵活,更具通用性,限制更少;

    3、GStreamer是纯C代码开发,采用GObject编程模式,依附于GLib2.0对象模型,编译文件小巧,运行速度快,并且为框架加入了RTII特性;

    4、很多特色设计:插件和管道信息都可以用XML标准格式进行存储、命令行形式的调试与测试、API的多种语言绑定、众多特色的插件以及gnonlin,gst-editor,gst-recorder等特色模块;

    5、众多建立在GStreamer框架上的优秀开源项目,给我们提供了绝好的应用例子,也许哪天手痒了,可以自己开发一个:)

    当然,GStreamer相对DirectShow来说也有它不足的地方,需要我们大家继续努力加以完善。

 

    遗憾的是在Windows平台上进行GStreamer应用与开发目前还不是一件很简单的事情,尤其是对于GNU开发了解不是很多的朋友来说。


来自:http://msdn.microsoft.com/en-us/library/windows/desktop/dd375454(v=vs.85).aspx  

directshow官方介绍


一、directshow架构:



二、directshow  dataflow:


Filters can be grouped into several broadcategories:

·        source filterintroduces data into the graph. The data might come from a file, a network, acamera, or anywhere else. Each source filter handles a different type of datasource.

·        transform filtertakes an input stream, processes the data, and creates an output stream.Encoders and decoders are examples of transform filters.

·        Renderer filters sit at the end of the chain. They receive data andpresent it to the user. For example, a video renderer draws video frames on thedisplay; an audio renderer sends audio data to the sound card; and afile-writer filter writes data to a file.

·        splitter filtersplits an input stream into two or more outputs, typically parsing the inputstream along the way. For example, the AVI Splitter parses a byte stream intoseparate video and audio streams.

·        mux filtertakes multiple inputs and combines them into a single stream. For example, theAVI Mux performs the inverse operation of the AVI Splitter. It takes audio andvideo streams and produces an AVI-formatted byte stream.


三、Overviewof Data Flow in DirectShow



四、PULL mode

Inthe IMemInputPin interface, the upstream filter determines what data to send, andit pushes the data to the downstream filter. For some filters, a pull modelis more appropriate. Here, the downstream filter requests data from theupstream filter. Samples still travel downstream, from output pin to input pin,but the downstream filter initiates the data flow. This type of connection usesthe IAsyncReader interface.



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值