Video capture devices having multiplexed inputs




Video capture cards with multiplexed inputs


Video capture cards with multiplexed inputs

TVideoGrabber supports video capture boards having multiplexed inputs.

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

2 cases:

a. the video capture card is switching its inputs automatically
If the inputs are switched by the card itself (you see the video frames of each channel alternatively in the same video window), disable the MultiplexedInputEmulation property.
It is possible that this feature is only available through one of the video inputs. In this case you have to select this VideoInput in the VideoInputs list.

b. the video capture card does not switch its inputs automatically
Whatever the VideoInput that you select in the VideoInputs list, you see only one video channel at the time.
In this case enable the MultiplexedInputEmulation property to get the inputs switched programmatically by TVideoGrabber.
Each video input will be switched after a delay specified by the MultiplexedSwitchDelay (default value: 0 means the input is switched after each video frame received).
When an input is switched, the MultiplexedStabilizationDelay waits for the specified duration (expressed in milliseconds) to wait for the input stabilization (default value = 70 milliseconds, minimum value = 30 ms).

It is possible to work in 2 ways:

1) one single TVideoGrabber component shows a mosaic layout
In this mode a single TVideoGrabber component displays all inputs in a single video window as a "mosaic layout".
This mode is activated by setting:
- MultiplexedRole = mr_MultiplexedMosaic4 -> for a 4 inputs display
- MultiplexedRole = mr_MultiplexedMosaic16 -> for a 16 inputs display

Note: the frame rate is specified by the FrameRate property.

2) master/slaves: one master TVideoGrabber component distributes the inputs to several TVideoGrabber slaves components
- in this video capture board is managed in preview mode by the TVideoGrabber master component
- the slaves TVideoGrabber components are "virtual input" components associated to the TVideoGrabber master component.

To activate this mode for a 4 inputs board:
- put a TVideoGrabber component on the form (e.g. VideoGrabber1)
- set its MultiplexedRole property to mr_MultiplexedMaster

- put 4 TVideoGrabber components on the form (e.g. VideoGrabber2, VideoGrabber3, VideoGrabber4, VideoGrabber5).
- set their MultiplexedRole property to mr_MultiplexedSlave.

- invoke programmatically AssociateMultiplexedSlave on the master component for each slave component.
E.g. add the following code to associate the slaves components to the master component: (in the FormShow event, or before invoking StartPreview):

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

Note: the first parameter is the number of the video input to associate to the slave component.

Then you can invoke StartPreview to start distributing the virtual inputs to the slaves components.

- the frame rate of the master component is specified by the FrameRate property.
- the frame rate of the slaves components can be adjusted by setting their respective FrameRate property.

See Also
TMultiplexedRole AssociateMultiplexedSlave EnableMultiplexedInput MultiplexedInputEmulation MultiplexedRole MultiplexedStabilizationDelay MultiplexedSwitchDelay UniqueID