写一个 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.
...全文
250 9 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
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
  • 打赏
  • 举报
回复
没有人做这个东西吗?

8,325

社区成员

发帖
与我相关
我的任务
社区描述
游戏开发相关内容讨论专区
社区管理员
  • 游戏开发
  • 呆呆敲代码的小Y
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