How should I use MultiSource sample to acquire data from multi stream channels simultaneously?

Models affected:

  • FS-1600D-10GE
  • FS-1600T-10GE
  • FS-3200D-10GE
  • FS-3200T-10GE

 

Issue:

When connecting an FS camera and running the C++ sample MultiSource, the frame rate of Source0 is always 0fps, while frame rate of Source1 is correct.
This is due to a bug that the original code was trying to read a parameter which JAI cameras don't have:
PvResult lResult = mDevice->GetParameters()->GetIntegerValue( "SourceStreamChannel", lSourceChannel );
The value of lSourceChannel is always 0 (default value).

In python Mulitsource sample the error is the same by trying to read "SourceStreamChannel" that does not exist.

Solution:

If you are using a Dual sensor FS camera, you should force lSourceChannel=1 at second channel.

If you are using a Triple sensor FS camera, you should force lSourceChannel=1 at second channel, and lSourceChannel=2 at third channel.

In order to fix this you could replace the line:
int64_t lSourceChannel = 0;
with

//returns the last character of the string ('0' from "Source0"  and '1' from "Source1" and '2' from "Source2")

int64_t lSourceChannel = (static_cast<string>(mSource)).back();

//substract 48 because that is the ASCII value for char 0

lSourceChannel -= 48;

Then all channels should get correct right frame rate.


In Python version of the sample code you can comment out line 44 and 45 where it writes 
---------------------------
if not source_channel:
            result, source_channel = self._device.GetParameters().GetInteger("SourceStreamChannel").GetValue()
---------------------------
Code should be able to run afterwards.

Revision note:

The versions affected in C++ and python MultiSource sample code are up to eBUS SDK 6.3

Have more questions? Submit a request

1 Comments

  • 0
    Avatar
    Koko Den

    How to modify MultiSource.py:
    Comment out line 44 and 45 where it writes
    ---------------------------
    if not source_channel:
               result, source_channel = self._device.GetParameters().GetInteger("SourceStreamChannel").GetValue()
    ---------------------------

Please sign in to leave a comment.