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 DEFERREDPROCESSING_FUZZER_H 17 #define DEFERREDPROCESSING_FUZZER_H 18 #include <iostream> 19 #include "deferred_video_processing_session.h" 20 #include "ideferred_video_processing_session_callback.h" 21 #include "deferred_video_processing_session_stub.h" 22 23 namespace OHOS { 24 namespace CameraStandard { 25 using namespace DeferredProcessing; 26 27 class DeferredVideoProcessingSessionStubFuzz : public DeferredVideoProcessingSessionStub { 28 public: BeginSynchronize()29 int32_t BeginSynchronize() override 30 { 31 return 0; 32 } EndSynchronize()33 int32_t EndSynchronize() override 34 { 35 return 0; 36 } AddVideo(const std::string & videoId,const sptr<IPCFileDescriptor> & srcFd,const sptr<IPCFileDescriptor> & dstFd)37 int32_t AddVideo( 38 const std::string& videoId, 39 const sptr<IPCFileDescriptor>& srcFd, 40 const sptr<IPCFileDescriptor>& dstFd) override 41 { 42 return 0; 43 } RemoveVideo(const std::string & videoId,bool restorable)44 int32_t RemoveVideo( 45 const std::string& videoId, 46 bool restorable) override 47 { 48 return 0; 49 } RestoreVideo(const std::string & videoId)50 int32_t RestoreVideo( 51 const std::string& videoId) override 52 { 53 return 0; 54 } 55 }; 56 57 class DeferredVideoProcessingSessionStubFuzzer { 58 public: 59 static std::shared_ptr<DeferredVideoProcessingSessionStubFuzz> fuzz_; 60 static void OnRemoteRequest(int32_t code); 61 }; 62 } //CameraStandard 63 } //OHOS 64 #endif //DEFERREDPROCESSING_FUZZER_H