Skip to content

Commit 2179d4c

Browse files
better logging
1 parent ede1f20 commit 2179d4c

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

src/room.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -468,17 +468,21 @@ void Room::setOnAudioFrameCallback(const std::string& participant_identity, cons
468468
AudioFrameCallback callback, const AudioStream::Options& opts) {
469469
bool const result = trySetOnAudioFrameCallback(participant_identity, track_name, std::move(callback), opts);
470470
if (!result) {
471-
LK_LOG_ERROR("Room::setOnAudioFrameCallback: failed to set callback for participant={} track_name={}",
472-
participant_identity, track_name);
471+
LK_LOG_ERROR(
472+
"Room::setOnAudioFrameCallback: failed to set callback for participant={} track_name={}. This function is "
473+
"deprecated, instead use trySetOnAudioFrameCallback",
474+
participant_identity, track_name);
473475
}
474476
}
475477

476478
void Room::setOnVideoFrameCallback(const std::string& participant_identity, const std::string& track_name,
477479
VideoFrameCallback callback, const VideoStream::Options& opts) {
478480
bool const result = trySetOnVideoFrameCallback(participant_identity, track_name, std::move(callback), opts);
479481
if (!result) {
480-
LK_LOG_ERROR("Room::setOnVideoFrameCallback: failed to set callback for participant={} track_name={}",
481-
participant_identity, track_name);
482+
LK_LOG_ERROR(
483+
"Room::setOnVideoFrameCallback: failed to set callback for participant={} track_name={}. This function is "
484+
"deprecated, instead use trySetOnVideoFrameCallback",
485+
participant_identity, track_name);
482486
}
483487
}
484488

@@ -488,6 +492,10 @@ void Room::setOnVideoFrameEventCallback(const std::string& participant_identity,
488492
if (!result) {
489493
LK_LOG_ERROR("Room::setOnVideoFrameEventCallback: failed to set callback for participant={} track_name={}",
490494
participant_identity, track_name);
495+
LK_LOG_ERROR(
496+
"Room::setOnVideoFrameEventCallback: failed to set callback for participant={} track_name={}. This function is "
497+
"deprecated, instead use trySetOnVideoFrameEventCallback",
498+
participant_identity, track_name);
491499
}
492500
}
493501

0 commit comments

Comments
 (0)