Start recording camera and tracked controls.
192648
function () {
    var trackedControllerEls = this.trackedControllerEls;
    var self = this;

    if (this.isRecording) { return; }

    log('Starting recording!');

    if (this.el.components['avatar-replayer']) {
      this.el.components['avatar-replayer'].stopReplaying();
    }

    // Get camera.
    this.setupCamera(function cameraSetUp () {
      self.isRecording = true;
      // Record camera.
      self.cameraEl.components['motion-capture-recorder'].startRecording();
      // Record tracked controls.
      Object.keys(trackedControllerEls).forEach(function startRecordingController (id) {
        trackedControllerEls[id].components['motion-capture-recorder'].startRecording();
      });
    });
  }
1168745
private void setUpAndConfigureCamera() {
		// Open and configure the camera
		mCamera = openConfigureCamera(mCameraInfo);
		setCameraDisplayOrientation(mCameraInfo,mCamera);

		// Create an instance of Camera
		mPreview.setCamera(mCamera);

		if( processing != null ) {
			processing.init(mDraw,mCamera,mCameraInfo,previewRotation);
		}
	}
528979
function () {
    var self = this;
    var trackedControllerEls = this.el.querySelectorAll('[tracked-controls]');
    this.trackedControllerEls = {};
    trackedControllerEls.forEach(function setupController (trackedControllerEl) {
      if (!trackedControllerEl.id) {
        warn('Found a tracked controller entity without an ID. ' +
             'Provide an ID or this controller will not be recorded');
        return;
      }
      trackedControllerEl.setAttribute('motion-capture-recorder', {
        autoRecord: false,
        visibleStroke: false
      });
      self.trackedControllerEls[trackedControllerEl.id] = trackedControllerEl;
      if (self.isRecording) {
        trackedControllerEl.components['motion-capture-recorder'].startRecording();
      }
    });
  }
412207
public void start() {
    try {
      if (null == recorder) {
        recorder = new MediaRecorder();
        recorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
        recorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT);
        recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
        recorder.setOutputFile(this.localPath);
        recorder.prepare();
      } else {
        recorder.reset();
        recorder.setOutputFile(this.localPath);
      }
      recorder.start();
      startRecordTime = System.currentTimeMillis();
      if (null != this.listener) {
        this.listener.onStartRecord();
      }
    } catch (IOException ex) {
      LOGGER.e("failed to start MediaRecorder. cause: ", ex);
    }
  }
93596
def on_train_begin(self, **kwargs):
        ""
        if not getattr(self,'opt_gen',None):
            self.opt_gen = self.opt.new([nn.Sequential(*flatten_model(self.generator))])
        else: self.opt_gen.lr,self.opt_gen.wd = self.opt.lr,self.opt.wd
        if not getattr(self,'opt_critic',None):
            self.opt_critic = self.opt.new([nn.Sequential(*flatten_model(self.critic))])
        else: self.opt_critic.lr,self.opt_critic.wd = self.opt.lr,self.opt.wd
        self.gen_mode = self.gen_first
        self.switch(self.gen_mode)
        self.closses,self.glosses = [],[]
        self.smoothenerG,self.smoothenerC = SmoothenValue(self.beta),SmoothenValue(self.beta)
        #self.recorder.no_val=True
        self.recorder.add_metric_names(['gen_loss', 'disc_loss'])
        self.imgs,self.titles = [],[]
955561
function () {
    var spectatorCameraEl = this.spectatorCameraEl;

    if (!spectatorCameraEl) {
      this.el.addEventListener('spectatorcameracreated',
                               bind(this.activateSpectatorCamera, this));
      return;
    }

    if (!spectatorCameraEl.hasLoaded) {
      spectatorCameraEl.addEventListener('loaded', bind(this.activateSpectatorCamera, this));
      return;
    }

    log('Activating spectator camera');
    spectatorCameraEl.setAttribute('camera', 'active', true);
    this.cameraEl.getObject3D('replayerMesh').visible = true;
  }
1153693
public synchronized void startPreview() {
    OpenCamera theCamera = camera;
    if (theCamera != null && !previewing) {
      theCamera.getCamera().startPreview();
      previewing = true;
      autoFocusManager = new AutoFocusManager(context, theCamera.getCamera());
    }
  }
