| 216 | |
| 217 | #ifdef BMF_ENABLE_FFMPEG |
| 218 | void bmf_ffmpeg_bind(py::module &m) { |
| 219 | using namespace bmf_sdk; |
| 220 | auto ff = m.def_submodule("ffmpeg"); |
| 221 | ff.def("siso_filter", [](VideoFrame &vf, const std::string &filter_str) { |
| 222 | auto new_vf = ffmpeg::siso_filter(vf, filter_str); |
| 223 | return py::cast(new_vf); |
| 224 | }); |
| 225 | |
| 226 | py::class_<SimpleFilterGraph>(ff, "SimpleFilterGraph") |
| 227 | .def(py::init<>()); |
| 228 | |
| 229 | ff.def("init_reformat_filter", [](const VideoFrame& vf, const std::string& format, |
| 230 | const std::string& flags = "") { |
| 231 | return bmf_sdk::ffmpeg::init_reformat_filter(vf, format, flags); |
| 232 | }, py::arg("vf"), py::arg("format"), py::arg("flags") = ""); |
| 233 | |
| 234 | ff.def("reformat", [](const VideoFrame& vf, const std::string& format_str, |
| 235 | SimpleFilterGraph filter_graph = SimpleFilterGraph(), |
| 236 | const std::string& flags = "") { |
| 237 | return bmf_sdk::ffmpeg::reformat(vf, format_str, filter_graph, flags); |
| 238 | }, py::arg("vf"), py::arg("format_str"), |
| 239 | py::arg("filter_graph") = SimpleFilterGraph(), |
| 240 | py::arg("flags") = ""); |
| 241 | } |
| 242 | #endif |
| 243 | |
| 244 | void module_sdk_bind(py::module &m) { |
no test coverage detected