請問如何加快 WindowsMediaEncoder 與實現 Local preview? |
尚未結案
|
bdedownload
一般會員 發表:7 回覆:10 積分:3 註冊:2003-05-14 發送簡訊給我 |
大家好: 使用 Delphi 呼叫 Microsoft Media Encoder sdk (7.x) 遭遇兩個問題請
大家幫忙: 1.當執行影音錄製線上利用 tcpip 播放時不論 local 或 remote 端都有
近20secs的動作聲音延遲現象, 無法像 netmeeting 般的及時播送, 請
問該如何解?
2.sdk 文件中保留了 MFC 以外工具產生 local preview 功能; 請問有辦法
突破此限制而利用 delphi 完成 local preview 嗎? 不然都無法看到
目前錄像的資料? 謝謝大家的協助.
= 簡單節錄目前的程式碼是: uses
WMEncoderLib_TLB var
WME33: TWMEncoder; formcreate
WME33:= TWMEncoder.Create(nil); Recoder
var
ProFile : IWMencProfile;
ProFileColl : IWMencProfileCollection;
AudSrc : IWMencSource;
VidSrc : IWMencSource;
SrcGrp : IWMencSourceGroup;
SrcGrpColl : IWMencSourceGroupCollection;
Descr : IWMEncDisplayInfo;
NetClientCount : IWMEncNetConnectionStats;
begin
WME33.Reset;
SrcGrpColl := WME33.SourceGroupCollection;
SrcGrp := SrcGrpColl.Add('SG_2');
ProFileColl := WME33.ProfileCollection;
AudSrc := SrcGrp.AddSource(WMENC_AUDIO);
AudSrc.SetInput('DEVICE://Default_Audio_Device','','');
VidSrc := SrcGrp.AddSource(WMENC_VIDEO);
VidSrc.SetInput('DEVICE://Default_Video_Device','','');
for i := 0 to ProFileColl.Count-1 do
begin
ProFile := ProFileColl.Item(i);
if (Uppercase(ProFile.Name)=uppercase(pfstr)) then
begin
SrcGrp.Set_Profile( ProFile);
break;
end;
end;
WME33.File_.LocalFileName := WMEtmpfile;
WME33.Broadcast.PortNumber[WMENC_PROTOCOL_HTTP]:=strtoint(stmport);
SrcGrp.PrepareToEncode(true);
WME33.Start;
while (WME33.RunState <> WMENC_ENCODER_STOPPED) do
begin
application.ProcessMessages;
end;
end; formclose
if (WME33.RunState <> WMENC_ENCODER_STOPPED) then WME33.Stop;
WME33.Free; ==
|
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |