请问:如何让windows media player建立filter graph时调用我的source filter,多谢!(2)

levinson 2002-06-05 05:22:25
飞雪已基本回答了我的上一个比较笼统的提问:http://www.csdn.net/expert/topic/775/775245.xml
我有更具体的问题如下:

如果我不使用类似*.ram,*.asx等类似rtsp协议的东西,请问能否实现上面提出的问题?

具体“需求”如下:
·自己编写的流媒体服务器,使用自己开发的应用层协议,设其名为:ssp协议。
·ssp协议基于tcp协议,用于传输多媒体数据和控制,功能层次等同于rtp协议或者http等协议,相当于rtp协议和rtsp协议的综合。
·客户端使用windows media player,加载的当然是上面提到的自己开发的source filter。
·用户操作流程是这样:在windows media player地址栏中输入如下格式地址:
ssp://www.somecom.com.cn:8089/movies/trainingday.avi
然后用户点击播放。或者在页面中media player控件的参数设为:
<PARAM NAME="Filename" VALUE="ssp://www.somecom.com.cn:8089/movies/trainingday.avi">

请问如何才能让media player根据"ssp://"来加载我的sourcefilter呢?
多谢!
...全文
67 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
levinson 2002-06-06
  • 打赏
  • 举报
回复
to GengSing:
谢谢!

to wf_quxq:
实现IFileSourceFilter::Load方法就行了吧。
wf_quxq 2002-06-06
  • 打赏
  • 举报
回复
media player可以根据协议以及filter CLSID决定使用你的Filter,请问如何将参数 ssp://www.somecom.com.cn:8089/movies/trainingday.avi传给你的Filter? my email:wf_quxq@163.com Thanks very much
GengSing 2002-06-06
  • 打赏
  • 举报
回复
请看DirectShow文档: Registering a Custom File Type

Protocols

Protocol names such as ftp or http are registered under the HKEY_CLASSES_ROOT key, with the following structure:

HKEY_CLASSES_ROOT
<protocol>
Source Filter = <Source filter CLSID>
Extensions
<.ext1> = <Source filter CLSID>
<.ext2> = <Source filter CLSID>
If the file name contains a colon (':'), the Filter Graph Manager attempts to use the portion before the ':' as a protocol name. For example, if the name is "myprot://myfile.ext", it searches for a registry key named myprot. If this key exists and contains a subkey named Extensions, the Filter Graph Manager searches within that subkey for entries that match the file extension. The value of the key must be a GUID in string form; for example, "{00000000-0000-0000-0000-000000000000}". If it cannot match anything within the Extensions subkey, it looks for a subkey named Source Filter, which must also be a GUID in string form.

If it finds a match, the Filter Graph Manager uses the resulting GUID as the CLSID of the source filter, and attempts to load the filter. If it does not find a match, it uses the File Source (URL) filter, which treats the file name as a URL.

There are two exceptions to this algorithm:

To exclude driver letters, single-character strings are not considered protocols.
The string is "file:" or "file://" is not treated as a protocol.

8,324

社区成员

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

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