예제 #1
0
        /// <summary>
        /// Creates a new instance of <see cref="MMALPoolImpl"/> based on an existing <see cref="MMAL_POOL_T"/> pointer.
        /// </summary>
        /// <param name="ptr">The <see cref="MMAL_POOL_T"/> pointer.</param>
        public MMALPoolImpl(MMAL_POOL_T *ptr)
        {
            MMALLog.Logger.LogDebug($"Creating buffer pool from existing instance.");

            this.Ptr   = ptr;
            this.Queue = new MMALQueueImpl((*this.Ptr).Queue);
        }
예제 #2
0
        /// <summary>
        /// Creates a new instance of <see cref="MMALPoolImpl"/> based on a port.
        /// </summary>
        /// <param name="port">The port.</param>
        public MMALPoolImpl(IPort port)
        {
            MMALLog.Logger.LogDebug($"Creating buffer pool with {port.BufferNum} buffers of size {port.BufferSize}");

            this.Ptr   = MMALUtil.mmal_port_pool_create(port.Ptr, port.BufferNum, port.BufferSize);
            this.Queue = new MMALQueueImpl((*this.Ptr).Queue);
        }
예제 #3
0
        public MmalPoolImpl(IPort port)
        {
            MmalLog.Logger.LogDebug($"Creating buffer pool with {port.BufferNum} buffers of size {port.BufferSize}");

            Ptr   = MmalUtil.PoolCreate(port.Ptr, port.BufferNum, port.BufferSize);
            Queue = new MmalQueueImpl((*Ptr).Queue);
        }
예제 #4
0
        public MmalPoolImpl(MmalPoolType *ptr)
        {
            MmalLog.Logger.LogDebug($"Creating buffer pool from existing instance.");

            Ptr   = ptr;
            Queue = new MmalQueueImpl((*Ptr).Queue);
        }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SafeBufferStack{T}"/> class.
 /// </summary>
 public SafeBufferQueue(IBufferQueue <T> buffer)
 {
     this.buffer = buffer;
 }