private void ShowVideo() { var videoResoulution = deckLinkInput.FrameSize; var videoFormat = deckLinkInput.VideoFormat; var frameRate = deckLinkInput.FrameRate; var fps = frameRate.Item2 / frameRate.Item1; string videoLog = ""; { videoLog = videoFormat.Name + "/" + videoResoulution.Width + "x" + videoResoulution.Height + "/" + fps.ToString("0.00"); } string audioLog = ""; if (deckLinkInput.AudioEnabled) { audioLog = deckLinkInput.AudioSampleRate + "/" + deckLinkInput.AudioBitsPerSample + "/" + deckLinkInput.AudioChannelsCount; } videoForm.Text = deckLinkInput.DisplayName + " " + videoLog + " " + audioLog; // videoForm.Visible = true; UpdateVideoWindow(); renderSession.Resize(videoForm.VideoRectangle); }
private void OnCaptureInitialized() { syncContext.Send(_ => { var videoResolution = deckLinkInput.FrameSize; var videoFormat = deckLinkInput.VideoFormat; var frameRate = deckLinkInput.FrameRate; var fps = frameRate.Item2 / frameRate.Item1; string videoLog = ""; { videoLog = videoFormat.Name + "/" + videoResolution.Width + "x" + videoResolution.Height + "/" + fps.ToString("0.00"); } string audioLog = ""; if (deckLinkInput.AudioEnabled) { audioLog = deckLinkInput.AudioSampleRate + "/" + deckLinkInput.AudioBitsPerSample + "/" + deckLinkInput.AudioChannelsCount; } this.Text = deckLinkInput.DisplayName + " " + videoLog + " " + audioLog; renderSession.Resize(this.ClientRectangle); }, null); }
protected override void OnSizeChanged(EventArgs e) { renderSession?.Resize(this.ClientRectangle); base.OnSizeChanged(e); }
private void VideoForm_SizeChanged(object sender, EventArgs e) { renderSession?.Resize(videoForm.VideoRectangle); }