• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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) {}
20 
GetCameraFormat()21 CameraFormat Profile::GetCameraFormat()
22 {
23     return format_;
24 }
25 
GetSize()26 Size Profile::GetSize()
27 {
28     return size_;
29 }
30 
VideoProfile(CameraFormat format,Size size,std::vector<int32_t> framerates)31 VideoProfile::VideoProfile(CameraFormat format, Size size, std::vector<int32_t> framerates) : Profile(format, size)
32 {
33     framerates_ = framerates;
34 }
GetFrameRates()35 std::vector<int32_t> VideoProfile::GetFrameRates()
36 {
37     return framerates_;
38 }
39 
GetPhotoProfiles()40 std::vector<Profile> CameraOutputCapability::GetPhotoProfiles()
41 {
42     return photoProfiles_;
43 }
44 
SetPhotoProfiles(std::vector<Profile> photoProfiles)45 void CameraOutputCapability::SetPhotoProfiles(std::vector<Profile> photoProfiles)
46 {
47     photoProfiles_ = photoProfiles;
48 }
49 
GetPreviewProfiles()50 std::vector<Profile> CameraOutputCapability::GetPreviewProfiles()
51 {
52     return previewProfiles_;
53 }
54 
SetPreviewProfiles(std::vector<Profile> previewProfiles)55 void CameraOutputCapability::SetPreviewProfiles(std::vector<Profile> previewProfiles)
56 {
57     previewProfiles_ = previewProfiles;
58 }
59 
GetVideoProfiles()60 std::vector<VideoProfile> CameraOutputCapability::GetVideoProfiles()
61 {
62     return videoProfiles_;
63 }
64 
SetVideoProfiles(std::vector<VideoProfile> videoProfiles)65 void CameraOutputCapability::SetVideoProfiles(std::vector<VideoProfile> videoProfiles)
66 {
67     videoProfiles_ = videoProfiles;
68 }
69 
GetSupportedMetadataObjectType()70 std::vector<MetadataObjectType> CameraOutputCapability::GetSupportedMetadataObjectType()
71 {
72     return metadataObjTypes_;
73 }
74 
SetSupportedMetadataObjectType(std::vector<MetadataObjectType> metadataObjType)75 void CameraOutputCapability::SetSupportedMetadataObjectType(std::vector<MetadataObjectType> metadataObjType)
76 {
77     metadataObjTypes_ = metadataObjType;
78 }
79 } // CameraStandard
80 } // OHOS
81