• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 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 OHOS_MOCK_DATA_PROCESS_PIPELINE_H
17 #define OHOS_MOCK_DATA_PROCESS_PIPELINE_H
18 
19 #include <cstdlib>
20 #include <vector>
21 
22 #include "data_buffer.h"
23 #include "data_process_listener.h"
24 #include "distributed_camera_errno.h"
25 #include "idata_process_pipeline.h"
26 #include "image_common_type.h"
27 
28 namespace OHOS {
29 namespace DistributedHardware {
30 class MockDataProcessPipeline : public IDataProcessPipeline,
31     public std::enable_shared_from_this<MockDataProcessPipeline> {
32 public:
~MockDataProcessPipeline()33     ~MockDataProcessPipeline()
34     {
35     }
36 
CreateDataProcessPipeline(PipelineType piplineType,const VideoConfigParams & sourceConfig,const VideoConfigParams & targetConfig,const std::shared_ptr<DataProcessListener> & listener)37     int32_t CreateDataProcessPipeline(PipelineType piplineType,
38         const VideoConfigParams& sourceConfig, const VideoConfigParams& targetConfig,
39         const std::shared_ptr<DataProcessListener>& listener)
40     {
41         return DCAMERA_OK;
42     }
43 
ProcessData(std::vector<std::shared_ptr<DataBuffer>> & dataBuffers)44     int32_t ProcessData(std::vector<std::shared_ptr<DataBuffer>>& dataBuffers)
45     {
46         return DCAMERA_OK;
47     }
48 
DestroyDataProcessPipeline()49     void DestroyDataProcessPipeline()
50     {
51     }
52 
GetProperty(const std::string & propertyName,PropertyCarrier & propertyCarrier)53     int32_t GetProperty(const std::string& propertyName, PropertyCarrier& propertyCarrier)
54     {
55         return DCAMERA_OK;
56     }
57 };
58 } // namespace DistributedHardware
59 } // namespace OHOS
60 #endif // OHOS_MOCK_DATA_PROCESS_PIPELINE_H
61