Enable/disable recording.

        Return a coroutine.
321596
def record(self, record=True, tag=None):
        
        path = '/startvideo?force=1' if record else '/stopvideo?force=1'
        if record and tag is not None:
            path = '/startvideo?force=1&tag={}'.format(URL(tag).raw_path)

        return self._request(path)
1030733
def record(self):
        """"""
        if self.recordmetadata:
            return Record(self.recordmetadata.json, model=self.recordmetadata)
        else:
            return None
666361
public void disable() {
		if (disabled.compareAndSet(false, true)) {
			LOG.info("Locking mechanism has been disabled in {}", webcam);
			if (updater != null) {
				updater.interrupt();
			}
		}
	}
948176
function () {
      this.idle();

      delete this.recording;

      this.recording = new Recording({
        timeBetweenLoops:       this.options.timeBetweenLoops,
        loop:                   this.options.loop,
        requestProtocolVersion: this.controller.connection.opts.requestProtocolVersion,
        serviceVersion:         this.controller.connection.protocol.serviceVersion
      });

      this.controller.emit('playback.stop', this);
    }
794549
function stop() {
  var time;
  if(!this.enabled) return false;
  time = this._record.isSlowerThan(this._slowerThan);
  if(this._record && time > -1) {
    this._records.unshift(this._record.toArray(id++, time));
    if(this._records.length >= this._maxLen) {
      this._records.pop();
    }
  }
}
705336
function() {
            if (mediaRecorder && typeof mediaRecorder.clearRecordedData === 'function') {
                mediaRecorder.clearRecordedData();
            }
            mediaRecorder = null;
            setState('inactive');
            self.blob = null;
        }
716301
def stop(self):
        
        self.elapse = time.clock() - self.st
        self.records.append(self.elapse)
952833
def start_record():
    
    global record, playback, current
    if record:
        raise StateError("Already recording.")
    if playback:
        raise StateError("Currently playing back.")
    record = True
    current = ReplayData()
    install(RecordingHTTPConnection, RecordingHTTPSConnection)
623340
def stop_video_recording(self):
        

        self.runner.info_log("Stopping video recording...")

        self.execute_command("./stop_recording.sh")
        # self.runner.info_log("output: %s"%output)

        sleep(5)

        self.scp_file_remote_to_local(
            self.remote_video_recording_file_path,
            self.local_video_recording_file_path
        )
181549
def disable(self, threads=True):
        
        if self.enabled_start:
            sys.settrace(None)
            self._disable()
        else:
            warn('Duplicate "disable" call')
275936
def enable_reporting(self):
        
        if self.status == Stats.ENABLED:
            return
        if not self.enableable:
            logger.critical("Can't enable reporting")
            return
        self.status = Stats.ENABLED
        self.write_config(self.status)
1196694
public void stopRecording(){
        if (currentAudioState.get()== PAUSED_STATE || currentAudioState.get()==RECORDING_STATE){
            currentAudioState.getAndSet(STOPPED_STATE);
            onTimeCompletedTimer.cancel();
            onTimeCompletedTimer=null;
            onTimeCompletionTimerTask=null;
        }
        else{
            Log.w(TAG,"Audio recording is not in a paused or recording state.");
        }
        currentAudioRecordingThread=null;//The existing thread will die out on its own, but not before attempting to convert the file into WAV format.
    }
1127859
def emitCurrentRecordEdited(self):
        
        if self._changedRecord == -1:
            return
        
        if self.signalsBlocked():
            return
        
        record = self._changedRecord
        self._changedRecord = -1
        self.currentRecordEdited.emit(record)
953658
def pauseMovie(self):
    """"""
    if self.state == self.PLAYING:
      self.sendRtspRequest(self.PAUSE)
240672
async def turn_off(self):
        """"""
        _LOGGER.debug("turn_off while %s", self._state)
        if self._state in [State.PLAYING_LIVE_TV, State.PLAYING_RECORDED_TV,
                          State.PLAYING_TIMESHIFT_TV, State.UNKNOWN]:
            await self.send_cmd('Power')
            self._state = State.OFF
        return self._state
1280886
def disable(self):
        """"""
        self.post("disable")
        if self.service.restart_required:
            self.service.restart(120)
        return self
12265
private void notifyRecordingStop() {
        IStreamAwareScopeHandler handler = getStreamAwareHandler();
        if (handler != null) {
            try {
                handler.streamRecordStop(this);
            } catch (Throwable t) {
                log.error("Error in notifyRecordingStop", t);
            }
        }
    }