@@ -466,17 +466,29 @@ bool Room::trySetOnVideoFrameEventCallback(const std::string& participant_identi
466466
467467void Room::setOnAudioFrameCallback (const std::string& participant_identity, const std::string& track_name,
468468 AudioFrameCallback callback, const AudioStream::Options& opts) {
469- (void )trySetOnAudioFrameCallback (participant_identity, track_name, std::move (callback), opts);
469+ bool result = trySetOnAudioFrameCallback (participant_identity, track_name, std::move (callback), opts);
470+ if (!result) {
471+ LK_LOG_ERROR (" Room::setOnAudioFrameCallback: failed to set callback for participant={} track_name={}" ,
472+ participant_identity, track_name);
473+ }
470474}
471475
472476void Room::setOnVideoFrameCallback (const std::string& participant_identity, const std::string& track_name,
473477 VideoFrameCallback callback, const VideoStream::Options& opts) {
474- (void )trySetOnVideoFrameCallback (participant_identity, track_name, std::move (callback), opts);
478+ bool result = trySetOnVideoFrameCallback (participant_identity, track_name, std::move (callback), opts);
479+ if (!result) {
480+ LK_LOG_ERROR (" Room::setOnVideoFrameCallback: failed to set callback for participant={} track_name={}" ,
481+ participant_identity, track_name);
482+ }
475483}
476484
477485void Room::setOnVideoFrameEventCallback (const std::string& participant_identity, const std::string& track_name,
478486 VideoFrameEventCallback callback, const VideoStream::Options& opts) {
479- (void )trySetOnVideoFrameEventCallback (participant_identity, track_name, std::move (callback), opts);
487+ bool result = trySetOnVideoFrameEventCallback (participant_identity, track_name, std::move (callback), opts);
488+ if (!result) {
489+ LK_LOG_ERROR (" Room::setOnVideoFrameEventCallback: failed to set callback for participant={} track_name={}" ,
490+ participant_identity, track_name);
491+ }
480492}
481493
482494void Room::clearOnAudioFrameCallback (const std::string& participant_identity, const std::string& track_name) {
0 commit comments