mediacodec ExtractMpegFramesTest example mismatch

孤人 提交于 2019-12-23 16:42:55

问题


I tried to run This example from bigflake and I think that there is a mismatch.

they write "ExtractMpegFramesTest.java (requires 4.1, API 16) " so the minimum API required is 16, but I look over the code and they use "import android.opengl.EGL14;" which required minimum API 17.

Has anyone encountered this problem and succeeded to solve it?(succeeded to save 10 frames on Android 4.1 device)


回答1:


I've updated the site to have two copies of the source file, one that uses EGL 1.0 and one that uses EGL 1.4. I did a quick test with the SDK, creating an app for API 16, to confirm that it's no longer using post-4.1 APIs. I haven't tried it on an actual device running 4.1 however.




回答2:


You can use MediaMetadataRetriever.getFrameAtTime in order to extract frames from a video file. It's available since API level 10.



来源:https://stackoverflow.com/questions/20495863/mediacodec-extractmpegframestest-example-mismatch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!