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 16 #include "image_common_type.h" 17 18 namespace OHOS { 19 namespace DistributedHardware { SetVideoCodecType(VideoCodecType videoCodec)20void VideoConfigParams::SetVideoCodecType(VideoCodecType videoCodec) 21 { 22 videoCodec_ = videoCodec; 23 } 24 SetVideoformat(Videoformat pixelFormat)25void VideoConfigParams::SetVideoformat(Videoformat pixelFormat) 26 { 27 pixelFormat_ = pixelFormat; 28 } 29 SetFrameRate(int32_t frameRate)30void VideoConfigParams::SetFrameRate(int32_t frameRate) 31 { 32 frameRate_ = frameRate; 33 } 34 SetWidthAndHeight(int32_t width,int32_t height)35void VideoConfigParams::SetWidthAndHeight(int32_t width, int32_t height) 36 { 37 width_ = width; 38 height_ = height; 39 } 40 GetVideoCodecType() const41VideoCodecType VideoConfigParams::GetVideoCodecType() const 42 { 43 return videoCodec_; 44 } 45 GetVideoformat() const46Videoformat VideoConfigParams::GetVideoformat() const 47 { 48 return pixelFormat_; 49 } 50 GetFrameRate() const51int32_t VideoConfigParams::GetFrameRate() const 52 { 53 return frameRate_; 54 } 55 GetWidth() const56int32_t VideoConfigParams::GetWidth() const 57 { 58 return width_; 59 } 60 GetHeight() const61int32_t VideoConfigParams::GetHeight() const 62 { 63 return height_; 64 } 65 } // namespace DistributedHardware 66 } // namespace OHOS 67