2022-07-20 12:58:48 +00:00
|
|
|
#include "lasp_streammgr.h"
|
|
|
|
#include <pybind11/numpy.h>
|
2022-07-29 07:32:26 +00:00
|
|
|
#include <pybind11/pybind11.h>
|
2022-07-20 12:58:48 +00:00
|
|
|
#include <pybind11/stl.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
using std::cerr;
|
|
|
|
namespace py = pybind11;
|
|
|
|
|
|
|
|
void init_streammgr(py::module &m) {
|
|
|
|
|
|
|
|
py::class_<StreamMgr, std::unique_ptr<StreamMgr, py::nodelete>> smgr(
|
|
|
|
m, "StreamMgr");
|
|
|
|
|
2022-07-29 07:32:26 +00:00
|
|
|
py::enum_<StreamMgr::StreamType>(smgr, "StreamType")
|
|
|
|
.value("input", StreamMgr::StreamType::input)
|
|
|
|
.value("output", StreamMgr::StreamType::output)
|
|
|
|
.export_values();
|
|
|
|
|
2022-07-20 12:58:48 +00:00
|
|
|
smgr.def("startStream", &StreamMgr::startStream);
|
2022-08-14 19:00:22 +00:00
|
|
|
smgr.def("stopStream", &StreamMgr::stopStream);
|
2022-07-20 12:58:48 +00:00
|
|
|
smgr.def_static("getInstance", []() {
|
|
|
|
return std::unique_ptr<StreamMgr, py::nodelete>(&StreamMgr::getInstance());
|
|
|
|
});
|
|
|
|
smgr.def("stopAllStreams", &StreamMgr::stopAllStreams);
|
|
|
|
|
|
|
|
smgr.def("setSiggen", &StreamMgr::setSiggen);
|
2022-09-03 18:59:14 +00:00
|
|
|
smgr.def("getDeviceInfo", &StreamMgr::getDeviceInfo);
|
2022-07-20 12:58:48 +00:00
|
|
|
}
|