Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
#47. ISP component has 2 output ports.
Browse files Browse the repository at this point in the history
  • Loading branch information
techyian committed Dec 30, 2019
1 parent ac5800d commit b7b80f9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/MMALSharp/Components/MMALIspComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ public unsafe MMALIspComponent()
{
// Default to use still image port behaviour.
this.Inputs.Add(new InputPort((IntPtr)(&(*this.Ptr->Input[0])), this, Guid.NewGuid()));
this.Outputs.Add(new StillPort((IntPtr)(&(*this.Ptr->Output[0])), this, Guid.NewGuid()));

for (var i = 0; i < this.Ptr->OutputNum; i++)
{
this.Outputs.Add(new StillPort((IntPtr)(&(*this.Ptr->Output[i])), this, Guid.NewGuid()));
}
}

/// <summary>
Expand All @@ -45,7 +49,11 @@ public unsafe MMALIspComponent(Type outputPortType)
: base(MMAL_COMPONENT_ISP)
{
this.Inputs.Add(new InputPort((IntPtr)(&(*this.Ptr->Input[0])), this, Guid.NewGuid()));
this.Outputs.Add((IOutputPort)Activator.CreateInstance(outputPortType, (IntPtr)(&(*this.Ptr->Output[0])), this, Guid.NewGuid()));

for (var i = 0; i < this.Ptr->OutputNum; i++)
{
this.Outputs.Add((IOutputPort)Activator.CreateInstance(outputPortType, (IntPtr)(&(*this.Ptr->Output[i])), this, Guid.NewGuid()));
}
}
}
}

0 comments on commit b7b80f9

Please sign in to comment.