• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
19 #include "deferred_video_processor.h"
20 #include "video_job_repository.h"
21 #include "video_strategy_center.h"
22 #include "video_post_processor.h"
23 #include <memory>
24 
25 namespace OHOS {
26 namespace CameraStandard {
27 using namespace DeferredProcessing;
28 class IVideoProcessCallbacksFuzz : public IVideoProcessCallbacks {
29 public:
OnProcessDone(const int32_t userId,const std::string & videoId,const sptr<IPCFileDescriptor> & ipcFd)30     void OnProcessDone(const int32_t userId,
31         const std::string& videoId, const sptr<IPCFileDescriptor>& ipcFd) override {}
OnError(const int32_t userId,const std::string & videoId,DpsError errorCode)32     void OnError(const int32_t userId, const std::string& videoId, DpsError errorCode) override {}
OnStateChanged(const int32_t userId,DpsStatus statusCode)33     void OnStateChanged(const int32_t userId, DpsStatus statusCode) override {}
34 };
35 
36 class DeferredVideoProcessorFuzzer {
37 public:
38 static std::shared_ptr<DeferredProcessing::DeferredVideoProcessor> fuzz_;
39 static std::shared_ptr<DeferredProcessing::VideoStrategyCenter> center_;
40 
41 static void DeferredVideoProcessorFuzzTest();
42 };
43 
44 } //CameraStandard
45 } //OHOS
46 #endif //DEFERREDPROCESSING_FUZZER_H