22 lines
488 B
C#
22 lines
488 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using OpenCvSharp;
|
|||
|
using squirrowse.web.Common;
|
|||
|
|
|||
|
namespace squirrowse.web.Data
|
|||
|
{
|
|||
|
public class VideoQ
|
|||
|
{
|
|||
|
public ConcurrentFixedSizeQueue<byte[]> _framebuffer = new ConcurrentFixedSizeQueue<byte[]>(255);
|
|||
|
|
|||
|
public Mat getFrame()
|
|||
|
{
|
|||
|
_framebuffer.TryPeek(out byte[] t);
|
|||
|
return Cv2.ImDecode(t, ImreadModes.Color);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
}
|