Example #1
0
            private void FrameReader()
            {
                while (true)
                {
                    QLError error = QuickLink2API.QLDevice_GetFrame(this._helper.DeviceId, 2000, ref this._frameData);
                    if (error != QLError.QL_ERROR_OK)
                    {
                        Console.WriteLine("QLDevice_GetFrame() returned {0}.", error.ToString());
                        continue;
                    }

                    this._latestImage = QLHelper.BitmapFromQLImageData(ref this._frameData.ImageData);

                    this._videoPictureBox.Invalidate();

                    lock (this._frameData_Lock)
                    {
                        Monitor.Wait(this._frameData_Lock);
                    }
                }
            }