Java Code Examples for

The following are Jave code examples for showing how to use OnFrameAvailableListener of the class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: AppRTC-Android   File:   Source Code and License Vote up 5 votes
private static void setOnFrameAvailableListener(SurfaceTexture surfaceTexture,
    SurfaceTexture.OnFrameAvailableListener listener, Handler handler) {
    surfaceTexture.setOnFrameAvailableListener(listener, handler);
  } else {
    // The documentation states that the listener will be called on an arbitrary thread, but in
    // pratice, it is always the thread on which the SurfaceTexture was constructed. There are
    // assertions in place in case this ever changes. For API >= 21, we use the new API to
    // explicitly specify the handler.