//-----------------------------------------------------------------------------
// Name: DirectShow Sample -- GrabberSample Filter
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
Description
===========
This sample provides modified source code for the SampleGrabber Filter.
To prevent conflicts with the existing SampleGrabber filter, the
following changes have been made:
- Filter is renamed to "GrabberSample" (to indicate that it is
an example implementation of a SampleGrabber-style filter)
- CLSID is changed to CLSID_GrabberSample
- The CLSID is a newly generated GUID
==========================================
Documentation
==========================================
This is a transform filter that you can insert inline of a media stream
which can "capture" the data travelling through the stream and notify
your application on a callback. Since it is a transinplace transform,
it won't cause extra application loading because it intercepts the
media stream. However, if your callback takes a long time to process,
this benefit will be greatly reduced.
This sample grabber example is quite simple, and it has the following
limitations:
- It doesn't synchronize itself with the main application thread,
so the app must deal with multithreading issues.
- It doesn't buffer the data before calling back, so there's no
one-shot mode.
Ideas for extending this sample
-------------------------------
If you want to extend the capabilities of this example filter, the following
list provides some ideas that may make it more useful in your applications.
- Allow it to buffer samples and call back the application on a background thread
- Negotiate pin connections to force either an upstream or downstream allocator
to be used
- Don't allow pre-roll samples to pass through, and check for zero-length samples
- Write a sample grabber and graph wrapper COM object to allow your application
to pull samples synchronously from a stream
Limitations of the DirectX 8.0 SampleGrabber filter
---------------------------------------------------
The SampleGrabber that shipped with DirectX 8.0 had some issues which are
listed below. The source code for the original SampleGrabber filter
was not made available. This GrabberSample example filter should be used in
your applications instead if you want to debug or modify its functionality.
- The DX8.0 filter will not work with any video that doesn't offer
VideoInfoHeader as the format type. MPEG2 and DV data are NOT allowed.
Video using VideoInfoHeader2 data would not connect with the SampleGrabber.
- The SampleGrabber filter's output pin does not support connecting
to the overlay mixer.
- It doesn't deal with field-based video
- One-shot mode didn't work correctly in some circumstances
- We intended to allow the sample grabber to function as a renderer in cases
where only its input pin was connected, but this feature was abandoned.
- The buffering feature of the sample grabber works, but has limited value.
Suggestions for using the SampleGrabber and new GrabberSample filters
---------------------------------------------------------------------
- Don't use RenderFile and assume that the sample grabber will be inserted into a
chain of filters exactly as you desire. Verify that the SampleGrabber filter
is connected properly and that it is using the expected video type.
- Always connect the output of the sample grabber to a downstream filter.
If you just want to get data from media streams, connect to a NULL Renderer.
- If you want the graph to run as fast as possible, turn off the graph clock
via IMediaFilter::SetSyncSource( NULL ).
没有合适的资源?快使用搜索试试~ 我知道了~
《MS Press - Programming Microsoft DirectShow for Digital Video &...
共522个文件
cpp:74个
h:68个
pdb:34个
5星 · 超过95%的资源 需积分: 9 33 下载量 170 浏览量
2009-03-18
11:34:30
上传
评论
收藏 13.87MB ZIP 举报
温馨提示
《MS Press - Programming Microsoft DirectShow for Digital Video & TV》源代码
资源推荐
资源详情
资源评论
收起资源包目录
《MS Press - Programming Microsoft DirectShow for Digital Video & TV》 (522个子文件)
wincap.aps 79KB
DVDPlayer2.aps 6KB
CDPlayer.aps 6KB
EVENTAPP.APS 5KB
TransformSample.ax 172KB
bitmap1.bmp 2KB
play.bmp 2KB
bitmap2.bmp 2KB
tv1.bmp 2KB
play1.bmp 2KB
bmp00002.bmp 1KB
vtr_rew1.bmp 1KB
tv_chan_.bmp 1KB
bmp00001.bmp 1KB
Recompress.bsc 4.41MB
Main.cpp 67KB
vmrpip.cpp 32KB
graph.cpp 30KB
PushFilter.cpp 28KB
YuvGray.cpp 23KB
ConfigDlg.cpp 22KB
grabber.cpp 20KB
TVBuff.cpp 18KB
Delay.cpp 17KB
t_Root.cpp 15KB
DSUtil.cpp 14KB
MainDialog.cpp 14KB
DESClip.cpp 14KB
utils.cpp 13KB
EVENTAPP.CPP 12KB
DSWebcamCap.cpp 11KB
DSAudiioCap.cpp 11KB
DSAudiioCap.cpp 11KB
blend.cpp 11KB
ExtDevice.cpp 11KB
main.cpp 11KB
CTunerProp.cpp 8KB
Histogram.cpp 8KB
DShowDemo.cpp 8KB
ip_root.cpp 8KB
DSBuild.cpp 7KB
ASFRead.cpp 7KB
ASFCaptureGraphBuilder.cpp 6KB
CDVProp.cpp 6KB
AudioCapDlg.cpp 5KB
DSRender.cpp 5KB
ASF Writer.cpp 5KB
SampleGrabber.cpp 5KB
Recompress.cpp 5KB
Dialog.cpp 5KB
CDPlayer.cpp 4KB
t_RootProp.cpp 4KB
ip_rootProp.cpp 4KB
TransformSample.cpp 4KB
capturegraphbuilder2.cpp 4KB
allocapfile.cpp 3KB
Device.cpp 3KB
DSApp.cpp 3KB
DES.CPP 3KB
DVDPlayer2.cpp 2KB
SimpleDelay.cpp 2KB
WinCap.cpp 2KB
DESList.cpp 2KB
ASXPlaylist.cpp 2KB
MediaContent.cpp 2KB
ConfigStream.cpp 2KB
DVDPlayer.cpp 1014B
filerender.cpp 923B
StdAfx.cpp 319B
StdAfx.cpp 309B
StdAfx.cpp 307B
StdAfx.cpp 299B
StdAfx.cpp 299B
StdAfx.cpp 298B
StdAfx.cpp 297B
StdAfx.cpp 297B
StdAfx.cpp 297B
StdAfx.cpp 297B
StdAfx.cpp 296B
stdafx.cpp 296B
StdAfx.cpp 295B
StdAfx.cpp 295B
StdAfx.cpp 294B
stdafx.cpp 293B
StdAfx.cpp 290B
StdAfx.cpp 112B
DVDPlayer.cpp 112B
DES.CPP 112B
StdAfx.cpp 112B
styles.css 17KB
Thumbs.db 14KB
grabber.def 489B
ip_root.def 224B
t_Root.def 221B
SimpleDelay.def 218B
TransformSample.def 210B
YuvGray.def 199B
PushSource.def 154B
TransformSample.dll 172KB
DirectShow Filter Wizard.doc 92KB
共 522 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
- sunkehui1123002018-02-12等会再过来评论
- mimi04092012-09-20內容包羅萬象, 非常棒, 而且有代碼
ChanYao
- 粉丝: 5
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功