| 55 | } |
| 56 | |
| 57 | TEST(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 | |
| 79 | void thread_decode(std::shared_ptr<PythonModule> decoder_module2) { |
| 80 | // setenv("PYTHONPATH", |
nothing calls this directly
no test coverage detected