1 /*
2 * Copyright (c) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15 #include "output/camera_output_capability.h"
16
17 namespace OHOS {
18 namespace CameraStandard {
Profile(CameraFormat format,Size size)19 Profile::Profile(CameraFormat format, Size size) : format_(format), size_(size) {}
Profile(CameraFormat format,Size size,Fps fps,std::vector<uint32_t> abilityId)20 Profile::Profile(CameraFormat format, Size size, Fps fps, std::vector<uint32_t> abilityId)
21 : format_(format), size_(size), fps_(fps), abilityId_(abilityId) {}
GetCameraFormat()22 CameraFormat Profile::GetCameraFormat()
23 {
24 return format_;
25 }
26
GetAbilityId()27 std::vector<uint32_t> Profile::GetAbilityId()
28 {
29 return abilityId_;
30 }
31
GetSize()32 Size Profile::GetSize()
33 {
34 return size_;
35 }
36
VideoProfile(CameraFormat format,Size size,std::vector<int32_t> framerates)37 VideoProfile::VideoProfile(CameraFormat format, Size size, std::vector<int32_t> framerates) : Profile(format, size)
38 {
39 framerates_ = framerates;
40 }
GetFrameRates()41 std::vector<int32_t> VideoProfile::GetFrameRates()
42 {
43 return framerates_;
44 }
45
GetPhotoProfiles()46 std::vector<Profile> CameraOutputCapability::GetPhotoProfiles()
47 {
48 return photoProfiles_;
49 }
50
SetPhotoProfiles(std::vector<Profile> photoProfiles)51 void CameraOutputCapability::SetPhotoProfiles(std::vector<Profile> photoProfiles)
52 {
53 photoProfiles_ = photoProfiles;
54 }
55
GetPreviewProfiles()56 std::vector<Profile> CameraOutputCapability::GetPreviewProfiles()
57 {
58 return previewProfiles_;
59 }
60
SetPreviewProfiles(std::vector<Profile> previewProfiles)61 void CameraOutputCapability::SetPreviewProfiles(std::vector<Profile> previewProfiles)
62 {
63 previewProfiles_ = previewProfiles;
64 }
65
GetVideoProfiles()66 std::vector<VideoProfile> CameraOutputCapability::GetVideoProfiles()
67 {
68 return videoProfiles_;
69 }
70
SetVideoProfiles(std::vector<VideoProfile> videoProfiles)71 void CameraOutputCapability::SetVideoProfiles(std::vector<VideoProfile> videoProfiles)
72 {
73 videoProfiles_ = videoProfiles;
74 }
75
GetSupportedMetadataObjectType()76 std::vector<MetadataObjectType> CameraOutputCapability::GetSupportedMetadataObjectType()
77 {
78 return metadataObjTypes_;
79 }
80
SetSupportedMetadataObjectType(std::vector<MetadataObjectType> metadataObjType)81 void CameraOutputCapability::SetSupportedMetadataObjectType(std::vector<MetadataObjectType> metadataObjType)
82 {
83 metadataObjTypes_ = metadataObjType;
84 }
85 } // CameraStandard
86 } // OHOS
87