debug
This commit is contained in:
parent
3dd6a84c5d
commit
9c8c15a924
|
@ -72,8 +72,8 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
|
||||||
std::cout << "[1] 获取GIL锁..." << std::endl;
|
std::cout << "[1] 获取GIL锁..." << std::endl;
|
||||||
#ifdef GIL
|
#ifdef GIL
|
||||||
//PyGILState_STATE gstate = PyGILState_Ensure();
|
//PyGILState_STATE gstate = PyGILState_Ensure();
|
||||||
Py_BEGIN_ALLOW_THREADS
|
Py_BEGIN_ALLOW_THREADS;
|
||||||
Py_END_ALLOW_THREADS
|
Py_END_ALLOW_THREADS;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -190,7 +190,7 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
|
||||||
std::cout << "[9] 释放GIL..." << std::endl;
|
std::cout << "[9] 释放GIL..." << std::endl;
|
||||||
#ifdef GIL
|
#ifdef GIL
|
||||||
//PyGILState_Release(gstate);
|
//PyGILState_Release(gstate);
|
||||||
Py_BEGIN_ALLOW_THREADS
|
Py_BEGIN_ALLOW_THREADS;
|
||||||
#endif
|
#endif
|
||||||
std::cout << "=== 音频处理完成 ===" << std::endl;
|
std::cout << "=== 音频处理完成 ===" << std::endl;
|
||||||
|
|
||||||
|
@ -198,13 +198,13 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
|
||||||
std::cout << "[EXCEPTION] 异常捕获: " << e.what() << std::endl;
|
std::cout << "[EXCEPTION] 异常捕获: " << e.what() << std::endl;
|
||||||
#ifdef GIL
|
#ifdef GIL
|
||||||
//PyGILState_Release(gstate);
|
//PyGILState_Release(gstate);
|
||||||
Py_BEGIN_ALLOW_THREADS
|
Py_BEGIN_ALLOW_THREADS;
|
||||||
#endif
|
#endif
|
||||||
std::cerr << "Audio process error: " << e.what() << std::endl;
|
std::cerr << "Audio process error: " << e.what() << std::endl;
|
||||||
}
|
}
|
||||||
#ifdef GIL
|
#ifdef GIL
|
||||||
//PyGILState_Release(gstate);
|
//PyGILState_Release(gstate);
|
||||||
Py_BEGIN_ALLOW_THREADS
|
Py_BEGIN_ALLOW_THREADS;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue