Implementing Burst mode on android camera

后端 未结 2 1621
面向向阳花
面向向阳花 2021-02-01 10:58

I\'m trying to implement burst mode on android\'s camera (currently on ICS) I\'ve searched over the net trying to find some documentation about this features and encounter with

相关标签:
2条回答
  • 2021-02-01 11:44

    This question is somewhat similar to this question on stack overflow. The code in that question could help.

    0 讨论(0)
  • 2021-02-01 12:01

    You may also check this code as a baseline: https://github.com/rdasxy/android-burst-camera . Also check this first: http://developer.android.com/guide/topics/media/camera.html. For your preview use TextureView (you need to add hardware accelleration to your AndroidManifest.xml) instead of SurfaceView. You might run out of heap quite fast if you try to cache the pictures in memory, especially if you set the picture size to a large value. Thus, save the data as soon as you receive it in method pictureCallBack.onPictureTaken by using e.g. an AsynchTask. Check (measure!) the write speed of your device's internal memory in contrast to the sdcard write speed. You might get higher overall process performance when saving to the device's internal memory first and move it to sdcard later if required. Also try to motivate the android system to provide you larger heap size by adding largeHeap=true to your AndroidManifest.xml

    0 讨论(0)
提交回复
热议问题