This method is called by a video frame, when it is being recycled.
@param frame the frame being recycled.
344605
final void recycleVideoBuffer(BaseVideoFrame frame) {
		// Make sure we are in started state
		if (state.isStarted())
		{
			enqueueBuffer(object, frame.getBufferInex());

			synchronized(availableVideoFrames){
				availableVideoFrames.add(frame);
				availableVideoFrames.notify();
			}
		}
	}
373983
public void setVideoPosition(com.google.api.ads.admanager.axis.v201808.VideoPosition videoPosition) {
        this.videoPosition = videoPosition;
    }
594262
void parse_frame()
  {
	// Convert Bytes read to int
	int	b=0;
	byte[] byteread = frame_bytes;
	int bytesize = framesize;

	// Check ID3v1 TAG (True only if last frame).
	//for (int t=0;t<(byteread.length)-2;t++)
	//{
	//	if ((byteread[t]=='T') && (byteread[t+1]=='A') && (byteread[t+2]=='G'))
	//	{
	//		System.out.println("ID3v1 detected at offset "+t);
	//		throw newBitstreamException(INVALIDFRAME, null);
	//	} 	
	//}
	
	for (int k=0;k<bytesize;k=k+4)
	{
		//int convert = 0;
		byte b0 = 0;
		byte b1 = 0;
		byte b2 = 0;
		byte b3 = 0;
		b0 = byteread[k];
		if (k+1<bytesize) b1 = byteread[k+1];
		if (k+2<bytesize) b2 = byteread[k+2];
		if (k+3<bytesize) b3 = byteread[k+3];
		framebuffer[b++] = ((b0 << 24) &0xFF000000) | ((b1 << 16) & 0x00FF0000) | ((b2 << 8) & 0x0000FF00) | (b3 & 0x000000FF);
	}
	wordpointer = 0;
    bitindex = 0;
  }
880205
void advanceContextToGivenFrame(NavigationFrame frame) {
        in.position(frame.streamPosition);
        offset = frame.streamOffset;
        cd = frame.cd;
    }
827413
void recycle()
    {
        _outputState=NO_OUT;
        _out=null;
        _writer=null;
        _session=null;
        _noSession=false;
        _locale=null;
        _charEncodingSetInContentType=false;
    }
313044
function replayFrame(index) {

        var frame = frames[index];

        // Replay all instructions within the retrieved frame
        for (var i = 0; i < frame.instructions.length; i++) {
            var instruction = frame.instructions[i];
            playbackTunnel.receiveInstruction(instruction.opcode, instruction.args);
        }

        // Store client state if frame is flagged as a keyframe
        if (frame.keyframe && !frame.clientState) {
            playbackClient.exportState(function storeClientState(state) {
                frame.clientState = state;
            });
        }

    }
1336069
public void registerFrameParticipant (FrameParticipant participant)
    {
        Object[] nparts = ListUtil.testAndAddRef(_participants, participant);
        if (nparts == null) {
            log.warning("Refusing to add duplicate frame participant! " + participant);
        } else {
            _participants = nparts;
        }
    }
1083705
private int getFrame(long pos) {
        int sample = 1;
        int len = frames.size();
        MP4Frame frame = null;
        for (int f = 0; f < len; f++) {
            frame = frames.get(f);
            if (pos == frame.getOffset()) {
                sample = f;
                break;
            }
        }
        return sample;
    }
890228
private void recycleBuffer(MemorySegment buffer) {
		synchronized (this.buffers) {
			if (this.isDestroyed) {
				this.globalBufferPool.returnBuffer(buffer);
				this.numRequestedBuffers--;
			} else {
				// if the number of designated buffers changed in the meantime, make sure
				// to return the buffer to the global buffer pool
				if (this.numRequestedBuffers > this.numDesignatedBuffers) {
					this.globalBufferPool.returnBuffer(buffer);
					this.numRequestedBuffers--;

				} else if (!this.listeners.isEmpty()) {
					Buffer availableBuffer = new Buffer(buffer, buffer.size(), this.recycler);
					try {
						this.listeners.poll().bufferAvailable(availableBuffer);
					} catch (Exception e) {
						this.buffers.add(buffer);
						this.buffers.notify();
					}

				} else {
					this.buffers.add(buffer);
					this.buffers.notify();
				}
			}
		}
	}
