本文介绍了为DirectShow创建新的媒体类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用DirectShow支持我的自定义媒体类型.

我开发了myparser.au过滤器,该过滤器将从  {& MEDIATYPE_Stream,& MEDIASUBTYPE_NULL}并进行一些解析,以确保这是我的媒体类型.

在graphedit中,我可以使用文件源异步"打开媒体文件(test.abc).过滤器,然后将其指向我的"myparser"筛选.

问题在于如何使图形自动使用文件源异步"功能.打开我的文件并将其指向myparser?

我已经尝试在regedit中添加带有myparser的guid的MEDIATYPE/extensions/.abc添加源过滤器?(尽管我知道它不是源过滤器,并且不起作用.)

1)因此,我可以跳过编写自己的源过滤器的过程,而使用文件源异步"吗?代替吗?

2)如果Q1是,那么我应该在.abc扩展名的注册表中使用哪个GUID

3)如何减少graphedit知道"myparser"需要解析.abc. filter

I am trying to use directshow to support my custom media type.

I developer a myparser.au filter which will take upstream from  {&MEDIATYPE_Stream, &MEDIASUBTYPE_NULL} and do some parse to ensure that is my media type.

In graphedit, I can open my media file(test.abc) using "file source async" filter, and point it to my "myparser" filter.

The problem down to how can i make the graphic automatically use "file source async" to open my file and point it to myparser??

I have try in regedit adding MEDIATYPE/extensions/.abc adding source filter with guid of my myparser?(Although I know it is not a source filter, and is doesn't work.)

1) So can I skip the process of writing my own source filter and use the "file source async" instead?

2) If Q1 is yes, which GUID I should use in the registry of the .abc extension

3) How to less graphedit know that the .abc is needed to be parse by the "myparser" filter

推荐答案

您也可以使用遮罩/测试图案来代替文件扩展名.参见http://msdn.microsoft.com/zh-cn/library/dd377513(v = vs.85).aspx

You can also use a mask/test pattern instead of the file extension. See http://msdn.microsoft.com/en-us/library/dd377513(v=vs.85).aspx

G


这篇关于为DirectShow创建新的媒体类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 03:04
查看更多