《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:
· A 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.
· A 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.
· A 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.
· A 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.