32269
public void start() {

		// if configured to not start, then simply return

		if (!enabled.get()) {
			LOG.info("Discovery service has been disabled and thus it will not be started");
			return;
		}

		// capture driver does not support discovery - nothing to do

		if (support == null) {
			LOG.info("Discovery will not run - driver {} does not support this feature", driver.getClass().getSimpleName());
			return;
		}

		// return if already running

		if (!running.compareAndSet(false, true)) {
			return;
		}

		// start discovery service runner

		runner = new Thread(this, "webcam-discovery-service");
		runner.setUncaughtExceptionHandler(WebcamExceptionHandler.getInstance());
		runner.setDaemon(true);
		runner.start();
	}
613845
def start_chart(self):
        """"""
        self.current_dataset_name = self.chart_name
        self.datafile.init_data(self.current_dataset_name, mode='continuous')
        self.chart_name = increment_title(self.chart_name)
        
        # stimulus tracker channel hard-coded at least chan for now
        self.player.start_continuous([self.aichan, u"PCI-6259/ai31"])
389885
public void startRecording() {
        if (mState != STATE.INITIALIZED) {
            Log.e(TAG, "startRecording called in invalid state. Ignoring");
            return;
        }
        synchronized (mReadyForFrameFence) {
            mFrameNum = 0;
            mRecording = true;
            mState = STATE.RECORDING;
        }
    }
1304849
public void start() {
        if (TransitionConfig.isDebug()) {
            getTransitionStateHolder().start();
        }

        mLastProgress = Float.MIN_VALUE;

        TransitionController transitionController;
        for (int i = 0, size = mTransitionControls.size(); i < size; i++) {
            transitionController = mTransitionControls.get(i);
            if (mInterpolator != null) {
                transitionController.setInterpolator(mInterpolator);
            }
            //required for ViewPager transitions to work
            if (mTarget != null) {
                transitionController.setTarget(mTarget);
            }
            transitionController.setUpdateStateAfterUpdateProgress(mUpdateStateAfterUpdateProgress);
            transitionController.start();
        }
    }
1135380
public void startWatching() {
        try {
            final List<MonitorLine> lines = getSource().getLastLine(getInitialCount());
            actual = null;
            updateLines(lines);
        } catch (Exception e) {
            notifyObservers(e);
        }
    }
1114610
def start(self):
        
        self._sensor = cv2.VideoCapture(self._device_id)
        if not self._sensor.isOpened():
            raise Exception("Unable to open OpenCVCameraSensor for id {0}".format(self._device_id))
        self.flush()
1194881
def start_capture(self):
        """"""
        previous_map_tool = self.canvas.mapTool()
        if previous_map_tool != self.tool:
            self.previous_map_tool = previous_map_tool
        self.canvas.setMapTool(self.tool)
        self.hide()
1328995
def start(self):
        
        # open device
        openni2.initialize(PrimesenseSensor.OPENNI2_PATH)
        self._device = openni2.Device.open_any()

        # open depth stream
        self._depth_stream = self._device.create_depth_stream()
        self._depth_stream.configure_mode(PrimesenseSensor.DEPTH_IM_WIDTH,
                                          PrimesenseSensor.DEPTH_IM_HEIGHT,
                                          PrimesenseSensor.FPS,
                                          openni2.PIXEL_FORMAT_DEPTH_1_MM) 
        self._depth_stream.start()

        # open color stream
        self._color_stream = self._device.create_color_stream()
        self._color_stream.configure_mode(PrimesenseSensor.COLOR_IM_WIDTH,
                                          PrimesenseSensor.COLOR_IM_HEIGHT,
                                          PrimesenseSensor.FPS,
                                          openni2.PIXEL_FORMAT_RGB888) 
        self._color_stream.camera.set_auto_white_balance(self._auto_white_balance)
        self._color_stream.camera.set_auto_exposure(self._auto_exposure)
        self._color_stream.start()

        # configure device
        if self._registration_mode == PrimesenseRegistrationMode.DEPTH_TO_COLOR:
            self._device.set_image_registration_mode(openni2.IMAGE_REGISTRATION_DEPTH_TO_COLOR)
        else:
            self._device.set_image_registration_mode(openni2.IMAGE_REGISTRATION_OFF)

        self._device.set_depth_color_sync_enabled(self._enable_depth_color_sync)

        self._running = True
559255
def setupMovie(self):
    """"""
    if self.state == self.INIT:
      self.sendRtspRequest(self.SETUP)
1129532
def maybe_start_recording(tokens, index):
        """"""
        if _is_begin_quoted_type(tokens[index].type):
            string_type = _get_string_type_from_token(tokens[index].type)
            return _MultilineStringRecorder(index, string_type)

        return None