Hi,
I’m using this IZoomSDKRenderer* videoHelper class to subscribe to a participant’s video stream by calling:
videoHelper->subscribe(getUserObj(i)->GetUserID(), RAW_DATA_TYPE_VIDEO);
Where i
is the index in a for loop when looping over all the participants.
The problem is, that it always subscribes only for the last subscribe
call, it doesn’t record the raw data of each participant.
Do I need to create IZoomSDKRenderer
object per participant? or there is a way to use one object for many subscription?
Refrence for the subscribe function that I’m using: Meeting SDK for Linux API Reference: IZoomSDKRenderer Class Reference
Thanks
CC. @chunsiong.zoom
chunsiong.zoom
(Chun Siong (tag me for response))
February 26, 2024, 6:08am
2
@gofmannir , you will need to have an instance for each user. It is also a good idea to parse in the userId when you instantiate each of these IZoomSDKRenderer object.
Hi,
I’ve tried to declare 2 instances of IZoomSDKRenderer but it always generates only one yuv file.
here is the code, I started with explicitly declaring 2 IZoomSDKRenderer
pointers:
uint32_t countUsers = getCountUsers();
IUserInfo *mySelfObj = getMyself();
std::string usersMap = "";
std::cout << "Attempt record " << countUsers << " users " << std::endl;
for(int i=0;i<countUsers;i++){
std::cout << "User " << i << ": " << getUserObj(i) << " " << getUserObj(i)->GetUserID() << std::endl;
if (mySelfObj->GetUserID() == getUserObj(i)->GetUserID()){
std::cout << "This is me (the bot): " << i << std::endl;
}else{
std::cout << "attemptToStartRawRecording : subscribing" << std::endl;
if(i == 0){
std::cout << "TEST1 " << std::to_string(getUserObj(i)->GetUserID()) << std::endl;
SDKError err = createRenderer(&videoHelperTest1, videoSource1);
if (err != SDKERR_SUCCESS) {
std::cout << "Error occurred" << std::endl;
// Handle error
}
videoHelperTest1->setRawDataResolution(ZoomSDKResolution_720P);
videoHelperTest1->subscribe(getUserObj(i)->GetUserID(), RAW_DATA_TYPE_VIDEO);
}else{
std::cout << "TEST2 " << std::to_string(getUserObj(i)->GetUserID()) << std::endl;
SDKError err = createRenderer(&videoHelperTest2, videoSource2);
if (err != SDKERR_SUCCESS) {
std::cout << "Error occurred" << std::endl;
// Handle error
}
videoHelperTest2->setRawDataResolution(ZoomSDKResolution_720P);
videoHelperTest2->subscribe(getUserObj(i)->GetUserID(), RAW_DATA_TYPE_VIDEO);
}
}
}
Initizated in the beginning:
ZoomSDKRenderer* videoSource1 = new ZoomSDKRenderer();
ZoomSDKRenderer* videoSource2 = new ZoomSDKRenderer();
IZoomSDKRenderer* videoHelperTest1;
IZoomSDKRenderer* videoHelperTest2;
And I’m identifying the stream participant by int number = data->GetSourceID();
like this:
void ZoomSDKRenderer::onRawDataFrameReceived(YUVRawDataI420* data)
{
std::cout << "sourceID." << data->GetSourceID() << std::endl;
}
This is always prints the same single UserId of one participant instead of getting fired for both the participants. (2 real participants and the bot is in the meeting).
Used this page: Overview | Meeting SDK | Linux
@chunsiong.zoom Do you have any idea why is it happening?
UPDATE:
I saw your comment here: Cannot obtain data for more than 5 people using raw data - #2 by chunsiong.zoom Is there any way to get more then 4 participants raw data?