def exec_operation(self, cmd): "Execute graph function" err = 0 if cmd.compobj == opcomp(_nvcamera_v1.camobj_graph, _nvcamera_v1.cop_close): _nvcamera_v1.graph_close(_graphData) elif cmd.compobj == opcomp(_nvcamera_v1.camobj_graph, _nvcamera_v1.cop_preview): err = _nvcamera_v1.graph_preview(cmd, _graphData) elif cmd.compobj == opcomp(_nvcamera_v1.camobj_graph, _nvcamera_v1.cop_still): err = _nvcamera_v1.graph_still(cmd, _graphData) elif cmd.compobj == opcomp(_nvcamera_v1.camobj_graph, _nvcamera_v1.cop_video): err = _nvcamera_v1.graph_video(cmd, _graphData) elif cmd.compobj == opcomp(_nvcamera_v1.camobj_graph, _nvcamera_v1.cop_audio): err = _nvcamera_v1.graph_audio(cmd, _graphData) elif cmd.compobj == opcomp(_nvcamera_v1.camobj_graph, _nvcamera_v1.cop_set_imager): err = _nvcamera_v1.graph_set_imager(cmd, _graphData) elif cmd.compobj == opcomp(_nvcamera_v1.camobj_graph, _nvcamera_v1.cop_run): err = _nvcamera_v1.graph_open(_graphData, _nvcamera_v1.GraphType_OMX) if err != _nvcamera_v1.NvError_Success: graph_close(_graphData) else: err = _graphData.run(_graphData, cmd) else: err = _graphData.run(_graphData, cmd) return err
def graph_audio(*args): return _nvcamera_v1.graph_audio(*args)