debug
This commit is contained in:
parent
9c8c15a924
commit
7c64255cbd
|
@ -71,9 +71,7 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
|
||||||
// 1. 获取GIL
|
// 1. 获取GIL
|
||||||
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_END_ALLOW_THREADS;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -189,22 +187,19 @@ 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;
|
|
||||||
#endif
|
#endif
|
||||||
std::cout << "=== 音频处理完成 ===" << std::endl;
|
std::cout << "=== 音频处理完成 ===" << std::endl;
|
||||||
|
|
||||||
} catch (const std::exception& e) {
|
} catch (const std::exception& e) {
|
||||||
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;
|
|
||||||
#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;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue