public virtual void VideoRefresh()
{
if (this.videoRenderer != null)
{
//Trace.WriteLineIf(trace.TraceInfo, "VideoRefresh()");
VideoResizer(this.videoZoomMode, this.videoKeepAspectRatio, this.videoOffset, this.videoZoom, this.videoAspectRatioFactor);
if (!useWPF)
{
try
{
int hr;
if (useEVR)
{
hr = this.evrVideoDisplayControl.RepaintVideo();
this.hostingControl.ModifyBlackBands(GetBlackBands(), Settings.VideoBackgroundColor);
}
else
{
Graphics g = this.hostingControl.CreateGraphics();
IntPtr hdc = g.GetHdc();
hr = (this.videoRenderer as IVMRWindowlessControl9).RepaintVideo(this.hostingControl.Handle, hdc);
g.ReleaseHdc(hdc);
PaintBlackBands(g);
g.Dispose();
}
}
catch { }
}
}
}