private void ConfigureConnectionCallback(IOutputPort output, IInputPort input)
        {
            output.SetParameter(MMALParametersCommon.MMAL_PARAMETER_ZERO_COPY, true);
            input.SetParameter(MMALParametersCommon.MMAL_PARAMETER_ZERO_COPY, true);

            this.NativeCallback = new MMALConnection.MMAL_CONNECTION_CALLBACK_T(this.NativeConnectionCallback);
            IntPtr ptrCallback = Marshal.GetFunctionPointerForDelegate(this.NativeCallback);

            this.Ptr->Callback = ptrCallback;

            this.ConnectionPool = new MMALPoolImpl(this.Ptr->Pool);
        }
Beispiel #2
0
        private void ConfigureConnectionCallback(MMALPortBase output, MMALPortBase input)
        {
            output.SetParameter(MMALParametersCommon.MMAL_PARAMETER_ZERO_COPY, true);
            input.SetParameter(MMALParametersCommon.MMAL_PARAMETER_ZERO_COPY, true);

            this.NativeCallback = new MMALConnection.MMAL_CONNECTION_CALLBACK_T(NativeConnectionCallback);
            IntPtr ptrCallback = Marshal.GetFunctionPointerForDelegate(this.NativeCallback);

            this.Ptr->Callback = ptrCallback;

            if (output.BufferPool == null)
            {
                output.BufferPool = new MMALPoolImpl(output);
            }
        }