Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 protected override void OnSizeChanged(EventArgs e)
 {
     renderSession?.Resize(this.ClientRectangle);
     base.OnSizeChanged(e);
 }
Esempio n. 4
0
 private void VideoForm_SizeChanged(object sender, EventArgs e)
 {
     renderSession?.Resize(videoForm.VideoRectangle);
 }