1311406
public void setVideoAssets(com.google.api.ads.admanager.axis.v201811.VideoRedirectAsset[] videoAssets) {
        this.videoAssets = videoAssets;
    }
1036605
public void ofReadByteBuffer(ByteBuffer byteBuffer) {
		assert !isRecycled() : "Attempt to use recycled bytebuf";
		assert array == byteBuffer.array();
		assert byteBuffer.limit() == tail;
		head = byteBuffer.position();
	}
1090744
private void recyclePreviousSlideView(int position, View view) {
        // Remove view from our hierarchy
        removeView(view);

        // Add to recycled views
        int viewType = adapter.getItemViewType(position);
        recycledViews.put(viewType, view);
        view.destroyDrawingCache();

        if (view instanceof ImageView) {
            ((ImageView) view).setImageDrawable(null);
        }

        Log.d("SlideShowView", "View added to recycling bin: " + view);

        // The adapter can recycle some memory with discard slide
        adapter.discardSlide(position);

        // The adapter can prepare the next slide
        prepareSlide(getPlaylist().getNextSlide());
    }
513237
@Override
    public void visitFrame(int type, int numLocals, Object[] locals, int stackSize, Object[] stack) {
        if (!isVisitFrameRequired())
            return;

        super.visitFrame(type, numLocals, locals, stackSize, stack);
    }
470616
@Override
	public synchronized void start() {
		super.start();
		this.running = true;
		if (this.hasFrame) this.frame.setVisible(true);
		this.thread.start();
	}
773362
public Frame process(Frame frame) {
    	sourceLen=frame.getLength();
    	destinationLen=sourceLen * 2;
        Frame res = Memory.allocate(destinationLen);
        
        byte[] data=frame.getData();
        byte[] resData=res.getData();
        
        for (i = 0,j = 0; i < sourceLen; i++) 
        {
        	currentIndex = data[i] & 0xff;
            resData[j++] = aLawDecompressTable_low[currentIndex];
            resData[j++] = aLawDecompressTable_high[currentIndex];
        }
        
        res.setOffset(0);
        res.setLength(destinationLen);
        res.setTimestamp(frame.getTimestamp());
        res.setDuration(frame.getDuration());
        res.setSequenceNumber(frame.getSequenceNumber());
        res.setEOM(frame.isEOM());
        res.setFormat(linear);
        res.setHeader(frame.getHeader());
        return res;
    }
1297191
public void recycle(RecyclePosition position) {

        stubCount = determineStubCount();

        switch (position) {
            case BOTTOM:
                if (hasRecycledWidgets()) {
                    // Will remove the  current recycled widgets
                    remove(getRecycledWidgets().stream()
                            .skip(0)
                            .limit((parent.getLimit() * (currentIndex + 1)) - stubCount)
                            .collect(Collectors.toList()));

                    currentIndex++;

                    // Will determine if the current index is greater than the load index then we need to recycle the next
                    // set of recycled widgets
                    if (currentIndex < loadIndex) {
                        add(getRecycledWidgets(currentIndex));
                    }
                }
                break;
            case TOP:
                if (currentIndex > 0) {
                    // Will remove the current recycled widgets
                    remove(getRecycledWidgets(currentIndex));

                    // Will add the previous recycled widgets
                    int skip = ((parent.getLimit() * currentIndex) - parent.getLimit()) - stubCount;
                    insert(getRecycledWidgets().stream()
                            .skip(skip < 0 ? 0 : skip)
                            .limit(parent.getLimit())
                            .collect(Collectors.toList()));

                    currentIndex--;
                }
                break;
        }
    }
1016623
private void merge(final int insn, final Frame<V> frame,
            final Subroutine subroutine) throws AnalyzerException {
        Frame<V> oldFrame = frames[insn];
        Subroutine oldSubroutine = subroutines[insn];
        boolean changes;

        if (oldFrame == null) {
            frames[insn] = newFrame(frame);
            changes = true;
        } else {
            changes = oldFrame.merge(frame, interpreter);
        }

        if (oldSubroutine == null) {
            if (subroutine != null) {
                subroutines[insn] = subroutine.copy();
                changes = true;
            }
        } else {
            if (subroutine != null) {
                changes |= oldSubroutine.merge(subroutine);
            }
        }
        if (changes && !queued[insn]) {
            queued[insn] = true;
            queue[top++] = insn;
        }
    }