PYBIND11_MODULE(h264decoder, m)
{
PyEval_InitThreads(); // need for release of the GIL (http://stackoverflow.com/questions/8009613/boost-python-not-supporting-parallelism)
py::class_(m, "H264Decoder")
.def(py::init<>())
.def("decode_frame", &PyH264Decoder::decode_frame)
.def("decode", &PyH264Decoder::decode);
m.def("disable_logging", disable_logging);
}
% python tello_test.py command.txt
sending command: command to 192.168.10.1
from ('192.168.10.1', 8889): b'ok'
Done!!! sent command: command to 192.168.10.1
sending command: takeoff to 192.168.10.1
from ('192.168.10.1', 8889): b'ok'
Done!!! sent command: takeoff to 192.168.10.1
delay 1.0
sending command: land to 192.168.10.1
from ('192.168.10.1', 8889): b'ok'
Done!!! sent command: land to 192.168.10.1
Traceback (most recent call last):
File "/Users/xxxxxx/github/tello_python/tello_test.py", line 28, in
out = open('log/' + start_time + '.txt', 'w')
FileNotFoundError: [Errno 2] No such file or directory: 'log/2022-10-26 13:06:37.254305.txt'