diff options
author | Cheng Gu <gucheng@google.com> | 2022-07-20 19:04:39 +0000 |
---|---|---|
committer | Cheng Gu <gucheng@google.com> | 2022-07-20 23:04:03 +0000 |
commit | 31fa05e1fd31900a9300909fac16b6a832e5d4e4 (patch) | |
tree | da0697f68dc74e14aeccf1d1bd4208e65b07c87a | |
parent | 1008b72245822783b515ab2fe5553e1f8ce90691 (diff) | |
download | camera-31fa05e1fd31900a9300909fac16b6a832e5d4e4.tar.gz |
realtime_zsl: Store returned_output flag in RequestEntry
Stores the previously called `returned_output` flag in struct
RequestEntry, to allow future use in a helper function.
This commit doesn't change functionality so far.
Bug: 235371520
Test: Framework stress test, CTS
Change-Id: Ib5cd1bad604b5b6272a34535a6b078dd07bbc7a0
-rw-r--r-- | common/hal/google_camera_hal/realtime_zsl_result_request_processor.cc | 6 | ||||
-rw-r--r-- | common/hal/google_camera_hal/realtime_zsl_result_request_processor.h | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/common/hal/google_camera_hal/realtime_zsl_result_request_processor.cc b/common/hal/google_camera_hal/realtime_zsl_result_request_processor.cc index d0d401d..0a54352 100644 --- a/common/hal/google_camera_hal/realtime_zsl_result_request_processor.cc +++ b/common/hal/google_camera_hal/realtime_zsl_result_request_processor.cc @@ -117,12 +117,11 @@ void RealtimeZslResultRequestProcessor::ProcessResult( // Return filled raw buffer to internal stream manager // And remove raw buffer from result - bool returned_output = false; status_t res; std::vector<StreamBuffer> modified_output_buffers; for (uint32_t i = 0; i < result->output_buffers.size(); i++) { if (stream_id_ == result->output_buffers[i].stream_id) { - returned_output = true; + pending_request.has_returned_output_to_internal_stream_manager = true; res = internal_stream_manager_->ReturnFilledBuffer( result->frame_number, result->output_buffers[i]); if (res != OK) { @@ -207,7 +206,8 @@ void RealtimeZslResultRequestProcessor::ProcessResult( } // Don't send result to framework if only internal raw callback - if (returned_output && result->result_metadata == nullptr && + if (pending_request.has_returned_output_to_internal_stream_manager && + result->result_metadata == nullptr && result->output_buffers.size() == 0) { return; } diff --git a/common/hal/google_camera_hal/realtime_zsl_result_request_processor.h b/common/hal/google_camera_hal/realtime_zsl_result_request_processor.h index 2094d6e..bd5c9e4 100644 --- a/common/hal/google_camera_hal/realtime_zsl_result_request_processor.h +++ b/common/hal/google_camera_hal/realtime_zsl_result_request_processor.h @@ -80,6 +80,9 @@ class RealtimeZslResultRequestProcessor : public RealtimeZslResultProcessor, uint32_t partial_results_received = 0; bool zsl_buffer_received = false; int framework_buffer_count = INT_MAX; + // Whether there were filled raw buffers that have been returned to internal + // stream manager. + bool has_returned_output_to_internal_stream_manager = false; }; bool AllDataCollected(const RequestEntry& request_entry) const; |