找了一晚上,找到问题和解决办法了下载安装 dspack运行楼主说的,刚好我也出现了这个问题通过提示正常显示的提示:EC_PALETTE_CHANGED - The video palette has changed.EC_VIDEO_SIZE_CHANGED - The native video size has changed.EC_CLOCK_CHANGED - The reference clock has changed.EC_PAUSED - A pause request has completed.不显示画面的提示:EC_CLOCK_CHANGED - The reference clock has changed.EC_PAUSED - A pause request has completed.看到少了EC_PALETTE_CHANGED和EC_VIDEO_SIZE_CHANGED,查看源代码里面的看到一个是$09,一个是$0A,于是在uses DSPack 下的 procedure TFilterGraph.HandleEvents;
var hr: HRESULT;
Event, Param1, Param2: Integer;
begin
if assigned(FMediaEventEx) then
begin
hr := FMediaEventEx.GetEvent(Event, Param1, Param2, 0);
while (hr = S_OK)do
begin
//do
Event($09, Param1, Param2);
//do
Event($0A, Param1, Param2);//添加了这两句 do
Event(Event, Param1, Param2);
FMediaEventEx.FreeEventParams(Event, Param1, Param2);
hr := FMediaEventEx.GetEvent(Event, Param1, Param2, 0);
end;
end;
end;
然后运行.....悲剧的发现弹出 "由于没有连接插针而导致此项操作无法执行 "baidu之,发现是解码器的问题,于是修改的代码还原,baidu了N个解码器,最后发现要下载最全(吹的,谁知道是不是最全的)的解码器 K-Lite Mega Codec Pack 6.0.0 Betahttp://www.newhua.com/softdown/26934_2.htm安装完成后,运行demo,avi界面出现。说了这么多,其实解决方法就是 下载个K-Lite Mega Codec Pack 6.0.0 Beta安装上就好了。