(Non Java-doc)

@see org.mobicents.media.server.dsp.Codec#process(Frame).
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;
    }
569567
protected void fireFrameReceived(final CEMI frame)
	{
		final FrameEvent fe = new FrameEvent(this, frame);
		listeners.fire(l -> l.frameReceived(fe));
	}
219943
def process_frames(self):
        
        while self._running.is_set():
            try:
                frame = yield self._get_frame()
                info = self._split_response(frame.data)
                if info is not None:
                    self._callback(info)
            except Exception as e:
                # Unexpected quit.
                if self._error_callback:
                    self._error_callback(e)
25049
public void process(OutputStream outputStream, Object element) throws IOException {
        this.root.processElement(outputStream, element);
    }
482778
public void processError(String msg) {
        synchronized (frameListeners) {
            Iterator<FrameListener> it = frameListeners.iterator();
            while (it.hasNext()) {
                FrameListener listener = it.next();
                listener.processError(msg);
            }
        }
    }
935034
private void processOnce() throws CompilationFailedException, IOException, URISyntaxException {
        GroovyShell groovy = new GroovyShell(conf);
        setupContextClassLoader(groovy);
        groovy.run(getScriptSource(isScriptFile, script), args);
    }
1018372
private void callOnFrameError(WebSocketException cause, WebSocketFrame frame)
    {
        mWebSocket.getListenerManager().callOnFrameError(cause, frame);
    }
575957
public void decode() throws IOException {
        readMetadata();
        try {
            while (true) {
                //switch (state) {
                //case DECODER_SEARCH_FOR_METADATA :
                //    readStreamSync();
                //    break;
                //case DECODER_READ_METADATA :
                //    Metadata metadata = readNextMetadata();
                //    if (metadata == null) break;
                //    break;
                //case DECODER_SEARCH_FOR_FRAME_SYNC :
                findFrameSync();
                //    break;
                //case DECODER_READ_FRAME :
                try {
                    readFrame();
                    frameListeners.processFrame(frame);
                    callPCMProcessors(frame);
                } catch (FrameDecodeException e) {
                    badFrames++;
                }
                //    break;
                //case DECODER_END_OF_STREAM :
                //case DECODER_ABORTED :
                //    return;
                //default :
                //    throw new IOException("Unknown state: " + state);
                //}
            }
        } catch (EOFException e) {
            eof = true;
        }
    }
699072
public void sendRequestToWc(FramePPHeaders frame) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "H2StreamProcessor.sendRequestToWc()");
        }

        if (null == frame) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "H2StreamProcessor.sendRequestToWc(): Frame is null");
            }
        } else {
            // Make the headers frame look like it just came in
            WsByteBuffer buf = frame.buildFrameForWrite();
            TCPReadRequestContext readi = h2HttpInboundLinkWrap.getConnectionContext().getReadInterface();
            readi.setBuffer(buf);

            // Call the synchronized method to handle the frame
            try {
                processNextFrame(frame, Constants.Direction.READ_IN);
            } catch (Http2Exception he) {
                // ProcessNextFrame() sends a reset/goaway if an error occurs, nothing left but to clean up
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "H2StreamProcessor.sendRequestToWc(): ProcessNextFrame() error, Exception: " + he);
                }

                // Free the buffer
                buf.release();
            }

        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "H2StreamProcessor.sendRequestToWc()");
        }

    }
681802
private void updateFrameBuffer() {

		LOG.trace("Next frame");

		if (t1 == -1 || t2 == -1) {
			t1 = System.currentTimeMillis();
			t2 = System.currentTimeMillis();
		}

		int result = new NextFrameTask(this).nextFrame();

		t1 = t2;
		t2 = System.currentTimeMillis();

		fps = (4 * fps + 1000 / (t2 - t1 + 1)) / 5;

		if (result == -1) {
			LOG.error("Timeout when requesting image!");
		} else if (result < -1) {
			LOG.error("Error requesting new frame!");
		}
	}
233422
async def handle_frame(self, frame):
        """"""
        if isinstance(frame, FrameGetSceneListConfirmation):
            self.count_scenes = frame.count_scenes
            if self.count_scenes == 0:
                self.success = True
                return True
            # We are still waiting for FrameGetSceneListNotification(s)
            return False
        if isinstance(frame, FrameGetSceneListNotification):
            self.scenes.extend(frame.scenes)
            if frame.remaining_scenes != 0:
                # We are still waiting for FrameGetSceneListConfirmation(s)
                return False
            if self.count_scenes != len(self.scenes):
                PYVLXLOG.warning("Warning: number of received scenes does not match expected number")
            self.success = True
            return True
        return False
