我已经看到了很多关于如何使用 Surfaceview 将视频从 android 相机实时流式传输到 rtmp 服务器的示例。一个在这里:https ://github.com/begeekmyfriend/yasea
但是是否可以使用纹理视图将视频从相机流式传输到 rtmp?如果是,我们怎么办?
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) {
}
接下来做什么?