Exemplo n.º 1
0
        public void Destroy()
        {
            UpstreamComponent.CleanPortPools();
            DownstreamComponent.CleanPortPools();

            MmalCheck(MmalConnection.Destroy(Ptr), "Unable to destroy connection");
        }
Exemplo n.º 2
0
        public void Disable()
        {
            if (!Enabled)
            {
                return;
            }

            MmalLog.Logger.LogDebug($"Disabling connection between {OutputPort.Name} and {InputPort.Name}");
            MmalCheck(MmalConnection.Disable(Ptr), "Unable to disable connection");
        }
Exemplo n.º 3
0
        internal static MmalConnectionImpl CreateConnection(IOutputPort output, IInputPort input, IDownstreamComponent inputComponent, bool useCallback)
        {
            var ptr = IntPtr.Zero;

            if (useCallback)
            {
                MmalCheck(MmalConnection.Create(&ptr, output.Ptr, input.Ptr, MmalConnection.MmalConnectionFlagAllocationOnInput), "Unable to create connection");
            }
            else
            {
                MmalCheck(MmalConnection.Create(&ptr, output.Ptr, input.Ptr, MmalConnection.MmalConnectionFlagTunnelling | MmalConnection.MmalConnectionFlagAllocationOnInput), "Unable to create connection");
            }

            return(new MmalConnectionImpl((MmalConnectionType *)ptr, output, input, inputComponent, output.ComponentReference, useCallback));
        }