I have seen many examples on how to live stream video from android camera to rtmp server using surfaceview. One is here : https://github.com/begeekmyfriend/yasea
But is it possible to stream the video from camera to rtmp using a textureview? If it is, how can we?
Textureview mTextureView;
// inside oncreate
mTextureView = (TextureView) findViewById(R.id.texture_view);
mTextureView.setSurfaceTextureListener(AircraftControlActivity.this);
// Outside OnCreate
@Override
public void onSurfaceTextureAvailable(final SurfaceTexture surface, final int width, final int height) {
}
@Override
public void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height) {
}
@Override
public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
}
@Override
public void onSurfaceTextureUpdated(final SurfaceTexture surface) {
}
What to do next?