Process the animation effect for the specified frame number.

        :param frame_no: The index of the frame being generated.
485675
def update(self, frame_no):
        
        if (frame_no >= self._start_frame and
                (self._stop_frame == 0 or frame_no < self._stop_frame)):
            self._update(frame_no)
395369
private void nextFrame(long delta) {
		if (stopped) {
			return;
		}
		if (frames.size() == 0) {
			return;
		}
		
		nextChange -= delta;
		
		while (nextChange < 0 && (!stopped)) {
			if (currentFrame == stopAt) {
				stopped = true;
				break;
			}
			if ((currentFrame == frames.size() - 1) && (!loop) && (!pingPong)) {
	            stopped = true; 
				break;
			}
			currentFrame = (currentFrame + direction) % frames.size();
			
			if (pingPong) {
				if (currentFrame <= 0) {
					currentFrame = 0;
					direction = 1;   
					if (!loop) {            
                        stopped = true;            
                        break;     
                    }       
				}
				else if (currentFrame >= frames.size()-1) {
					currentFrame = frames.size()-1;
					direction = -1;
				}
			}
			int realDuration = (int) (((Frame) frames.get(currentFrame)).duration / speed);
			nextChange = nextChange + realDuration;
		}
	}
1296607
def do_up(self, arg):
        
        if self.curindex == 0:
            self.error('Oldest frame')
            return
        try:
            count = int(arg or 1)
        except ValueError:
            self.error('Invalid frame count (%s)' % arg)
            return
        if count < 0:
            newframe = 0
        else:
            newframe = max(0, self.curindex - count)
        self._select_frame(newframe)
1130419
def frame_apply(obj, func, axis=0, broadcast=None,
                raw=False, reduce=None, result_type=None,
                ignore_failures=False,
                args=None, kwds=None):
    

    axis = obj._get_axis_number(axis)
    if axis == 0:
        klass = FrameRowApply
    elif axis == 1:
        klass = FrameColumnApply

    return klass(obj, func, broadcast=broadcast,
                 raw=raw, reduce=reduce, result_type=result_type,
                 ignore_failures=ignore_failures,
                 args=args, kwds=kwds)
1168092
def _update(self, frame_no):
        """"""
        # Check for any fatal errors from the background thread and quit if we hit anything.
        if self._oops:
            raise RuntimeError(self._oops)

        # Calculate new positions for animated movement.
        self._move_to_desired_location()

        # Re-draw the tiles - if we have any suitable ones downloaded.
        count = 0
        x_offset = self._convert_longitude(self._longitude)
        y_offset = self._convert_latitude(self._latitude)
        if self._tiles:
            # Clear the area first.
            bg = 253 if self._screen.unicode_aware and self._screen.colours >= 256 else 0
            for y in range(self._screen.height):
                self._screen.print_at("." * self._screen.width, 0, y, colour=bg, bg=bg)

            # Now draw all the available tiles.
            count = self._draw_tiles(x_offset, y_offset, bg)

        # Just a few pointers on what the user should do...
        if count == 0:
            self._screen.centre(" Loading - please wait... ", self._screen.height // 2, 1)

        self._screen.centre("Press '?' for help.", 0, 1)
        if _KEY == "":
            footer = "Using local cached data - go to https://www.mapbox.com/ and get a free key."
        else:
            footer = u"Zoom: {} Location: {:.6}, {:.6} Maps: © Mapbox, © OpenStreetMap".format(
                self._zoom, self._longitude, self._latitude)
        self._screen.centre(footer, self._screen.height - 1, 1)

        return count
643107
def current_frame(self, n):
        
        self.sound.seek(n)
        self._current_frame = n
153156
public void jumpToFrame(int targetFrameNumber) {
    if (mAnimationBackend == null || mFrameScheduler == null) {
      return;
    }
    // In order to jump to a given frame, we have to compute the correct start time
    mLastFrameAnimationTimeMs = mFrameScheduler.getTargetRenderTimeMs(targetFrameNumber);
    mStartTimeMs = now() - mLastFrameAnimationTimeMs;
    mExpectedRenderTimeMs = mStartTimeMs;
    invalidateSelf();
  }
797276
def frame_update_count(self):
        
        result = 1000000
        for column in self._columns:
            for widget in column:
                if widget.frame_update_count > 0:
                    result = min(result, widget.frame_update_count)
        return result
1356855
public void setRewindPositionOnce(@NonNull String frameName, int position) {
        if (getRewindPosition(frameName) >= 0)
            return;

        frames.get(frameName).setRewindPosition(position);
    }
341266
def num_frames(self, num_samples):
        
        return math.ceil(float(max(num_samples - self.frame_size, 0)) / float(self.hop_size)) + 1
618680
boolean setFrameIndex(int frame) {
        if(frame < INITIAL_FRAME_POINTER || frame >= getFrameCount()) {
            return false;
        }
        framePointer = frame;
        return true;
    }
562794
def get_frame(self, index=None, onset=None):
        ''' 
        '''
        if onset:
            index = int(onset * self.fps)

        return super(VideoStim, self).get_frame(index)
684717
async def handle_frame(self, frame):
        """"""
        if not isinstance(frame, FrameGetVersionConfirmation):
            return False
        self.version = frame.version
        self.success = True
        return True
379114
def increment_frame(self):
        """"""
        if self.current_frame < len(self.images):
            self.current_frame += 1

            if self.current_frame >= len(self.images):
                # Wrap back to the beginning of the animation if should_repeat is true.
                if self.should_repeat:
                    self.current_frame = 0
                else:
                    # Clamp the current frame to the number of images we have in our list
                    self.current_frame = len(self.images) - 1

            # Set the image that is currently displaying.
            if self.current_frame < len(self.images):
                self.image = self.images[self.current_frame]
                self.image.coords = self.coords
405362
def update_frame(self, key, ranges=None):
        
        ranges = self.compute_ranges(self.layout, key, ranges)
        for r, c in self.coords:
            subplot = self.subplots.get((r, c), None)
            if subplot is not None:
                subplot.update_frame(key, ranges)
        title = self._get_title_div(key)
        if title:
            self.handles['title'] = title
791110
function(frame, frameSize) {
    const opcode = encoders.opcode('PROCESS_FRAME');

    const time = new Float64Array(1);
    time[0] = frame.time;

    const data = new Float32Array(frameSize);
    for (let i = 0; i < frameSize; i++)
      data[i] = frame.data[i];

    const metadata = json2Uint16Array(frame.metadata);

    const length = 1 + 4 + (2 * frameSize) + metadata.length;
    const payload = new Uint16Array(length);
    payload.set(opcode, 0);
    payload.set(new Uint16Array(time.buffer), 1);
    payload.set(new Uint16Array(data.buffer), 1 + 4);
    payload.set(metadata, 1 + 4 + (2 * frameSize));

    return payload.buffer;
  }
762396
function updateAnimation () {
    if (!animationActive && shouldAnimate()) {
      animationStartTime = Date.now()
      lastFrameNumber = 0
      window.requestAnimationFrame(frame)
      animationActive = true
    }
  }