Version for recording ... don't trigger a scan!
432023
protected AnnotationTargetsImpl_PolicyData doGetPolicyData(ScanPolicy policy) {

        if (policy == ScanPolicy.SEED) {
            return seedData;

        } else if (policy == ScanPolicy.PARTIAL) {
            return partialData;

        } else if (policy == ScanPolicy.EXCLUDED) {
            return excludedData;

        } else if (policy == ScanPolicy.EXTERNAL) {
            return externalData;

        } else {
            throw new IllegalArgumentException("Policy [ " + policy + " ]");
        }
    }
946113
public boolean check() throws Exception {
        // create a temporary copy from input
        File fileCopy = File.createTempFile("modeshape-sequencer-video", ".tmp");
        IoUtil.write(in, new BufferedOutputStream(new FileOutputStream(fileCopy)));

        final Demuxer container = Demuxer.make();
        container.open(fileCopy.getAbsolutePath(), null, false, true, null, null);

        // try to delete the file immediately or on JVM exit
        boolean deleted = false;
        try {
            deleted = fileCopy.delete();
        } catch (SecurityException e) {
            // ignore
        }
        if (!deleted) {
            fileCopy.deleteOnExit();
        }

        KeyValueBag metadata = container.getMetaData();
        for (String key : metadata.getKeys()) {
            if (key.toLowerCase(Locale.ROOT).equals("title")) {
                title = metadata.getValue(key);
            }
            if (key.toLowerCase(Locale.ROOT).equals("comment")) {
                comment = metadata.getValue(key);
            }
            if (key.toLowerCase(Locale.ROOT).equals("encoder")) {
                encoder = metadata.getValue(key);
            }
        }

        if (container.getDuration() != Global.NO_PTS) {
            // convert to seconds
            duration = (float) container.getDuration() / 1000.0 / 1000.0;
        }
        if (container.getBitRate() > 0) {
            bitrate = container.getBitRate();
        }

        for (int i = 0; i < container.getNumStreams(); i++) {
            StreamMetadata streamMetadata = new StreamMetadata();
            DemuxerStream stream = container.getStream(i);

            Decoder coder = stream.getDecoder();

            if (coder.getCodecType() == Type.MEDIA_AUDIO) {
                streamMetadata.setStreamType("audio");
            } else if (coder.getCodecType() == Type.MEDIA_VIDEO) {
                streamMetadata.setStreamType("video");
            } else {
                streamMetadata.setStreamType("unknown");
            }

            if (coder.getCodec() != null) {
                streamMetadata.setCodec(coder.getCodec().getName());
            }
            streamMetadata.setSamplerate(nullValueIfInvalid(coder.getSampleRate()));
            streamMetadata.setChannels(nullValueIfInvalid(coder.getChannels()));
            streamMetadata.setWidth(nullValueIfInvalid(coder.getWidth()));
            streamMetadata.setHeight(nullValueIfInvalid(coder.getHeight()));
            if (coder.getTimeBase() != null) {
                streamMetadata.setFramerate(nullValueIfInvalid(1.0 / coder.getTimeBase().getDouble()));
            }
            streams.add(streamMetadata);
        }
        container.close();
        return true;
    }
741609
def record(self, rr_version):
        # type: (str) -> bytes
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('PX record not yet initialized!')

        outlist = [b'PX', struct.pack('=BBLLLLLLLL', RRPXRecord.length(rr_version),
                                      SU_ENTRY_VERSION, self.posix_file_mode,
                                      utils.swab_32bit(self.posix_file_mode),
                                      self.posix_file_links,
                                      utils.swab_32bit(self.posix_file_links),
                                      self.posix_user_id,
                                      utils.swab_32bit(self.posix_user_id),
                                      self.posix_group_id,
                                      utils.swab_32bit(self.posix_group_id))]
        if rr_version == '1.12':
            outlist.append(struct.pack('=LL', self.posix_serial_number,
                                       utils.swab_32bit(self.posix_serial_number)))
        # The rr_version can never be "wrong" at this point; if it was, it would
        # have thrown an exception earlier when calling length().  So just skip
        # any potential checks here.

        return b''.join(outlist)
1030381
def skip():
	""""""

	if not settings.platformCompatible():
		return False

	(output, error) = subprocess.Popen(["osascript", "-e", SKIP], stdout=subprocess.PIPE).communicate()
