# - RTSP : 'rtsp://sample.url/feed_address' # - hardware video source: 'dev:///dev/video0' for *nix /dev/video0 device # - local file: 'file://c/dir/file.mp4' for WIN and 'file:///dir/file.mp4' for *nix # - RTMP live streams: 'rtmp://sample.url/app/session' SRC_FEED = 'dev:///dev/video0' # Advanced configuration. Normally you should not edit these values. HOSTS = { # CM server address 'cm': 'cam.skyvr.videoexpertsgroup.com', } """ End of configuration section """ globals.init_config() cm_registration_required = not globals.config.get('connection_id', '') or \ globals.config.get('server_hostname', '') != HOSTS['cm'] cm_registered = False if cm_registration_required: if REG_TOKEN: globals.config['reg_token'] = REG_TOKEN else: raise RuntimeError('Configuration error: Please specify REG_TOKEN') globals.config['camera_feed'] = SRC_FEED globals.config['server_hostname'] = HOSTS['cm'] globals.config['connection_id'] = "" globals.config['camera_uuid'] = "" globals.config.write()
import globals from games.connect4 import configuration globals.init_config(configuration) import training from games.connect4 import connect4 if __name__ == '__main__': training.main_az(connect4.Connect4Board)
# - RTSP : 'rtsp://sample.url/feed_address' # - hardware video source: 'dev:///dev/video0' for *nix /dev/video0 device # - local file: 'file://c/dir/file.mp4' for WIN and 'file:///dir/file.mp4' for *nix # - RTMP live streams: 'rtmp://sample.url/app/session' SRC_FEED = 'dev:///dev/video0' # Advanced configuration. Normally you should not edit these values. HOSTS = { # CM server address 'cm': 'cam.skyvr.videoexpertsgroup.com', } """ End of configuration section """ globals.init_config() cm_registration_required = not globals.config.get('connection_id', '') or \ globals.config.get('server_hostname', '') != HOSTS['cm'] cm_registered = False if cm_registration_required: if REG_TOKEN: globals.config['reg_token'] = REG_TOKEN else: raise RuntimeError('Configuration error: Please specify REG_TOKEN') globals.config['camera_feed'] = SRC_FEED globals.config['server_hostname'] = HOSTS['cm'] globals.config['connection_id'] = "" globals.config['camera_uuid'] = "" globals.config.write()