parameters: (self)
docstring: Selects the monitor resolution whose width is the immediately higher than the stitcher resolution
docstring_summary: Selects the monitor resolution whose width is the immediately higher than the stitcher resolution
docstring_tokens: Selects the monitor resolution whose width is the immediately higher than the stitcher resolution
function: def _select_video_mode(self):
          """ Selects the monitor resolution whose width is the immediately higher than the stitcher resolution
          """
          resolutions = list(reversed(glfw.get_video_modes(self.monitor)))
          self.video_mode = None
          for refresh_rate in [30, 29, 60, 59]:
              for resolution in resolutions:
                  if resolution[0][0] < self.width:
                      break
                  if resolution[2] == refresh_rate:
                      self.video_mode = resolution
              if self.video_mode:
                  break
  
          if not self.video_mode:
              logger.info("No matching resolution found, using highest available")
              self.video_mode = resolutions[0]
  
          mode = str(self.video_mode[0][0]) + "x" + str(self.video_mode[0][1])
          rate = str(self.video_mode[2])
          subprocess.call(["xrandr", "--output", glfw.get_monitor_name(self.monitor), "--mode", mode, "--rate", rate])
          time.sleep(1)
function_tokens: def _select_video_mode ( self ) : resolutions = list ( reversed ( glfw . get_video_modes ( self . monitor ) ) ) self . video_mode = None for refresh_rate in [ 30 , 29 , 60 , 59 ] : for resolution in resolutions : if resolution [ 0 ] [ 0 ] < self . width : break if resolution [ 2 ] == refresh_rate : self . video_mode = resolution if self . video_mode : break if not self . video_mode : logger . info ( "No matching resolution found, using highest available" ) self . video_mode = resolutions [ 0 ] mode = str ( self . video_mode [ 0 ] [ 0 ] ) + "x" + str ( self . video_mode [ 0 ] [ 1 ] ) rate = str ( self . video_mode [ 2 ] ) subprocess . call ( [ "xrandr" , "--output" , glfw . get_monitor_name ( self . monitor ) , "--mode" , mode , "--rate" , rate ] ) time . sleep ( 1 )