xref: /aosp_15_r20/frameworks/av/services/camera/virtualcamera/VirtualCameraCaptureRequest.h (revision ec779b8e0859a360c3d303172224686826e6e0e1)
1 /*
2  * Copyright (C) 2024 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #ifndef ANDROID_COMPANION_VIRTUALCAMERA_VIRTUALCAMERACAPTUREREQUEST_H
17 #define ANDROID_COMPANION_VIRTUALCAMERA_VIRTUALCAMERACAPTUREREQUEST_H
18 
19 #include "VirtualCameraDevice.h"
20 
21 namespace android {
22 namespace companion {
23 namespace virtualcamera {
24 
25 // Struct used to pass request settings in the different part of
26 // the virtual camera system.
27 struct RequestSettings {
28   // JPEG_QUALITY metadata
29   int jpegQuality = VirtualCameraDevice::kDefaultJpegQuality;
30 
31   // JPEG_ORIENTATION metadata
32   int jpegOrientation = VirtualCameraDevice::kDefaultJpegOrientation;
33 
34   // JPEG_THUMBNAIL_SIZE metadata
35   Resolution thumbnailResolution = Resolution(0, 0);
36 
37   // JPEG_THUMBNAIL_QUALITY metadata
38   int thumbnailJpegQuality = VirtualCameraDevice::kDefaultJpegQuality;
39 
40   // ANDROID_CONTROL_AE_TARGET_FPS_RANGE metadata
41   std::optional<FpsRange> fpsRange;
42 
43   // CONTROL_CAPTURE_INTENT metadata
44   camera_metadata_enum_android_control_capture_intent_t captureIntent =
45       VirtualCameraDevice::kDefaultCaptureIntent;
46 
47   // JPEG_GPS_LOCATION metadata
48   std::optional<GpsCoordinates> gpsCoordinates;
49 
50   // CONTROL_AE_PRECAPTURE_TRIGGER metadata
51   std::optional<camera_metadata_enum_android_control_ae_precapture_trigger>
52       aePrecaptureTrigger;
53 };
54 
55 }  // namespace virtualcamera
56 }  // namespace companion
57 }  // namespace android
58 
59 #endif  // ANDROID_COMPANION_VIRTUALCAMERA_VIRTUALCAMERACAPTUREREQUEST_H