Loading core/jni/android_hardware_Camera.cpp +19 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,9 @@ public: camera_frame_metadata_t *metadata); virtual void postDataTimestamp(nsecs_t timestamp, int32_t msgType, const sp<IMemory>& dataPtr); virtual void postRecordingFrameHandleTimestamp(nsecs_t timestamp, native_handle_t* handle); virtual void postRecordingFrameHandleTimestampBatch( const std::vector<nsecs_t>& timestamps, const std::vector<native_handle_t*>& handles); void postMetadata(JNIEnv *env, int32_t msgType, camera_frame_metadata_t *metadata); void addCallbackBuffer(JNIEnv *env, jbyteArray cbb, int msgType); void setCallbackMode(JNIEnv *env, bool installed, bool manualMode); Loading Loading @@ -362,6 +365,22 @@ void JNICameraContext::postRecordingFrameHandleTimestamp(nsecs_t, native_handle_ } } void JNICameraContext::postRecordingFrameHandleTimestampBatch( const std::vector<nsecs_t>&, const std::vector<native_handle_t*>& handles) { // Video buffers are not needed at app layer so just return the video buffers here. // This may be called when stagefright just releases camera but there are still outstanding // video buffers. if (mCamera != nullptr) { mCamera->releaseRecordingFrameHandleBatch(handles); } else { for (auto& handle : handles) { native_handle_close(handle); native_handle_delete(handle); } } } void JNICameraContext::postMetadata(JNIEnv *env, int32_t msgType, camera_frame_metadata_t *metadata) { jobjectArray obj = NULL; Loading Loading
core/jni/android_hardware_Camera.cpp +19 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,9 @@ public: camera_frame_metadata_t *metadata); virtual void postDataTimestamp(nsecs_t timestamp, int32_t msgType, const sp<IMemory>& dataPtr); virtual void postRecordingFrameHandleTimestamp(nsecs_t timestamp, native_handle_t* handle); virtual void postRecordingFrameHandleTimestampBatch( const std::vector<nsecs_t>& timestamps, const std::vector<native_handle_t*>& handles); void postMetadata(JNIEnv *env, int32_t msgType, camera_frame_metadata_t *metadata); void addCallbackBuffer(JNIEnv *env, jbyteArray cbb, int msgType); void setCallbackMode(JNIEnv *env, bool installed, bool manualMode); Loading Loading @@ -362,6 +365,22 @@ void JNICameraContext::postRecordingFrameHandleTimestamp(nsecs_t, native_handle_ } } void JNICameraContext::postRecordingFrameHandleTimestampBatch( const std::vector<nsecs_t>&, const std::vector<native_handle_t*>& handles) { // Video buffers are not needed at app layer so just return the video buffers here. // This may be called when stagefright just releases camera but there are still outstanding // video buffers. if (mCamera != nullptr) { mCamera->releaseRecordingFrameHandleBatch(handles); } else { for (auto& handle : handles) { native_handle_close(handle); native_handle_delete(handle); } } } void JNICameraContext::postMetadata(JNIEnv *env, int32_t msgType, camera_frame_metadata_t *metadata) { jobjectArray obj = NULL; Loading