take a picture with android ndk - camera api

前端 未结 4 1062
误落风尘
误落风尘 2020-12-09 18:47

Is there a standarized API for taking pictures using Android NDK?

Or is it really necessary to go through Java for that?

4条回答
  •  佛祖请我去吃肉
    2020-12-09 19:18

    1) There was an access to Camera.h in older releases like Froyo, 2.3.3.

    Now, I see a Camera.h in KitKat, 4.4.4. It changed completely.

    This is an unofficial API, so it's subject to change. Be ready to code and deploy different versions for different Android releases.

    2) There is a Camera component in OpenMAX. People managed to create an OpenMAX recorder for Raspbery Pi. I yet have to find a working solution for Android.

    These two questions are unanswered:

    • OpenMAX recorder on Android
    • Access camera via OpenMAX in Android

    and I'm going to try OpenMAX.

    3) We ran into an Android device where video4linux2 works (one can access /dev/video0).

提交回复
热议问题