• 全部
  • 问答

写一个 Push Mode 的 Source Filter

davidwee 2002-05-16 11:13:04
Hi all,

The problem of mine is to write a source filter what works in push mode.
The source filter read the UDP packets(contain some MPEG-II TS data) from
localhost's port and "push" those to downstream filter(typically a De-Mux
filter).

I think there will contain the following classes:

1. CNetReader, read UDP packets from localhost port;
2. CMySource, derive from CSource;
3. CMyStream, derive from CSourceStream.

And how do I implement those classes? If I should manage a buffer array?
If I should manage the time reference? And how do I set the MediaType?
In addition, I use this source filter just for MPEG-II TS play.

Thanks a lot in advance.
...全文
51 点赞 收藏 9
写回复
9 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
richardlf 2002-05-22
davidixm,能不能也给我一份源码么,如果可以的话,真是万分感谢!!!
richardlf@21cn.com
回复
davidlxm 2002-05-21
davidwee
SourceFilter我回家也做过了,完全可以加入到GraphEdit中,你换台机器试试看,COM/OLE View 中ZQSourceFilter.ax 变成了 regsvr32.exe,说明在COM中就存在了问题(可能是编译选项),如果那也不行,告诉我,我把我做源码的给你。
回复
davidwee 2002-05-21
我照抄,然后作了一些修改(CBall改为什么也不做,MediaType改为如上capboy所述),但往GraphEdit中加时出错。

用MessageBox追踪,走了如下几步:
CZQSource::CreateInstance
CZQSource::CZQSource
CNetReader::CNetReader
CZQStream::CZQStream
然后:
X The instruction at "XXXXX" referenced memory at "XXXXX". The memory could not be "read".
...
回复
richardlf 2002-05-20
谁能提供一个例子么?或者,有谁已经通过改进ball例子程序实现了自己的推模式的源过滤器么?成功,还是失败?
回复
capboy 2002-05-19
And how do I implement those classes?
参考ball
If I should manage a buffer array?
需要自己做
If I should manage the time reference?
不需要吧.你只是source,不是decoder,你只是不需要破坏数据就可以了:)
And how do I set the MediaType?
MEDIATYPE_Stream, MEDIASUBTYPE_MPEG2_TRANSPORT, Format_None
回复
capboy 2002-05-19
恩?
ball的例子不够详细么?他的模式和你的一样阿..
Class CBall自己写.
class CBallStream : public CSourceStream
class CBouncingBall : public CSource
有什么不好用的地方么?
回复
davidwee 2002-05-17
我自己推,唉
回复
davidwee 2002-05-17
看来真的没人做这个东西了
回复
davidwee 2002-05-16
没有人做这个东西吗?
回复
相关推荐
发帖
游戏开发
创建于2007-08-27

7923

社区成员

游戏开发相关内容讨论专区
申请成为版主
帖子事件
创建了帖子
2002-05-16 11:13
社区公告
暂无公告