91108
async def handle_frame(self, frame):
        """"""
        if isinstance(frame, FrameCommandSendConfirmation) and frame.session_id == self.session_id:
            if frame.status == CommandSendConfirmationStatus.ACCEPTED:
                self.success = True
            return not self.wait_for_completion
        if isinstance(frame, FrameCommandRemainingTimeNotification) and frame.session_id == self.session_id:
            # Ignoring FrameCommandRemainingTimeNotification
            return False
        if isinstance(frame, FrameCommandRunStatusNotification) and frame.session_id == self.session_id:
            # At the moment I don't reall understand what the FrameCommandRunStatusNotification is good for.
            # Ignoring these packets for now
            return False
        if isinstance(frame, FrameSessionFinishedNotification) and frame.session_id == self.session_id:
            return True
        return False
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;
  }
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();
			}
		}
	}
1194424
async def handle_frame(self, frame):
        """"""
        if isinstance(frame, FrameActivateSceneConfirmation) and frame.session_id == self.session_id:
            if frame.status == ActivateSceneConfirmationStatus.ACCEPTED:
                self.success = True
            return not self.wait_for_completion
        if isinstance(frame, FrameCommandRemainingTimeNotification) and frame.session_id == self.session_id:
            # Ignoring FrameCommandRemainingTimeNotification
            return False
        if isinstance(frame, FrameCommandRunStatusNotification) and frame.session_id == self.session_id:
            # At the moment I don't reall understand what the FrameCommandRunStatusNotification is good for.
            # Ignoring these packets for now
            return False
        if isinstance(frame, FrameSessionFinishedNotification) and frame.session_id == self.session_id:
            return True
        return False
1252236
def _process_method_frame(self, channel, payload):
        
        method_sig = unpack('>HH', payload[:4])
        args = AMQPReader(payload[4:])

        if method_sig in _CONTENT_METHODS:
            #
            # Save what we've got so far and wait for the content-header
            #
            self.partial_messages[channel] = _PartialMessage(method_sig, args)
            self.expected_types[channel] = 2
        else:
            self.queue.put((channel, method_sig, args, None))
942682
private void process(Path dir, Path file, WatchEvent.Kind<?> evtType) throws TTException, IOException,
        InterruptedException {
        // LOGGER.info("Processing " + file.getFileName() + " with event "
        // + evtType);
        IFilelistenerWriteTrx trx = null;
        String rootPath = getListenerRootPath(dir);

        String relativePath = file.toFile().getAbsolutePath();
        relativePath = relativePath.substring(getListenerRootPath(dir).length(), relativePath.length());

        for (Entry<String, String> e : mFilelistenerToPaths.entrySet()) {
            if (e.getValue().equals(getListenerRootPath(dir))) {
                trx = mTrx.get(e.getKey());
            }
        }

        if (file.toFile().isDirectory()) {
            if (evtType == ENTRY_CREATE) {
                addSubDirectory(dir, file);
                return;
            } else if (evtType == ENTRY_DELETE) {
                for (String s : trx.getFilePaths()) {
                    if (s.contains(relativePath)) {
                        trx.removeFile(s);
                    }
                }
            }
        } else {
            // if (mLockedFiles.get(rootPath + File.separator
            // + file.toFile().getName()) != null) {
            // if (mLockedFiles.get(
            // rootPath + File.separator + file.toFile().getName())
            // .isFinished()) {
            // ExecutorService s = mExecutorMap
            // .get(getListenerRootPath(dir));
            // if (s != null && !s.isShutdown()) {
            //
            // FilesystemNotification n = new FilesystemNotification(
            // file.toFile(), relativePath, rootPath, evtType,
            // trx);
            // if (mObserver != null) {
            // n.addObserver(mObserver);
            // }
            // mFsnOnHold.remove(rootPath + File.separator
            // + file.toFile().getName());
            // mLockedFiles.put(rootPath + File.separator
            // + file.toFile().getName(), n);
            // s.submit(n);
            // }
            // } else {
            // FilesystemNotification n = new FilesystemNotification(
            // file.toFile(), relativePath, rootPath, evtType, trx);
            // if (mObserver != null) {
            // n.addObserver(mObserver);
            // }
            // mFsnOnHold.put(rootPath + File.separator
            // + file.toFile().getName(), n);
            // }
            // } else {
            ExecutorService s = mExecutorMap.get(getListenerRootPath(dir));
            if (s != null && !s.isShutdown()) {
                FilesystemNotification n =
                    new FilesystemNotification(file.toFile(), relativePath, rootPath, evtType, trx);
                if (mObserver != null) {
                    n.addObserver(mObserver);
                }
                // mLockedFiles.put(rootPath + File.separator
                // + file.toFile().getName(), n);

                s.submit(n);
                // }
            }
        }

    }