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