예제 #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);
        }
예제 #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);
        }
예제 #3
0
 BufferCapabilities(VideoDevice device)
 {
     videoOutput       = query(device, eBufferType.VideoOutput);
     videoOutputMPlane = query(device, eBufferType.VideoOutputMPlane);
 }