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 #ifndef DEFERREDPROCESSING_FUZZER_H 17 #define DEFERREDPROCESSING_FUZZER_H 18 19 #include "deferred_video_controller.h" 20 #include "video_job_repository.h" 21 #include "video_strategy_center.h" 22 #include "video_post_processor.h" 23 24 namespace OHOS { 25 namespace CameraStandard { 26 using namespace DeferredProcessing; 27 class IVideoProcessCallbacksFuzz : public IVideoProcessCallbacks { 28 public: OnProcessDone(const int32_t userId,const std::string & videoId,const sptr<IPCFileDescriptor> & ipcFd)29 void OnProcessDone(const int32_t userId, 30 const std::string& videoId, const sptr<IPCFileDescriptor>& ipcFd) override {} OnError(const int32_t userId,const std::string & videoId,DpsError errorCode)31 void OnError(const int32_t userId, const std::string& videoId, DpsError errorCode) override {} OnStateChanged(const int32_t userId,DpsStatus statusCode)32 void OnStateChanged(const int32_t userId, DpsStatus statusCode) override {} 33 }; 34 35 class DeferredVideoControllerFuzzer { 36 public: 37 static std::shared_ptr<DeferredProcessing::DeferredVideoController> fuzz_; 38 static std::shared_ptr<DeferredProcessing::VideoStrategyCenter> center_; 39 static void DeferredVideoControllerFuzzTest(); 40 }; 41 } //CameraStandard 42 } //OHOS 43 #endif //DEFERREDPROCESSING_FUZZER_H