debug
This commit is contained in:
parent
aced2e2308
commit
00672f25fe
|
@ -69,7 +69,9 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
|
|||
std::cerr << "Python 解释器未初始化!" << std::endl;
|
||||
return;
|
||||
}
|
||||
#ifdef GIL
|
||||
PyGILState_STATE gstate = PyGILState_Ensure();
|
||||
#endif
|
||||
|
||||
namespace py = boost::python;
|
||||
try {
|
||||
|
@ -125,7 +127,6 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
|
|||
audioFrame.numChannels,
|
||||
audioFrame.channelIndex
|
||||
);
|
||||
//PyGILState_Release(gstate);
|
||||
std::cout << " after callback" << std::endl;
|
||||
if (PyErr_Occurred()) {
|
||||
PyObject *type, *value, *traceback;
|
||||
|
@ -172,15 +173,21 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
|
|||
std::cout << "[8] 释放共享内存资源..." << std::endl;
|
||||
|
||||
std::cout << "[9] 释放GIL..." << std::endl;
|
||||
#ifdef GIL
|
||||
PyGILState_Release(gstate);
|
||||
#endif
|
||||
std::cout << "=== 音频处理完成 ===" << std::endl;
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
std::cout << "[EXCEPTION] 异常捕获: " << e.what() << std::endl;
|
||||
#ifdef GIL
|
||||
PyGILState_Release(gstate);
|
||||
#endif
|
||||
std::cerr << "Audio process error: " << e.what() << std::endl;
|
||||
}
|
||||
#ifdef GIL
|
||||
PyGILState_Release(gstate);
|
||||
#endif
|
||||
}
|
||||
|
||||
void RTCContext::onProducer(uint32_t msgId, mrtc::MRTCProducerInfo& info)
|
||||
|
|
Loading…
Reference in New Issue