debug
This commit is contained in:
parent
ba09525535
commit
59a0dde8ab
|
@ -74,9 +74,9 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
|
||||||
|
|
||||||
void** numpyApi = numpyApi_;
|
void** numpyApi = numpyApi_;
|
||||||
if (!numpyApi || !numpyApi[93]) { // 93是PyArray_SimpleNew的偏移量
|
if (!numpyApi || !numpyApi[93]) { // 93是PyArray_SimpleNew的偏移量
|
||||||
std::cout << "NumPy API corrupt! Key functions missing." << std::endl;
|
std::cout << "numpyApi is null in onAudioProcess" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
std::cout << "PyArray_API is not null in init" << std::endl;
|
std::cout << "numpyApi is not null in onAudioProcess" << std::endl;
|
||||||
}
|
}
|
||||||
//auto numpyApi = RTCContext::numpy_api();
|
//auto numpyApi = RTCContext::numpy_api();
|
||||||
std::cout << "step1" << std::endl;
|
std::cout << "step1" << std::endl;
|
||||||
|
@ -88,7 +88,7 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
|
||||||
using PyArray_SimpleNew_t = PyObject*(*)(int, npy_intp*, int);
|
using PyArray_SimpleNew_t = PyObject*(*)(int, npy_intp*, int);
|
||||||
std::cout << "step3" << std::endl;
|
std::cout << "step3" << std::endl;
|
||||||
auto PyArray_SimpleNew = reinterpret_cast<PyArray_SimpleNew_t>(numpyApi[93]);
|
auto PyArray_SimpleNew = reinterpret_cast<PyArray_SimpleNew_t>(numpyApi[93]);
|
||||||
std::cout << "step4" << std::endl;
|
std::cout << "step4" << PyArray_SimpleNew << std::endl;
|
||||||
|
|
||||||
// 3. 严格校验输入数据
|
// 3. 严格校验输入数据
|
||||||
if (!audioFrame.data || audioFrame.dataCount <= 0) {
|
if (!audioFrame.data || audioFrame.dataCount <= 0) {
|
||||||
|
@ -166,9 +166,9 @@ bool RTCContext::init(const char* selfUserId, const char* selfDisplayName, const
|
||||||
{
|
{
|
||||||
void** numpyApi = numpyApi_;
|
void** numpyApi = numpyApi_;
|
||||||
if (!numpyApi || !numpyApi[93]) { // 93是PyArray_SimpleNew的偏移量
|
if (!numpyApi || !numpyApi[93]) { // 93是PyArray_SimpleNew的偏移量
|
||||||
std::cout << "NumPy API corrupt! Key functions missing." << std::endl;
|
std::cout << "numpyApi is null in init" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
std::cout << "PyArray_API is not null in init" << std::endl;
|
std::cout << "numpyApi is not null in init" << std::endl;
|
||||||
}
|
}
|
||||||
mrtc::IMRTCEngineFactory * rtcFactory = mrtc::getMRTCEngineFactory();
|
mrtc::IMRTCEngineFactory * rtcFactory = mrtc::getMRTCEngineFactory();
|
||||||
if (!rtcFactory)
|
if (!rtcFactory)
|
||||||
|
@ -222,9 +222,9 @@ bool RTCContext::initRecv(const char* destRoomId, const char* srcUserId, const i
|
||||||
{
|
{
|
||||||
void** numpyApi = numpyApi_;
|
void** numpyApi = numpyApi_;
|
||||||
if (!numpyApi || !numpyApi[93]) { // 93是PyArray_SimpleNew的偏移量
|
if (!numpyApi || !numpyApi[93]) { // 93是PyArray_SimpleNew的偏移量
|
||||||
std::cout << "NumPy API corrupt! Key functions missing." << std::endl;
|
std::cout << "numpyApi is null in initRecv" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
std::cout << "PyArray_API is not null in init" << std::endl;
|
std::cout << "numpyApi is not null in initRecv" << std::endl;
|
||||||
}
|
}
|
||||||
while (!isOnConsumer_)
|
while (!isOnConsumer_)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue