process the Video
190256
public function process($LogFile = false, $runAfterProcess = true){
            
		if(!$LogFile) $LogFile = $this->getLogFile();
            
        if($this->ProcessingStatus == 'new'){
			$this->ProcessingStatus = 'processing';
            $this->write();
                
            $this->appendLog($LogFile, "Processing for File ".$this->getRelativePath()." started");
            
			try{
				// Movie Object
				$ffprobe = FFMpeg\FFProbe::create();
				$mov = $ffprobe->format($this->getFullPath());
				//$ffmpeg = FFMpeg\FFMpeg::create();
				//$video = $ffmpeg->open($this->getFullPath());
				//$video->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(10))->save($this->getFullPath().'.jpg');
			} catch (Exception $ex) {
				$Message = "ERROR ON - FFProbe:";
				$this->appendLog($LogFile, $Message, $ex->getMessage());
                
				$this->ProcessingStatus = 'error';
				$this->write();
                
				return false;
			}
                
            // read data
            if($this->processVideoInformation($mov, $LogFile)){
				// private Information returned no error
                $result = $this->extractTimelineImages($mov, $LogFile);
				
				if($result && $runAfterProcess && $this->ProcessingStatus == 'finished') $this->onAfterProcess();
				
				return $result;
            }else{
				return false;
			}
        }else{
			$this->appendLog($LogFile, "File allready processed");
			return false; 
        }
    }
340782
public function process()
    {
        foreach ($this->exports as $name => $url) {
            $this->addButton(self::BTN_RIGHT_TOP, $name, $url, 'lego-export-' . $name);
        }

        if (count($this->batches())) {
            LegoAssets::js('components/vue/dist/vue.min.js');
            LegoAssets::js('js/batch.js');
        }

        $this->paginator();
    }
