| 177 | } |
| 178 | |
| 179 | Status EndCameraCapture(int camera_handle, CameraBuffer* buffers, |
| 180 | int buffer_count) { |
| 181 | enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; |
| 182 | Status stream_off_status = |
| 183 | SendCameraCommand(camera_handle, VIDIOC_STREAMOFF, &type); |
| 184 | if (!stream_off_status.ok()) { |
| 185 | LOG(ERROR) << "Turning stream off failed with " << stream_off_status; |
| 186 | return stream_off_status; |
| 187 | } |
| 188 | for (int i = 0; i < buffer_count; ++i) |
| 189 | v4l2_munmap(buffers[i].start, buffers[i].length); |
| 190 | return Status::OK(); |
| 191 | } |
| 192 | |
| 193 | Status CaptureNextFrame(int camera_handle, CameraBuffer* buffers, |
| 194 | uint8_t** frame_data, int* frame_data_size, |
no test coverage detected