Skip to content

Commit 22991ec

Browse files
log in old functions
1 parent 6053b27 commit 22991ec

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

src/room.cpp

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,17 +466,29 @@ bool Room::trySetOnVideoFrameEventCallback(const std::string& participant_identi
466466

467467
void 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

472476
void 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

477485
void 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

482494
void Room::clearOnAudioFrameCallback(const std::string& participant_identity, const std::string& track_name) {

0 commit comments

Comments
 (0)