私はMicrosoft.expression.encoderとframework 4.0を使ってビデオをブロードキャストするWPFアプリケーションを持っていますが、ブロードキャスト中に15秒の遅延があります。ブロードキャスト中に遅延を減らすための提案はありますか。wpf 15秒の遅延でビデオをブロードキャストするアプリケーション
は、以下の私は、サーバーとクライアントシステム上の両方のウェブカメラを表示するのMediaElementを使用していますコード
using Microsoft.Expression.Encoder.Live;
using Microsoft.Expression.Encoder;
private void button1_Click(object sender, RoutedEventArgs e)
{
try
{
EncoderDevice video = null;
EncoderDevice audio = null;
GetSelectedVideoAndAudioDevices(out video, out audio);
StopJob();
if (video == null)
{
return;
}
StopJob();
_job = new LiveJob();
if (video != null && audio != null)
{
//StopJob();
_deviceSource = null;
_deviceSource = _job.AddDeviceSource(video, audio);
_job.ActivateSource(_deviceSource);
// Finds and applys a smooth streaming preset
//_job.ApplyPreset(LivePresets.VC1HighSpeedBroadband4x3);
// Creates the publishing format for the job
PullBroadcastPublishFormat format = new PullBroadcastPublishFormat();
format.BroadcastPort = 9090;
format.MaximumNumberOfConnections = 50;
// Adds the publishing format to the job
_job.PublishFormats.Add(format);
// Starts encoding
_job.StartEncoding();
}
//webCamCtrl.StartCapture();
}
catch (Exception ex)
{
WriteLogFile(this.GetType().Name, "button1_Click", ex.Message.ToString());
}
}
です。
クライアント側でtry
{
theMainWindow.getServerIPAddress();
IP = theMainWindow.machineIP;
MediaElement1.Source = new Uri("http://" + IP + ":9090/");
}
catch (Exception ex)
{
}
はこれまで、この解決策を見つけましたか? –
KevinCloet:いいえ、まだ.. –