setSettings(request->settings);
}
+ if (request->input_buffer != NULL) {
+ ALOGV("%s:%d: Reprocessing input buffer %p", __func__, mId,
+ request->input_buffer);
+
+ if (!isValidReprocessSettings(request->settings)) {
+ ALOGE("%s:%d: Invalid settings for reprocess request: %p",
+ __func__, mId, request->settings);
+ return -EINVAL;
+ }
+ } else {
+ ALOGV("%s:%d: Capturing new frame.", __func__, mId);
+
+ if (!isValidCaptureSettings(request->settings)) {
+ ALOGE("%s:%d: Invalid settings for capture request: %p",
+ __func__, mId, request->settings);
+ return -EINVAL;
+ }
+ }
+
// TODO: verify request; submit request to hardware
return 0;
}
mSettings = clone_camera_metadata(new_settings);
}
+bool Camera::isValidCaptureSettings(const camera_metadata_t *settings)
+{
+ // TODO: reject settings that cannot be captured
+ return true;
+}
+
+bool Camera::isValidReprocessSettings(const camera_metadata_t *settings)
+{
+ // TODO: reject settings that cannot be reprocessed
+ // input buffers unimplemented, use this to reject reprocessing requests
+ ALOGE("%s:%d: Input buffer reprocessing not implemented", __func__, mId);
+ return false;
+}
+
void Camera::getMetadataVendorTagOps(vendor_tag_query_ops_t *ops)
{
ALOGV("%s:%d: ops=%p", __func__, mId, ops);
void setupStreams(Stream **array, int count);
// Copy new settings for re-use and clean up old settings.
void setSettings(const camera_metadata_t *new_settings);
+ // Verify settings are valid for a capture
+ bool isValidCaptureSettings(const camera_metadata_t *settings);
+ // Verify settings are valid for reprocessing an input buffer
+ bool isValidReprocessSettings(const camera_metadata_t *settings);
// Identifier used by framework to distinguish cameras
const int mId;