(顶者有分)如何编程得到windows media player 控件在播放时的“准备就绪”以及缓冲媒体流的百分比 (200分)

  • 主题发起人 qiyuanwj
  • 开始时间
2 Genl:
偶现在正在处理家庭问题,所以这几天没有上DFW,也没有工作。
这几天没心情讨论技术问题,也没有试一试这个问题。(说了这些跑题的话,楼主莫怪。)
其实DirectShow的SDK写得挺清楚的,再有可以加入newsgroup,国外对DirectShow研究深入的人这是多如牛毛,上次和一个老外聊起来MPEG技术,真是汗颜!差距太大了
 
谁知道怎么让DirectShow指定哪个Filter进行Render啊?? 还有怎么设Merit啊
Codec装多了 播放器乱用Filter啊。。。。
Dspack好像没有涉及到这个方面 MediaPlayerClassic就能指定他自带Filter进行Render

要是解决了 我也给分

这个涉及到版权,所以DSPACK不可能写这些东西:)
 
DirectShow SDK 那位高人能翻译一下啊 英文看着迷糊 看了下一句 忘了上一句
 
按照我的观点,可能要用到底层的音频函数察看声卡播放的音频stream文件当前状态;有一个方法,你用exescope软件(www.skycn.com上有下载)察看windows media player 的exe文件内部使用的一些函数,看看哪个是播放音频和进度的,对你应该很有帮助的,呵呵!
 
顶也有分,我顶!
 
我是向高手们学习的,顺便顶一下.
 
我是向高手们学习的,顺便顶一下.
 
先帮你顶一下。
我记得有个控件,想不起来了。可以用Google搜。
 
我不明白
帮你定
 
我不清楚,帮你了
 
不清楚,帮你顶
 
看来用mp的控件局限性很大,正在研究DSPACK 中。。。。
 
这就对了。。。。
搞明白了别忘了说一声。。。
 
这个问题我也在找解答,高手如能解决,本人在http://www.delphibbs.com/delphibbs/dispq.asp?lid=2451150
还可再加300分.
 
帮你顶 頂 頂!
 
这个是实现缓冲数的Dspack一种替代办法 很笨的方法。。征求更好的方法
WMP应该可以用那两个接口

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DSPack, ExtCtrls,DirectShow9,DsUtil;

type
TForm1 = class(TForm)
VideoWindow1: TVideoWindow;
FilterGraph1: TFilterGraph;
OpenDialog1: TOpenDialog;
Button1: TButton;
Timer1: TTimer;
procedure Button1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;


var
Form1: TForm1;
LoadLong :int64;
AllLong :Double;
Current :Double;
implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin

If Form1.OpenDialog1.Execute then

begin

Form1.FilterGraph1.RenderFile(Form1.OpenDialog1.FileName);
Form1.FilterGraph1.Play;
with FilterGraph1 as IMediaPositiondo
get_Duration(AllLong);
Form1.Timer1.Enabled:=true;
end;

end;


procedure TForm1.Timer1Timer(Sender: TObject);
begin

with FilterGraph1 as IMediaSeekingdo
GetStopPosition(LoadLong);
with FilterGraph1 as IMediaPositiondo
get_CurrentPosition(Current);
If (Trunc(AllLong)<>Trunc(LoadLong/100000)) then
Form1.Caption:='缓冲;('+intToStr(Trunc(LoadLong/AllLong/100000))+'%)';
If Current<>0 then
begin

Form1.Timer1.Enabled:=False;
Form1.Caption:='开始播放';
end;

end;



end.
 
靠!
好消息啊好消息!
procedure TForm1.Timer1Timer(Sender: TObject);
begin

edit2.Text:=self.mp.status;
end;

这样,什么东西都出来了啊,包括缓冲什么的,^_^
 
为什么每次提问几乎都是我自己解决啊,:(
 
高手啊
谁能把DsPack下的解决一下。。。
 

Similar threads

D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
D
回复
0
查看
865
DelphiTeacher的专栏
D
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
顶部