serializer for each gmsl camera


how to use dwSensorSerializer_initialize to create a serializer(h264/265/raw/lraw) for each individual gmsl camera in the same group?

for example, if I have 4 gmsl cameras in camera group A, use the code below and set “1111” to camera-mask, dwSAL_createSensor creates one sensor handle for camera group A. if dwSensorSerializer_initialize uses this sensor handle as input, how should we serialize the camera data from each individual camera to a different video file?

from camera_multiple_gmsl/main.cpp

std::string cameraName = getArgument((std::string("type-") + groupIDNames[portID]).c_str());
parameterString += std::string("camera-group=") + groupIDNames[portID];
parameterString += ",camera-type=" + cameraName;
parameterString += ",camera-count=4"; // when using the mask, just ask for all cameras, mask will select properly

if (selectorMask.size() >= portID*4) {
    parameterString += ",camera-mask="+ selectorMask.substr(portID*4, std::min(selectorMask.size() - portID*4, size_t{4}));

    parameterString += ",slave="  + getArgument("tegra-slave");

    dwSensorParams params;
    params.parameters = parameterString.c_str();
    params.protocol = "camera.gmsl";
    CHECK_DW_ERROR(dwSAL_createSensor(&m_camera[portID], params, m_sal));

from camera_gmsl_raw/main.cpp

dwSensorSerializer_initialize(&m_serializer, &serializerParams, m_camera)

Dear jerry_sf,
Can you check the below method. For each camera, create a seperate sensorSerilizer handler with different write-file value in serializerParams like below
dwSensorSerializer_initialize(&m_serializer1, &serializerParams1, m_camera1)// for camera 1
dwSensorSerializer_initialize(&m_serializer2, &serializerParams2, m_camera2)// for camera 2
Now in Render function check adding,
dwSensorSerializer_serializeCameraFrameAsync function for both cameras with its corresponding serializer handler to store the cameras frame