Beispiel #1
0
        public static BufferCapabilities getBufferCaps(string path, VideoDevice device)
        {
            if (cache.TryGetValue(path, out var res))
            {
                return(res);
            }

            res = new BufferCapabilities(device);
            cache.Add(path, res);
            return(res);
        }
Beispiel #2
0
        static eBufferCapabilityFlags query(VideoDevice device, eBufferType bt)
        {
            eBufferCapabilityFlags res = eBufferCapabilityFlags.None;

            if (device.queryBufferCaps(bt, eMemory.MemoryMap))
            {
                res |= eBufferCapabilityFlags.MemoryMap;
            }
            if (device.queryBufferCaps(bt, eMemory.UserPointer))
            {
                res |= eBufferCapabilityFlags.UserPointer;
            }
            if (device.queryBufferCaps(bt, eMemory.DmaSharedBuffer))
            {
                res |= eBufferCapabilityFlags.DmaSharedBuffer;
            }

            return(res);
        }
Beispiel #3
0
 BufferCapabilities(VideoDevice device)
 {
     videoOutput       = query(device, eBufferType.VideoOutput);
     videoOutputMPlane = query(device, eBufferType.VideoOutputMPlane);
 }