/// <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.Debug($"Creating buffer pool from existing instance."); this.Ptr = ptr; this.Queue = new MMALQueueImpl((*this.Ptr).Queue); }
/// <summary> /// Creates a new instance of <see cref="MMALPoolImpl"/> based on a port. /// </summary> /// <param name="port">The port.</param> public MMALPoolImpl(PortBase port) { MMALLog.Logger.Debug($"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); }
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; }
public static extern unsafe void mmal_port_pool_destroy(MMAL_PORT_T *port, MMAL_POOL_T *pool);
public static unsafe extern void mmal_pool_pre_release_callback_set(MMAL_POOL_T *pool, [MarshalAs(UnmanagedType.FunctionPtr)] MMAL_POOL_BH_CB_T cb, IntPtr userdata);
public static unsafe extern MMALUtil.MMAL_STATUS_T mmal_pool_resize(MMAL_POOL_T *pool, uint headers, uint payload_size);
public static unsafe extern void mmal_pool_destroy(MMAL_POOL_T *pool);