谁能讲讲push和pull模式是什么意思?(参与有分)

mickeyfirst 2002-06-01 03:45:43
谁能讲讲push和pull模式是什么意思?
谢谢
...全文
5356 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
mickeyfirst 2002-06-20
  • 打赏
  • 举报
回复
谢谢各位
mickeyfirst 2002-06-20
  • 打赏
  • 举报
回复
谢谢各位
FranklinBHU 2002-06-05
  • 打赏
  • 举报
回复
帮你up一下。
xingtian713 2002-06-05
  • 打赏
  • 举报
回复
你可以用graph edit来测试它,在directx show文档中有详细说明,你可以到文档的samples目录下去查查
winne_ll 2002-06-05
  • 打赏
  • 举报
回复
UP
jimconrad 2002-06-05
  • 打赏
  • 举报
回复
参考《设计模式》5.7节(page198)。
jimconrad 2002-06-05
  • 打赏
  • 举报
回复
push和pull模式是observer对象行为模式式中涉及到的概念。该模式中有目标(subject)和观察者(observer)两个主要参与者。目标向观察者发送关于数据改变的详细信息,而不管他们需要否,我们称之为push模式;另一种是pull模式,目标除最小通知外什么也不送出,而在此后由观察者显式的向目标询问细节。

At one extreme, which we call the push model, the subject sends observers detailed information about the change, whether they want it or not. At the other extreme is the pull model; the subject sends nothing but the most minimal notification, and observers ask for details explicitly thereafter.

observer很典型的一个例子就是 CWnd对象 和 该对象对应的窗口,前者是subject,后者是observer。在dxshow中,source filter是subject,downstream filters是observer。
liz22 2002-06-04
  • 打赏
  • 举报
回复
ball实例怎么用啊?
xingtian713 2002-06-01
  • 打赏
  • 举报
回复
push模式一般用于实时流的播放,视频采集卡捕获的视频流,推向缓冲区,可以参考directx show中的ball实例,而pull模式一般用于文件回放,filter从缓冲区中取数据,可以参考memfile例子
capboy 2002-06-01
  • 打赏
  • 举报
回复
字面意思就比较清楚了,push推...有主动的意思.
数据的递交都有自己完成,应用在时时的模式的情况下,比如直播什么的.
pull拉...被动的.
数据需要自己保存,当其他filter有需要的时候,就会要求从你这里获得数据,你不知道什么时候会有这个要求,所以你需要保存所有的数据以供需求.当然用完了例外.
Token 2002-06-01
  • 打赏
  • 举报
回复
是指DirectShow中的两种模式吗

8,308

社区成员

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

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