parameters: ()
docstring: Print information about all  available devices
docstring_summary: Print information about all  available devices
docstring_tokens: Print information about all available devices
function: def list_devices():
      """
      Print information about all  available devices
      """
  
      sample_pipeline = Gst.parse_launch("tcambin name=source ! fakesink")
  
      if not sample_pipeline:
          print("Unable to create pipeline")
          sys.exit(1)
  
      source = sample_pipeline.get_by_name("source")
  
      serials = source.get_device_serials_backend()
  
      for single_serial in serials:
  
          # This returns someting like:
          # (True,
          #  name='DFK Z12GP031',
          #  identifier='The Imaging Source Europe GmbH-11410533',
          #  connection_type='aravis')
          # The identifier is the name given by the backend
          # The connection_type identifies the backend that is used.
          #     Currently 'aravis', 'v4l2', 'libusb' and 'unknown' exist
          (return_value, model,
           identifier, connection_type) = source.get_device_info(single_serial)
  
          # return value would be False when a non-existant serial is used
          # since we are iterating get_device_serials this should not happen
          if return_value:
  
              print("Model: {} Serial: {} Type: {}".format(model,
                                                           single_serial,
                                                           connection_type))
function_tokens: def list_devices ( ) : sample_pipeline = Gst . parse_launch ( "tcambin name=source ! fakesink" ) if not sample_pipeline : print ( "Unable to create pipeline" ) sys . exit ( 1 ) source = sample_pipeline . get_by_name ( "source" ) serials = source . get_device_serials_backend ( ) for single_serial in serials : # This returns someting like: # (True, #  name='DFK Z12GP031', #  identifier='The Imaging Source Europe GmbH-11410533', #  connection_type='aravis') # The identifier is the name given by the backend # The connection_type identifies the backend that is used. #     Currently 'aravis', 'v4l2', 'libusb' and 'unknown' exist ( return_value , model , identifier , connection_type ) = source . get_device_info ( single_serial ) # return value would be False when a non-existant serial is used # since we are iterating get_device_serials this should not happen if return_value : print ( "Model: {} Serial: {} Type: {}" . format ( model , single_serial , connection_type ) )