public void Destroy() { UpstreamComponent.CleanPortPools(); DownstreamComponent.CleanPortPools(); MmalCheck(MmalConnection.Destroy(Ptr), "Unable to destroy connection"); }
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"); }
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)); }