Example #1
0
        private void InitVideoCapability(ICapability capability)
        {
            if (videoCapability == null)
            {
                videoCapability = (VideoCapability)capability;

                this.Text = videoCapability.Name;

                // Unintuitively causes us to look at the vidSrcRatio and use it if it's been set
                TrimBlackFromVideo(base.Size);

                // TODO: Add a condition to not call InitVideoUI() if isFormLoaded is false to prevent
                // the form to show to early
                InitVideoUI();

                videoCapability.VideoWindowHandle       = pbVideo.Handle;
                videoCapability.VideoWindowMessageDrain = pbVideo.Handle;
                videoCapability.ResizeVideoStream(pbVideo.Height, pbVideo.Width);
                //videoCapability.ResizeVideoStream(230, 200);

                // Set the UI borders so the video capability can calculate the
                // AV form size given some constrains due to the video ratio
                //videoCapability.UIBorderWidth = UIBorderWidth;
                //videoCapability.UIBorderHeight = UIBorderHeight;
            }
        }
Example #2
0
 private void pbVideo_Resize(object sender, EventArgs e)
 {
     if (videoCapability != null)
     {
         videoCapability.ResizeVideoStream(pbVideo.Height, pbVideo.Width);
     }
 }
Example #3
0
        private void InitVideoCapability(ICapability capability)
        {
            if (videoCapability == null)
            {
                videoCapability = (VideoCapability)capability;

                this.Text = videoCapability.Name;

                // Unintuitively causes us to look at the vidSrcRatio and use it if it's been set
                TrimBlackFromVideo(base.Size);

                // TODO: Add a condition to not call InitVideoUI() if isFormLoaded is false to prevent
                // the form to show to early
                InitVideoUI();

                videoCapability.VideoWindowHandle = pbVideo.Handle;
                videoCapability.ResizeVideoStream(pbVideo.Height, pbVideo.Width);

                // Set the UI borders so the video capability can calculate the
                // AV form size given some constrains due to the video ratio
                videoCapability.UIBorderWidth = UIBorderWidth;
                videoCapability.UIBorderHeight = UIBorderHeight;
            }
        }