Completed
Last Updated: 23 Sep 2022 13:07 by ADMIN
Release R3 2022
Created by: David
Comments: 2
Category: WebCam
Type: Bug Report
0

 If the feed is paused and I re-size or move the app on my desktop, the camera image also goes blank. 

1. Run the project and press Space to pause the camera. 

2. Resize the form. You will notice that the paused image gets blank.

Workaround:

        protected override void OnShown(EventArgs e)
        {
            base.OnShown(e); 
            this.radWebCam1.Resize += RadWebCam1_Resize; 
        }


        Timer t = new Timer();
        bool isPaused = false;
        private void RadWebCam1_Resize(object sender, EventArgs e)
        {
            t.Stop();
            if (isPaused)
            {
                t = new Timer();
                t.Interval = 100;
                t.Tick += T_Tick; 
                this.radWebCam1.Start();
                t.Start();
            } 
        }

        private void T_Tick(object sender, EventArgs e)
        {
            this.radWebCam1.Pause();
            isPaused = true;
            t.Stop();
        }
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            if (keyData == Keys.Space)
            {
                this.radWebCam1.Pause();
                isPaused = true;
            }

            return base.ProcessCmdKey(ref msg, keyData);
        }

Completed
Last Updated: 17 Aug 2022 08:26 by ADMIN
Release R2 2022 SP1 (2022.2.622)

Run the sample project. You will observe the following error:

Here is the code snippet:

        public RadForm1()
        {
            InitializeComponent();

            this.radWebCam1.AutoStart = false; 
        }

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            ReadOnlyCollection<MediaFoundationDeviceInfo> videoDevices = RadWebCam.GetVideoCaptureDevices();
            ReadOnlyCollection<MediaFoundationVideoFormatInfo> videoFormats = RadWebCam.GetVideoFormats(videoDevices[0], true);
            ReadOnlyCollection<MediaFoundationDeviceInfo> audioDevices = RadWebCam.GetAudioCaptureDevices();

            radWebCam1.Initialize(videoDevices[0], videoFormats[0], audioDevices[0]);
        }

        protected override void OnShown(EventArgs e)
        {
            base.OnShown(e);
           
            radWebCam1.Start();       
        } 

Note: It worked in 2022.1.222.40.