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

Function TEST

bmf/c_modules/test/test_python_module.cpp:57–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57TEST(python_module, ffmpeg_module) {
58
59 setenv("PYTHONPATH",
60 "../../../3rd_party/pyav/:.:../../python_modules:../"
61 "../python_module_sdk",
62 1);
63 Py_Initialize();
64 JsonParam graph_config;
65 graph_config.load("../../files/graph.json");
66 std::vector<JsonParam> node_jsons;
67 graph_config.get_object_list("nodes", node_jsons);
68 std::shared_ptr<PythonModule> python_module;
69 std::cout << node_jsons[0].dump() << std::endl;
70 create_python_module(node_jsons[0], python_module);
71 std::vector<int> input_labels;
72 std::vector<int> output_labels;
73 output_labels.push_back(0);
74 Task task = Task(0, input_labels, output_labels);
75
76 python_module->process(task);
77}
78
79void thread_decode(std::shared_ptr<PythonModule> decoder_module2) {
80 // setenv("PYTHONPATH",

Callers

nothing calls this directly

Calls 10

create_python_moduleFunction · 0.85
get_python_module_infoFunction · 0.85
get_object_listMethod · 0.80
clearMethod · 0.80
fill_input_packetMethod · 0.80
loadMethod · 0.45
dumpMethod · 0.45
processMethod · 0.45

Tested by

no test coverage detected