diff options
author | Chien-Yu Chen <cychen@google.com> | 2015-08-28 15:46:12 -0700 |
---|---|---|
committer | Chien-Yu Chen <cychen@google.com> | 2015-09-03 17:35:25 -0700 |
commit | 85a6455f269d79adf9bf48d757a4b1b3c81cf760 (patch) | |
tree | 7ad6b688f9e60e2f8597b7de932cd8c6ff4f628e /services/camera/libcameraservice/device3/Camera3OutputStream.cpp | |
parent | cfb252cdb748429789f918c4268fcca1331f6cec (diff) | |
download | frameworks_av-85a6455f269d79adf9bf48d757a4b1b3c81cf760.zip frameworks_av-85a6455f269d79adf9bf48d757a4b1b3c81cf760.tar.gz frameworks_av-85a6455f269d79adf9bf48d757a4b1b3c81cf760.tar.bz2 |
Camera3Device: Support batch requests
Refactor request threadLoop to three parts: waiting for next
batch of requests, preparing HAL requests and output buffers for
next batch of requests, and submitting the batch of requests to
HAL.
Set the batch size to the size of the request list if it's a video
recording request in a high speed video configuration.
Add a flush lock so that HAL's flush() won't be called while
submitting a batch of requests.
Bug: 23360060
Change-Id: Icd395b1f955a9b336eec6fa5aff6b17741ce08c7
Diffstat (limited to 'services/camera/libcameraservice/device3/Camera3OutputStream.cpp')
-rw-r--r-- | services/camera/libcameraservice/device3/Camera3OutputStream.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/device3/Camera3OutputStream.cpp b/services/camera/libcameraservice/device3/Camera3OutputStream.cpp index 8c611d5..3f0a736 100644 --- a/services/camera/libcameraservice/device3/Camera3OutputStream.cpp +++ b/services/camera/libcameraservice/device3/Camera3OutputStream.cpp @@ -426,6 +426,17 @@ status_t Camera3OutputStream::getEndpointUsage(uint32_t *usage) const { return res; } +bool Camera3OutputStream::isVideoStream() const { + uint32_t usage = 0; + status_t res = getEndpointUsage(&usage); + if (res != OK) { + ALOGE("%s: getting end point usage failed: %s (%d).", __FUNCTION__, strerror(-res), res); + return false; + } + + return (usage & GRALLOC_USAGE_HW_VIDEO_ENCODER) != 0; +} + }; // namespace camera3 }; // namespace android |