4
신청 WPF 나는 Microsoft.expression.encoder 및 프레임 워크 4.0을 사용하여 방송 비디오 WPF 응용 프로그램을 가지고 있지만,이 broadcasting.Is 어떤 제안이 방송하는 동안 지연을 감소하는 동안 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)
{
}
대역폭 테스트 ([SpeedTest.net] (http://speedtest.net))를 실행하는 경우 업로드 속도와 다운로드 속도는 어떻게됩니까? – Erik