333887
function _process( content ) {
    var reg = /((?:\/\/.*?\n)|(?:\/\*[\s\S]*?\*\/))|(?:@import\s([\s\S]*?)(?:\n|$)(?!\s+[^{@]*\n))/ig;
    // var reg = /@import[\s\S]*?;/ig;
    var rUrl = /^url/i;
    var rEnd = /;$/;

    content = fixLineBreak( content );

    return content.replace( reg, function( all, comments, value ) {
        var files;

        value = value ? value.trim().replace( rEnd, '' ) : '';

        // If it's comments or If the @import has any media queries.
        if ( comments || /('|").*?\1\s+[^'"]+$/.exec(value) ) {
            return all;
        }

        files = value.split(/\s*,?\s+/m).map(function( value ) {
            var quote = '',
                match;

            value = value.trim();
            match = /^('|")(.*)\1$/.exec( value );

            if ( match ) {
                value = match[ 2 ];
                quote = match[ 1 ];
            }

            // If the file’s extension is .css.
            if ( /\.css$/i.exec( value ) ||

                // If the filename begins with http://.
                /^http/i.exec( value ) ||

                // If the filename is a url().
                /^url/i.exec( value ) ) {
                return '@import ' + quote + value + quote + ';';
            }

            return map.wrap( value );
        });

        return files.join('\n');
    });
}
269854
private void processQueue() {
        CachedEvent cachedEvent;
        try {
            IRTMPEvent event = null;
            RTMPMessage message = null;
            // get first event in the queue
            cachedEvent = queue.poll();
            if (cachedEvent != null) {
                // get the data type
                final byte dataType = cachedEvent.getDataType();
                // get the data
                IoBuffer buffer = cachedEvent.getData();
                // get the current size of the buffer / data
                int bufferLimit = buffer.limit();
                if (bufferLimit > 0) {
                    // create new RTMP message and push to the consumer
                    switch (dataType) {
                        case Constants.TYPE_AGGREGATE:
                            event = new Aggregate(buffer);
                            event.setTimestamp(cachedEvent.getTimestamp());
                            message = RTMPMessage.build(event);
                            break;
                        case Constants.TYPE_AUDIO_DATA:
                            event = new AudioData(buffer);
                            event.setTimestamp(cachedEvent.getTimestamp());
                            message = RTMPMessage.build(event);
                            break;
                        case Constants.TYPE_VIDEO_DATA:
                            event = new VideoData(buffer);
                            event.setTimestamp(cachedEvent.getTimestamp());
                            message = RTMPMessage.build(event);
                            break;
                        default:
                            event = new Notify(buffer);
                            event.setTimestamp(cachedEvent.getTimestamp());
                            message = RTMPMessage.build(event);
                            break;
                    }
                    // push it down to the recorder
                    recordingConsumer.pushMessage(null, message);
                } else if (bufferLimit == 0 && dataType == Constants.TYPE_AUDIO_DATA) {
                    log.debug("Stream data size was 0, sending empty audio message");
                    // allow for 0 byte audio packets
                    event = new AudioData(IoBuffer.allocate(0));
                    event.setTimestamp(cachedEvent.getTimestamp());
                    message = RTMPMessage.build(event);
                    // push it down to the recorder
                    recordingConsumer.pushMessage(null, message);
                } else {
                    log.debug("Stream data size was 0, recording pipe will not be notified");
                }
            }
        } catch (Exception e) {
            log.warn("Exception while pushing to consumer", e);
        }
    }
414727
function Video (data) {
    const autoPlay = data.attr.autoPlay
    const playStatus = data.attr.playStatus
    this.autoPlay = autoPlay === true || autoPlay === 'true'
    if (playStatus !== 'play'
        && playStatus !== 'stop'
        && playStatus !== 'pause') {
      this.playStatus = 'pause'
    }
    else {
      this.playStatus = playStatus
    }
    Atomic.call(this, data)
  }
412601
@Override public void render() {
    Video video = getContent();
    renderThumbnail(video);
    renderTitle(video);
    renderMarker(video);
    renderLabel();
  }
1270423
function (param, options, callback) {
              embedProcessor.log(param.worker + ' started with parameters = ', param);
              if (param.url.match(/\/channel\//) === null) {
                var video_id = param.url.split('/').pop();
                var api_url = '//api.ustream.tv/json/video/' + video_id + '/getInfo?key=CA8D42389DA4266B9489912DE63A817F&callback=?';
                $.getJSON(api_url, function (data) {
                  if (data) {
                    param.status = true;
                    param.duration = data.lengthInSecond;
                    param.duration_formatted = false;
                    param.thumbnail_url = data.imageUrl.medium || data.imageUrl.small || '';
                    param.title = data.title || '';
                    param.description = data.description || '';
                    param.rating = data.rating || '';
                    param.numberOf = data.numberOf || '';
                    param.html = data.embedTag;
                    if (embedProcessor._sources[param.source] && embedProcessor._sources[param.source].prepareEmbedCode) {
                      param = embedProcessor._sources[param.source].prepareEmbedCode(param);
                    }
                    param = embedProcessor._paramEmbedCodeNormalizer(param);
                  } else {
                    param.status = false;
                  }
                  embedProcessor.log(param.worker + ' receive parameters = ', param);
                  callback(param);
                });
              } else {
                this.embedly(param, options, callback);
              }
            }
556364
private void renderThumbnail(Video video) {
    Picasso.with(getContext()).cancelRequest(thumbnail);
    Picasso.with(getContext())
        .load(video.getThumbnail())
        .placeholder(R.drawable.placeholder)
        .into(thumbnail);
  }
89095
def _ProcessImage(self, tag, wall_time, step, image):
    """"""
    event = ImageEvent(wall_time=wall_time,
                       step=step,
                       encoded_image_string=image.encoded_image_string,
                       width=image.width,
                       height=image.height)
    self.images.AddItem(tag, event)
522275
def clean_video_data(_data):
    

    data = _data.copy()

    # TODO: fix this ugliness
    title = data.get('title')
    if title:
        data['title'] = clean_title(title)

    return data
8156
public function process()
    {
        parent::process();

        $data = $this->getForm()->getFormData();

        $this->crop_width = $data[$this->id . '_width'];
        $this->crop_height = $data[$this->id . '_height'];
        $this->crop_left = $data[$this->id . '_x'];
        $this->crop_top = $data[$this->id . '_y'];

        // deprecated aliases
        $this->crop_box_width = $this->crop_width;
        $this->crop_box_height = $this->crop_height;
        $this->crop_box_left = $this->crop_left;
        $this->crop_box_top = $this->crop_top;
    }
1170516
def parseRtspReply(self, data):
    print("Parsing Received Rtsp data...")

    """"""
    lines = data.split('\n')
    seqNum = int(lines[1].split(' ')[1])

    # Process only if the server reply's sequence number is the same as the request's
    if seqNum == self.rtspSeq:
      session = int(lines[2].split(' ')[1])
      # New RTSP session ID
      if self.sessionId == 0:
        self.sessionId = session

      # Process only if the session ID is the same
      if self.sessionId == session:
        if int(lines[0].split(' ')[1]) == 200:
          if self.requestSent == self.SETUP:
            #-------------
            # TO COMPLETE
            #-------------
            # Update RTSP state.
            print("Updating RTSP state...")
            # self.state = ...
            self.state = self.READY
            # Open RTP port.
            #self.openRtpPort()
            print("Setting Up RtpPort for Video Stream")
            self.openRtpPort()

          elif self.requestSent == self.PLAY:
             self.state = self.PLAYING
             print('-'*60 + "\nClient is PLAYING...\n" + '-'*60)
          elif self.requestSent == self.PAUSE:
             self.state = self.READY

            # The play thread exits. A new thread is created on resume.
             self.playEvent.set()

          elif self.requestSent == self.TEARDOWN:
            # self.state = ...

            # Flag the teardownAcked to close the socket.
            self.teardownAcked = 1
1171347
public function process()
    {
        parent::process();

        // The $_FILES[$this->id] array is always set unless the POST data
        // was greater than the PHP's post_max_size ini setting.
        if (!isset($_FILES[$this->id]) || !$this->isSensitive()) {
            return;
        }

        if ($_FILES[$this->id]['error'] === UPLOAD_ERR_OK) {
            $this->file = $_FILES[$this->id];

            if (!$this->hasValidMimeType()) {
                $this->addMessage($this->getValidationMessage('mime-type'));
            }
        } elseif ($_FILES[$this->id]['error'] === UPLOAD_ERR_NO_FILE) {
            if ($this->required) {
                $this->addMessage($this->getValidationMessage('required'));
            }
        } elseif (
            $_FILES[$this->id]['error'] === UPLOAD_ERR_INI_SIZE ||
            $_FILES[$this->id]['error'] === UPLOAD_ERR_FORM_SIZE
        ) {
            $this->addMessage($this->getValidationMessage('too-large'));
        } else {
            // There are other status codes we may want to check for in the
            // future. Upload status codes can be found here:
            // http://php.net/manual/en/features.file-upload.errors.php
            $this->addMessage($this->getValidationMessage('upload-error'));
        }
    }
266355
def process(self):
        '''
        '''
        self._item_session.request = request = Request(self._item_session.url_record.url)
        verdict = self._fetch_rule.check_ftp_request(self._item_session)[0]

        if not verdict:
            self._item_session.skip()
            return

        self._add_request_password(request)

        dir_name, filename = self._item_session.url_record.url_info.split_path()
        if self._processor.fetch_params.glob and frozenset(filename) & GLOB_CHARS:
            request = self._to_directory_request(request)
            is_file = False
            self._glob_pattern = urllib.parse.unquote(filename)
        else:
            is_file = yield from self._prepare_request_file_vs_dir(request)

            self._file_writer_session.process_request(request)

        wait_time = yield from self._fetch(request, is_file)

        if wait_time:
            _logger.debug('Sleeping {0}.', wait_time)
            yield from asyncio.sleep(wait_time)
122955
def handle_type(self, frames):
        
        if self.vtype == 'mouth':
            self.process_frames_mouth(frames)
        elif self.vtype == 'face':
            self.process_frames_face(frames)
        else:
            raise Exception('Video type not found')
47503
def video(query, opts = {})
      invoke 'Video',
        query,
        opts,
        passthrough_opts: %i(filters sort),
        enum_opt_to_module: {filters: VideoFilter, sort: VideoSort},
        param_name_replacements: {filters: 'VideoFilters', sort: 'VideoSortBy'}
    end
1082228
def _process_media_status(self, data):
        
        self.status.update(data)

        self.logger.debug("Media:Received status %s", data)

        # Update session active threading event
        if self.status.media_session_id is None:
            self.session_active_event.clear()
        else:
            self.session_active_event.set()

        self._fire_status_changed()