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