1 /* 2 * Copyright (c) 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 CAPTURE_OUTPUT_FUZZER_H 17 #define CAPTURE_OUTPUT_FUZZER_H 18 19 #include "capture_output.h" 20 21 namespace OHOS { 22 namespace CameraStandard { 23 24 class CaptureOutputTest : public CaptureOutput { 25 public: CaptureOutputTest(CaptureOutputType outputType,StreamType streamType,sptr<IBufferProducer> bufferProducer,sptr<IStreamCommon> stream)26 CaptureOutputTest(CaptureOutputType outputType, 27 StreamType streamType, sptr<IBufferProducer> bufferProducer, 28 sptr<IStreamCommon> stream): CaptureOutput(outputType, streamType, bufferProducer, stream){}; Release()29 int32_t Release() override 30 { 31 return 0; 32 } CameraServerDied(pid_t pid)33 void CameraServerDied(pid_t pid) override {} CreateStream()34 int32_t CreateStream() override 35 { 36 return 0; 37 } CaptureOutputTest1()38 void CaptureOutputTest1() 39 { 40 CaptureOutput::GetOutputTypeString(); 41 } 42 }; 43 44 class CaptureOutputFuzzer { 45 public: 46 static std::shared_ptr<CaptureOutput> fuzz_; 47 static CaptureOutputTest captureOutputTest; 48 static void CaptureOutputFuzzTest(); 49 }; 50 } //CameraStandard 51 } //OHOS 52 #endif //CAPTURE_OUTPUT_FUZZER_H