Merge "Camera: add batching support to HAL1 recording path" into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e1df48d3a0
@@ -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);
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user