Skip to content

Video capture devices having multiplexed inputs

TVideoGrabber supports video capture boards with multiplexed inputs.

This mode is activated by the MultiplexedRole property. Each input can be enabled/disabled with EnableMultiplexedInput.

There are two cases.

The video capture card switches its inputs automatically

If the inputs are switched by the card itself (the video frames of each channel are visible alternately in the same video window), disable the MultiplexedInputEmulation property.

This feature may be available only through one of the video inputs. In this case, select this VideoInput in the VideoInputs list.

The video capture card does not switch its inputs automatically

Whatever the VideoInput selected in the VideoInputs list, only one video channel is visible at a time.

In this case, enable the MultiplexedInputEmulation property to get the inputs switched programmatically by TVideoGrabber.

Each video input is switched after the delay specified by MultiplexedSwitchDelay (the default value, 0, means that the input is switched after each video frame received).

When an input is switched, MultiplexedStabilizationDelay specifies the time to wait for the input to stabilize, expressed in milliseconds (default value 100 ms, minimum value 30 ms).

Two ways of working

Mosaic layout

In this mode, one single TVideoGrabber component displays all the inputs in a single video window as a "mosaic layout".

This mode is activated by setting:

The frame rate is specified by the FrameRate property.

Master/slaves

One master TVideoGrabber component distributes the inputs to several TVideoGrabber slave components. In this mode:

  • the video capture board is managed in preview mode by the TVideoGrabber master component,
  • the slave TVideoGrabber components are "virtual input" components associated with the TVideoGrabber master component.

To activate this mode for a 4-input board:

  1. Put a TVideoGrabber component on the form (e.g. VideoGrabber1) and set its MultiplexedRole property to mr_MultiplexedMaster.
  2. Put 4 TVideoGrabber components on the form (e.g. VideoGrabber2, VideoGrabber3, VideoGrabber4, VideoGrabber5) and set their MultiplexedRole property to mr_MultiplexedSlave.
  3. Programmatically invoke AssociateMultiplexedSlave on the master component for each slave component.

For example, add the following code in the FormShow event, or before invoking StartPreview, to associate the slave components with the master component:

procedure TForm1.FormShow(Sender: TObject);
begin
  VideoGrabber1.AssociateMultiplexedSlave (0, VideoGrabber2.UniqueID);
  VideoGrabber1.AssociateMultiplexedSlave (1, VideoGrabber3.UniqueID);
  VideoGrabber1.AssociateMultiplexedSlave (2, VideoGrabber4.UniqueID);
  VideoGrabber1.AssociateMultiplexedSlave (3, VideoGrabber5.UniqueID);
end;

The first parameter is the number of the video input to associate with the slave component.

Then invoke StartPreview to start distributing the virtual inputs to the slave components.

Notes:

  • the frame rate of the master component is specified by the FrameRate property,
  • the frame rate of the slave components can be adjusted by setting their respective FrameRate property.