android.view.TextureView.SurfaceTextureListener Java Examples
The following examples show how to use
android.view.TextureView.SurfaceTextureListener.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ScaledTextureView.java From AndroidVideoSamples with Apache License 2.0 | 5 votes |
public void addSurfaceTextureListener( SurfaceTextureListener listener ) { mListeners.add( listener ); if ( mSurfaceAvailable ) { listener.onSurfaceTextureAvailable( mSurfaceTexture, mWidth, mHeight ); } }
Example #2
Source File: ScaledTextureView.java From AndroidVideoSamples with Apache License 2.0 | 5 votes |
@Override public void onSurfaceTextureAvailable( SurfaceTexture surface, int width, int height ) { mSurfaceTexture = surface; mWidth = width; mHeight = height; mSurfaceAvailable = true; for ( SurfaceTextureListener listener : mListeners ) { listener.onSurfaceTextureAvailable( surface, width, height ); } }
Example #3
Source File: ScaledTextureView.java From AndroidVideoSamples with Apache License 2.0 | 5 votes |
@Override public boolean onSurfaceTextureDestroyed( SurfaceTexture surface ) { for ( SurfaceTextureListener listener : mListeners ) { listener.onSurfaceTextureDestroyed( surface ); } return true; }
Example #4
Source File: ScaledTextureView.java From AndroidVideoSamples with Apache License 2.0 | 5 votes |
@Override public void onSurfaceTextureSizeChanged( SurfaceTexture surface, int width, int height ) { mWidth = width; mHeight = height; for ( SurfaceTextureListener listener : mListeners ) { listener.onSurfaceTextureSizeChanged( surface, width, height ); } }
Example #5
Source File: ScaledTextureView.java From AndroidVideoSamples with Apache License 2.0 | 4 votes |
@Override public void onSurfaceTextureUpdated( SurfaceTexture surface ) { for ( SurfaceTextureListener listener : mListeners ) { listener.onSurfaceTextureUpdated( surface ); } }