Ejemplo n.º 1
0
        /// <summary>
        /// Get a MMAL_BUFFER_HEADER_T from a queue.
        /// </summary>
        /// <param name="ptr">The queue to get a buffer from.</param>
        /// <returns>A new managed buffer header object.</returns>
        internal static MMALBufferImpl GetBuffer(MMAL_QUEUE_T *ptr)
        {
            var bufPtr = MMALQueue.mmal_queue_get(ptr);

            if (bufPtr == null || (IntPtr)bufPtr == IntPtr.Zero)
            {
                return(null);
            }

            return(new MMALBufferImpl(bufPtr));
        }
Ejemplo n.º 2
0
 public MMAL_CONNECTION_T(IntPtr userData, IntPtr callback, uint isEnabled, uint flags, MMAL_PORT_T *input, MMAL_PORT_T *output,
                          MMAL_POOL_T *pool, MMAL_QUEUE_T *queue, char *name, long timeSetup, long timeEnable, long timeDisable)
 {
     this.userData    = userData;
     this.callback    = callback;
     this.isEnabled   = isEnabled;
     this.flags       = flags;
     this.input       = input;
     this.output      = output;
     this.pool        = pool;
     this.queue       = queue;
     this.name        = name;
     this.timeSetup   = timeSetup;
     this.timeEnable  = timeEnable;
     this.timeDisable = timeDisable;
 }
Ejemplo n.º 3
0
 public static unsafe extern void mmal_queue_destroy(MMAL_QUEUE_T *ptr);
Ejemplo n.º 4
0
 public static unsafe extern uint mmal_queue_length(MMAL_QUEUE_T *ptr);
Ejemplo n.º 5
0
 public static unsafe extern MMAL_BUFFER_HEADER_T *mmal_queue_wait(MMAL_QUEUE_T *ptr);
Ejemplo n.º 6
0
 public static unsafe extern void mmal_queue_put_back(MMAL_QUEUE_T *ptr, MMAL_BUFFER_HEADER_T *header);
Ejemplo n.º 7
0
 public static unsafe extern void mmal_queue_put(MMAL_QUEUE_T *ptr, MMAL_QUEUE_T *ptr2);
Ejemplo n.º 8
0
 public MMAL_POOL_T(MMAL_QUEUE_T *queue, uint headersNum, IntPtr header)
 {
     this.queue      = queue;
     this.headersNum = headersNum;
     this.header     = header;
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Creates a new instance of <see cref="MMALQueueImpl"/>.
 /// </summary>
 /// <param name="ptr">The native pointer.</param>
 public MMALQueueImpl(MMAL_QUEUE_T *ptr)
 {
     this.Ptr = ptr;
 }
Ejemplo n.º 10
0
 public static extern unsafe MMAL_BUFFER_HEADER_T *mmal_queue_timedwait(MMAL_QUEUE_T *ptr, int waitms);
Ejemplo n.º 11
0
 public static extern unsafe MMAL_BUFFER_HEADER_T *mmal_queue_get(MMAL_QUEUE_T *ptr);
Ejemplo n.º 12
0
 public static extern unsafe void mmal_queue_put(MMAL_QUEUE_T *ptr, MMAL_BUFFER_HEADER_T *header);