@amanda-recallai @chunsiong.zoom
I’ve been running a Zoom Meeting bot that streams audio and video into a meeting based on “meetingsdk-linux-raw-recording-sample” (GitHub - zoom/meetingsdk-linux-raw-recording-sample) unchanged for ~6 months.
Recently, about~20% of the time my IZoomSDKVideoSource::onInitialize(...)
never fires, even though setExternalVideoSource(...)
returns SDKERR_SUCCESS. Because of this the video streaming fails.
I’m upgraded Zoom SDK to the latest as well v6.5.0.3211, on Ubuntu 22.04 with GStreamer 1.18.
I downgraded/re-upgraded the SDK and still see the same intermittent behavior.
Below are the two key pieces of code:
### 1) My override in `ZoomSDKVideoSource.h`
class ZoomSDKVideoSource : public IZoomSDKVideoSource {
public:
// …
// SDK calls this when your external source is bound
void onInitialize(IZoomSDKVideoSender* sender,
IList<VideoSourceCapability>* support_cap_list,
VideoSourceCapability& suggest_cap) override
{
std::cout << "[VS] onInitialize – sender ready\n";
video_sender_ = sender;
initialized_.store(true);
}
// …
private:
std::atomic<bool> initialized_{false};
IZoomSDKVideoSender* video_sender_ = nullptr;
};
void CheckAndStartRawSending(bool isVideo, bool isAudio,
bool skipState, bool isIntro = false) {
if (!isIntro && isVideo && isAudio) {
determineDefaultMediaSource(...);
std::cout << "Video Source: " << DEFAULT_VIDEO_SOURCE << "\n";
// create new source each time
ZoomSDKVideoSource* virtual_camera_video_source =
new ZoomSDKVideoSource(DEFAULT_VIDEO_SOURCE);
IZoomSDKVideoSourceHelper* vsHelper = GetRawdataVideoSourceHelper();
IZoomSDKAudioRawDataHelper* audioHelper = GetAudioRawdataHelper();
SDKError errvid =
vsHelper->setExternalVideoSource(virtual_camera_video_source);
SDKError erraud =
audioHelper->setExternalAudioSource(
new ZoomSDKVirtualAudioMicEvent(DEFAULT_AUDIO_SOURCE));
if (errvid == SDKERR_SUCCESS && erraud == SDKERR_SUCCESS) {
std::cout << "setExternalVideoSource(): Success\n";
// unmute & join VOIP…
m_pMeetingService->GetMeetingVideoController()->UnmuteVideo();
m_pMeetingService->GetMeetingAudioController()->JoinVoip();
} else {
std::cerr << "Failed to bind video or audio source: "
<< errvid << " / " << erraud << "\n";
}
}
}
I ve been struggling to figure out why onInitialize does not fire. Because without it my video_sender is null and the video does not stream.
Any pointers or workarounds would be hugely appreciated!