debug
This commit is contained in:
parent
5c5228c3b2
commit
3fbe05cf92
|
@ -58,8 +58,8 @@ while True:
|
|||
print("resend succ")
|
||||
size = rtc_plugins.getSize()
|
||||
print(f"data size:{size}")
|
||||
#frame = rtc_plugins.getNumpyData()
|
||||
#print(f"frame:{frame}")
|
||||
frame = rtc_plugins.getNumpyData()
|
||||
print(f"frame:{frame}")
|
||||
dataCount = rtc_plugins.getDataCount()
|
||||
print(f"data count:{dataCount}")
|
||||
time.sleep(0.005)
|
||||
|
|
|
@ -713,15 +713,9 @@ np::ndarray RTCContext::getNumpydata() {
|
|||
return np::zeros(bp::make_tuple(0), np::dtype::get_builtin<int16_t>());
|
||||
}
|
||||
|
||||
np::dtype dt = np::dtype::get_builtin<int16_t>();
|
||||
return np::from_data(
|
||||
data_ptr,
|
||||
dt,
|
||||
bp::make_tuple(length),
|
||||
bp::make_tuple(sizeof(int16_t)),
|
||||
bp::object()
|
||||
);
|
||||
|
||||
np::ndarray result = np::empty(bp::make_tuple(length), np::dtype::get_builtin<int16_t>());
|
||||
std::memcpy(result.get_data(), data_ptr, length * sizeof(int16_t));
|
||||
return result;
|
||||
}
|
||||
|
||||
int16_t RTCContext::getDataCount() {
|
||||
|
|
Loading…
Reference in New Issue