MCPcopy Create free account
hub / github.com/BabitMF/bmf / bmf_ffmpeg_bind

Function bmf_ffmpeg_bind

bmf/python/py_module_sdk.cpp:218–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216
217#ifdef BMF_ENABLE_FFMPEG
218void 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
244void module_sdk_bind(py::module &m) {

Callers 1

PYBIND11_MODULEFunction · 0.85

Calls 5

siso_filterFunction · 0.85
castFunction · 0.85
init_reformat_filterFunction · 0.85
SimpleFilterGraphClass · 0.85
reformatFunction · 0.85

Tested by

no test coverage detected