1294629
def disable_reporting(self):
        """"""
        if self.type == ANALOG:
            self.reporting = False
            msg = bytearray([REPORT_ANALOG + self.pin_number, 0])
            self.board.sp.write(msg)
        else:
            self.port.disable_reporting()
666361
public void disable() {
		if (disabled.compareAndSet(false, true)) {
			LOG.info("Locking mechanism has been disabled in {}", webcam);
			if (updater != null) {
				updater.interrupt();
			}
		}
	}
980290
private void cancelScan() {
        if (cleanTask != null) {
            cleanTask.cancel(true);
            cleanTask = null;
        }
        client.close();
    }
1297794
def _post_md5_skip_on_check(self, key, md5_match):
        # type: (Uploader, str, bool) -> None
        
        with self._md5_meta_lock:
            src, rfile = self._md5_map.pop(key)
        uid = blobxfer.operations.upload.Uploader.create_unique_id(src, rfile)
        if md5_match:
            with self._upload_lock:
                self._upload_set.remove(uid)
                self._upload_total -= 1
            if self._general_options.dry_run:
                logger.info('[DRY RUN] MD5 match, skipping: {} -> {}'.format(
                    src.absolute_path, rfile.path))
        else:
            if self._general_options.dry_run:
                with self._upload_lock:
                    self._upload_set.remove(uid)
                    self._upload_total -= 1
                logger.info('[DRY RUN] MD5 mismatch, upload: {} -> {}'.format(
                    src.absolute_path, rfile.path))
            else:
                self._add_to_upload_queue(src, rfile, uid)
431136
function () {
    var self = this;

    if (!this.isReplaying || !this.replayData) { return; }

    this.isReplaying = false;
    Object.keys(this.replayData).forEach(function removeReplayer (key) {
      if (key === 'camera') {
        self.cameraEl.removeComponent('motion-capture-replayer');
      } else {
        el = document.querySelector('#' + key);
        if (!el) {
          warn('No element with id ' + key);
          return;
        }
        el.removeComponent('motion-capture-replayer');
      }
    });
  }
1049262
def reset_scan_stats(self):
        """"""
        self._scan_event_count = 0
        self._v1_scan_count = 0
        self._v1_scan_response_count = 0
        self._v2_scan_count = 0
        self._device_scan_counts = {}
        self._last_reset_time = time.time()
633826
def emitRecordMiddleDoubleClicked(self, item):
        
        # emit that the record has been double clicked
        if isinstance(item, XOrbRecordItem) and not self.signalsBlocked():
            self.recordMiddleDoubleClicked.emit(item.record())
1204446
def cancel_grab(self):
        
        logger.debug("User canceled hotkey recording.")
        self.recording_finished.emit(True)
        self._setKeyLabel(self.key if self.key is not None else "(None)")
912086
@Override
    public void stopRecording() {
        super.stopRecording();
        mSentBroadcastLiveEvent = false;
        if (mStream != null) {
            if (VERBOSE) Log.i(TAG, "Stopping Stream");
            mKickflip.stopStream(mStream, new KickflipCallback() {
                @Override
                public void onSuccess(Response response) {
                    if (VERBOSE) Log.i(TAG, "Got stop stream response " + response);
                }

                @Override
                public void onError(KickflipException error) {
                    Log.w(TAG, "Error getting stop stream response! " + error);
                }
            });
        }
    }
123801
def disable_snapshots(self, volume_id, schedule_type):
        

        return self.client.call('Network_Storage', 'disableSnapshots',
                                schedule_type, id=volume_id)
510475
def unscan
      raise ScanError, 'unscan failed: previous match record not exist' if @history.empty?
      previous = @history[0..-2]
      reset
      previous.each { |r| track_result(*r) }
      self
    end
315311
def stop_move_recorder(self, move_name):
        """"""
        recorder = getattr(self.robot, '_{}_recorder'.format(move_name))
        recorder.stop()
        with open('{}.record'.format(move_name), 'w') as f:
            recorder.move.save(f)

        # Stop player if running : to discuss
        # Recording a playing move can produce strange outputs, but could be a good feature
        try:
            player = getattr(self.robot, '_{}_player'.format(move_name))
            if player.running:
                player.stop()
        except AttributeError:
            pass
1135360
def set_recording(is_recording): #pylint: disable=redefined-outer-name
    
    prev = ctypes.c_int()
    check_call(_LIB.MXAutogradSetIsRecording(
        ctypes.c_int(is_recording), ctypes.byref(prev)))
    return bool(prev.value)