【发布时间】:2017-09-16 09:07:21
【问题描述】:
我对使用 Android MediaCodec 进行解码以及通过 Surface 将 YUV 输入 OpenGL 纹理有很好的理解。我想对 Vulkan 做类似的事情。但是我没有成功找到任何文档或示例代码。
我的问题是:我将如何连接以下管道?
MediaCodec Video Decoder ⇨ Surface ⇨ texture ⇨ Vulkan
详情
- 使用MediaCodec#configure配置视频解码器
- Surface 是 Android Surface(link to API、link to arch.)
OpenGL 比较
为了比较,在 OpenGL 情况下,Android Surface 的构造和使用方式如下
textureId = glGenTextures( &textureId )
surface = new Surface( new SurfaceTexture( textureId ) )
mediaCodec.configure( surface )
【问题讨论】:
标签: android android-mediacodec vulkan