1 /* 2 * Copyright (c) 2023 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 16 #include "video_device_descriptor_adapter_impl.h" 17 18 namespace OHOS::NWeb { 19 GetDisplayName()20std::string VideoDeviceDescriptorAdapterImpl::GetDisplayName() 21 { 22 return display_name_; 23 } 24 GetDeviceId()25std::string VideoDeviceDescriptorAdapterImpl::GetDeviceId() 26 { 27 return device_id_; 28 } 29 GetModelId()30std::string VideoDeviceDescriptorAdapterImpl::GetModelId() 31 { 32 return model_id_; 33 } 34 GetControlSupport()35std::shared_ptr<VideoControlSupportAdapter> VideoDeviceDescriptorAdapterImpl::GetControlSupport() 36 { 37 return control_support_; 38 } 39 GetTransportType()40VideoTransportType VideoDeviceDescriptorAdapterImpl::GetTransportType() 41 { 42 return transport_type_; 43 } 44 GetFacingMode()45VideoFacingModeAdapter VideoDeviceDescriptorAdapterImpl::GetFacingMode() 46 { 47 return facing_; 48 } 49 GetSupportCaptureFormats()50std::vector<std::shared_ptr<FormatAdapter>> VideoDeviceDescriptorAdapterImpl::GetSupportCaptureFormats() 51 { 52 return support_formats_; 53 } 54 SetDisplayName(std::string name)55void VideoDeviceDescriptorAdapterImpl::SetDisplayName(std::string name) 56 { 57 display_name_ = name; 58 } 59 SetDeviceId(std::string deviceId)60void VideoDeviceDescriptorAdapterImpl::SetDeviceId(std::string deviceId) 61 { 62 device_id_ = deviceId; 63 } 64 SetModelId(std::string modelId)65void VideoDeviceDescriptorAdapterImpl::SetModelId(std::string modelId) 66 { 67 model_id_ = modelId; 68 } 69 SetControlSupport(std::shared_ptr<VideoControlSupportAdapter> support)70void VideoDeviceDescriptorAdapterImpl::SetControlSupport(std::shared_ptr<VideoControlSupportAdapter> support) 71 { 72 control_support_ = support; 73 } 74 SetTransportType(VideoTransportType type)75void VideoDeviceDescriptorAdapterImpl::SetTransportType(VideoTransportType type) 76 { 77 transport_type_ = type; 78 } 79 SetFacingMode(VideoFacingModeAdapter facing)80void VideoDeviceDescriptorAdapterImpl::SetFacingMode(VideoFacingModeAdapter facing) 81 { 82 facing_ = facing; 83 } 84 SetSupportCaptureFormats(std::vector<std::shared_ptr<FormatAdapter>> formats)85void VideoDeviceDescriptorAdapterImpl::SetSupportCaptureFormats(std::vector<std::shared_ptr<FormatAdapter>> formats) 86 { 87 support_formats_ = formats; 88 } 89 90 } // namespace OHOS::NWeb 91