add product domain,appid,appsecreatkey
This commit is contained in:
parent
f6a9d677cd
commit
bf66197322
|
@ -13,6 +13,8 @@ void RTCContext::onRoom(uint32_t typeId, RTCENGINE_NAMESPACE::MRTCRoomInfo& room
|
||||||
}
|
}
|
||||||
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) {
|
||||||
LOG_DEBUG << "RTCContext::onConsumer():" << consumerInfo.roomId << "," << consumerInfo.displayName << "," << consumerInfo.channelIndex;
|
LOG_DEBUG << "RTCContext::onConsumer():" << consumerInfo.roomId << "," << consumerInfo.displayName << "," << consumerInfo.channelIndex;
|
||||||
|
std::lock_guard<std::mutex> lock(mutex_);
|
||||||
|
isOnConsumer = true;
|
||||||
//LOG_DEBUG << "RTCContext::onConsumer()";
|
//LOG_DEBUG << "RTCContext::onConsumer()";
|
||||||
}
|
}
|
||||||
void RTCContext::onRender(const char* roomId, const char* peerId,
|
void RTCContext::onRender(const char* roomId, const char* peerId,
|
||||||
|
@ -97,9 +99,9 @@ bool RTCContext::init()
|
||||||
}
|
}
|
||||||
bool RTCContext::initRecv()
|
bool RTCContext::initRecv()
|
||||||
{
|
{
|
||||||
while (!isOnRoom)
|
while (!isOnConsumer)
|
||||||
{
|
{
|
||||||
LOG_DEBUG << "wait for room";
|
LOG_DEBUG << "wait for OnConsumer";
|
||||||
sleep(3);
|
sleep(3);
|
||||||
}
|
}
|
||||||
LOG_DEBUG << "registerSoundLevelListener";
|
LOG_DEBUG << "registerSoundLevelListener";
|
||||||
|
@ -110,7 +112,6 @@ bool RTCContext::init()
|
||||||
LOG_DEBUG << "RTCContext::instance().registerSoundLevelListener() inUser failed, ret:" << ret1;
|
LOG_DEBUG << "RTCContext::instance().registerSoundLevelListener() inUser failed, ret:" << ret1;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
LOG_DEBUG << "muteAudio";
|
LOG_DEBUG << "muteAudio";
|
||||||
int16_t ret2 = rtcEngine_->muteAudio(inRoomId, inUserId, mrtc::TYPE_AUDIO_SOURCE_CUSTOM, false, inChannelIndex);
|
int16_t ret2 = rtcEngine_->muteAudio(inRoomId, inUserId, mrtc::TYPE_AUDIO_SOURCE_CUSTOM, false, inChannelIndex);
|
||||||
if (0 != ret2)
|
if (0 != ret2)
|
||||||
|
@ -118,7 +119,6 @@ bool RTCContext::init()
|
||||||
LOG_DEBUG << "RTCContext::instance().muteAudio() failed, ret:" << ret2;
|
LOG_DEBUG << "RTCContext::instance().muteAudio() failed, ret:" << ret2;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
LOG_DEBUG << "init recv succ";
|
LOG_DEBUG << "init recv succ";
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ bool RTCContext::init()
|
||||||
{
|
{
|
||||||
while (!isOnRoom)
|
while (!isOnRoom)
|
||||||
{
|
{
|
||||||
LOG_DEBUG << "wait for room";
|
LOG_DEBUG << "wait for OnRoom";
|
||||||
sleep(3);
|
sleep(3);
|
||||||
}
|
}
|
||||||
LOG_DEBUG << "join multi room";
|
LOG_DEBUG << "join multi room";
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include <filesystem> // C++17
|
#include <filesystem> // C++17
|
||||||
#include "trantor/utils/Logger.h"
|
#include "trantor/utils/Logger.h"
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
|
#define ENV_PRODUCT
|
||||||
//#define SEND_MODE
|
//#define SEND_MODE
|
||||||
|
|
||||||
class RTCContext :
|
class RTCContext :
|
||||||
|
@ -18,8 +19,18 @@ class RTCContext :
|
||||||
public RTCENGINE_NAMESPACE::IMRTCProduerCallBack
|
public RTCENGINE_NAMESPACE::IMRTCProduerCallBack
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
#ifdef ENV_PRODUCT
|
||||||
|
const char* appid = "1357389261426393088";
|
||||||
|
const char* appSecrectKey = "gytr3qrrznsgac2lbdchfg0l4ltqx4x3nf4my0yt1dbx7riz1gnnsnhblrlc2j4o1lx4vdu495lifv8s7jyrmfxtq9lif9rusxnur5smdn5cjopstxp5dim7p52xrezp";
|
||||||
|
const char* domain = "rtc.migu.cn";
|
||||||
|
const unsigned short port = 34443;
|
||||||
|
#else
|
||||||
const char* appid = "1357413779192676352";
|
const char* appid = "1357413779192676352";
|
||||||
const char* appSecrectKey = "q04ex8bivag3mn8ncf504t5lw4asldbc1k2rfbhoy54u7lsqqkmkzp33x0h4d9ww9z3f1deiel34m191lj4k5dc7utidom9s1izg88jhouv1bwy62q372ly9dmd63g4u";
|
const char* appSecrectKey = "q04ex8bivag3mn8ncf504t5lw4asldbc1k2rfbhoy54u7lsqqkmkzp33x0h4d9ww9z3f1deiel34m191lj4k5dc7utidom9s1izg88jhouv1bwy62q372ly9dmd63g4u";
|
||||||
|
const char* domain = "dorytest.migu.cn";
|
||||||
|
const unsigned short port = 34443;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef SEND_MODE
|
#ifdef SEND_MODE
|
||||||
const char* inUserId = "inuser1";
|
const char* inUserId = "inuser1";
|
||||||
#else
|
#else
|
||||||
|
@ -36,9 +47,8 @@ public:
|
||||||
const char* inRoomId = outRoomId;
|
const char* inRoomId = outRoomId;
|
||||||
const int16_t inChannelIndex = outChannelIndex;
|
const int16_t inChannelIndex = outChannelIndex;
|
||||||
#endif
|
#endif
|
||||||
const char* domain = "dorytest.migu.cn";
|
|
||||||
const unsigned short port = 34443;
|
|
||||||
bool isOnRoom = false;
|
bool isOnRoom = false;
|
||||||
|
bool isOnConsumer = false;
|
||||||
|
|
||||||
static RTCContext& instance()
|
static RTCContext& instance()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue