Android camera native access : startPreview() vs startRecording()

前端 未结 3 1659
走了就别回头了
走了就别回头了 2021-01-31 12:53

Trying to get camera working from native code in Android ICS: most manuals refer to startPreview() method . But browsing AOSP code I\'ve found also \'st

3条回答
  •  面向向阳花
    2021-01-31 13:01

    dataCallbackTimestamp(nsecs_t timestamp, int32_t msgType, const sp& data) 
    

    when

    msgType==CAMERA_MSG_VIDEO_FRAME
    

    gives data in internal form. It is not guaranteed pure yuv frame data. For example data.get()->size() can be bigger than yuv frame size or can be some 20-bytes-sized data structure for real(?) frame buffer keeping somewhere in camera buffers list.

    So, this topic is not complete yet. :)

提交回复
热议问题