1 /* 2 * Copyright (c) 2023-2024 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 #ifndef SCREEN_DECISION_CENTER_TEST_H 17 #define SCREEN_DECISION_CENTER_TEST_H 18 19 #include <gtest/gtest.h> 20 #include "screen_decision_center.h" 21 #include "video_param.h" 22 namespace OHOS { 23 namespace DistributedHardware { 24 class ScreenDecisionCenterTest : public testing::Test { 25 public: 26 static void SetUpTestCase(void); 27 static void TearDownTestCase(void); 28 void SetUp(); 29 void TearDown(); 30 VideoParam param_; 31 std::shared_ptr<ScreenDecisionCenter> decision = nullptr; 32 }; 33 34 class ImageSourceProcessorStub : public ImageSourceProcessor { 35 public: 36 ImageSourceProcessorStub() = default; 37 ~ImageSourceProcessorStub() = default; ProcessFullImage(sptr<SurfaceBuffer> & surfaceBuffer)38 int32_t ProcessFullImage(sptr<SurfaceBuffer> &surfaceBuffer) 39 { 40 return 0; 41 } 42 }; 43 44 class JpegImageProcessorStub : public JpegImageProcessor { 45 public: JpegImageProcessorStub(const VideoParam & configParam)46 explicit JpegImageProcessorStub(const VideoParam &configParam) : JpegImageProcessor(configParam) {}; 47 ~JpegImageProcessorStub() = default; 48 ProcessDamageSurface(sptr<SurfaceBuffer> & surfaceBuffer,const std::vector<OHOS::Rect> & damages)49 int32_t ProcessDamageSurface(sptr<SurfaceBuffer> &surfaceBuffer, const std::vector<OHOS::Rect> &damages) 50 { 51 return 0; 52 } 53 }; 54 } // namespace DistributedHardware 55 } // namespace OHOS 56 #endif