debug
This commit is contained in:
parent
4fa6c56873
commit
6936dfd292
|
@ -7,10 +7,30 @@ void RTCContext::onRoom(uint32_t typeId, RTCENGINE_NAMESPACE::MRTCRoomInfo& room
|
||||||
isOnRoom_ = true;
|
isOnRoom_ = true;
|
||||||
}
|
}
|
||||||
void RTCContext::onConsumer(uint32_t msgId, const char* roomId, const char* peerId, RTCENGINE_NAMESPACE::MRTCConsumerInfo& consumerInfo) {
|
void RTCContext::onConsumer(uint32_t msgId, const char* roomId, const char* peerId, RTCENGINE_NAMESPACE::MRTCConsumerInfo& consumerInfo) {
|
||||||
std::cout << "RTCContext::onConsumer():" << consumerInfo.roomId << "," << consumerInfo.displayName << "," << consumerInfo.channelIndex;
|
//std::cout << "RTCContext::onConsumer()" << std::endl;
|
||||||
|
std::cout << "RTCContext::onConsumer():msgId:" << msgId << ", roomId:" << consumerInfo.roomId << ", displayName:"
|
||||||
|
<< consumerInfo.displayName << ", channelIndex" << (int)consumerInfo.channelIndex;
|
||||||
std::lock_guard<std::mutex> lock(mutex_);
|
std::lock_guard<std::mutex> lock(mutex_);
|
||||||
isOnConsumer_ = true;
|
isOnConsumer_ = true;
|
||||||
//std::cout << "RTCContext::onConsumer()" << std::endl;
|
std::cout << "registerSoundLevelListener" << std::endl;
|
||||||
|
int16_t ret1 = rtcEngine_->registerSoundLevelListener(mrtc::TYPE_AUDIO_SOURCE_CUSTOM, roomId,
|
||||||
|
peerId, consumerInfo.channelIndex, this);
|
||||||
|
if (0 != ret1)
|
||||||
|
{
|
||||||
|
std::cout << "RTCContext::instance().registerSoundLevelListener() inUser failed, ret:" << ret1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << "muteAudio" << std::endl;
|
||||||
|
int16_t ret2 = rtcEngine_->muteAudio(roomId, peerId, mrtc::TYPE_AUDIO_SOURCE_CUSTOM,
|
||||||
|
false, consumerInfo.channelIndex);
|
||||||
|
if (0 != ret2)
|
||||||
|
{
|
||||||
|
std::cout << "RTCContext::instance().muteAudio() failed, ret:" << ret2;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << "init recv succ" << std::endl;
|
||||||
}
|
}
|
||||||
void RTCContext::onRender(const char* roomId, const char* peerId,
|
void RTCContext::onRender(const char* roomId, const char* peerId,
|
||||||
RTCENGINE_NAMESPACE::MRTCVideoSourceType sourceType, const RTCENGINE_NAMESPACE::MRTCVideoFrame& videoFrame) {
|
RTCENGINE_NAMESPACE::MRTCVideoSourceType sourceType, const RTCENGINE_NAMESPACE::MRTCVideoFrame& videoFrame) {
|
||||||
|
@ -518,6 +538,7 @@ bool RTCContext::initRecv(const char* destRoomId, const char* srcUserId, const i
|
||||||
std::cout << "wait for OnConsumer" << std::endl;
|
std::cout << "wait for OnConsumer" << std::endl;
|
||||||
sleep(3);
|
sleep(3);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
std::cout << "registerSoundLevelListener" << std::endl;
|
std::cout << "registerSoundLevelListener" << std::endl;
|
||||||
int16_t ret1 = rtcEngine_->registerSoundLevelListener(mrtc::TYPE_AUDIO_SOURCE_CUSTOM, destRoomId,
|
int16_t ret1 = rtcEngine_->registerSoundLevelListener(mrtc::TYPE_AUDIO_SOURCE_CUSTOM, destRoomId,
|
||||||
srcUserId, destChannelIndex, this);
|
srcUserId, destChannelIndex, this);
|
||||||
|
@ -536,6 +557,7 @@ bool RTCContext::initRecv(const char* destRoomId, const char* srcUserId, const i
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "init recv succ" << std::endl;
|
std::cout << "init recv succ" << std::endl;
|
||||||
|
*/
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue