• 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 #include "buffer_allocator.h"
17 
18 namespace OHOS::Camera {
Init()19 RetCode BufferAllocator::Init()
20 {
21     return RC_OK;
22 }
23 
AllocBuffer(const uint32_t,const uint32_t,const uint64_t,const uint32_t)24 std::shared_ptr<IBuffer> BufferAllocator::AllocBuffer(const uint32_t, const uint32_t, const uint64_t, const uint32_t)
25 {
26     return nullptr;
27 }
28 
FreeBuffer(std::shared_ptr<IBuffer> &)29 RetCode BufferAllocator::FreeBuffer(std::shared_ptr<IBuffer>&)
30 {
31     return RC_OK;
32 }
33 
MapBuffer(std::shared_ptr<IBuffer> &)34 RetCode BufferAllocator::MapBuffer(std::shared_ptr<IBuffer>&)
35 {
36     return RC_OK;
37 }
38 
UnmapBuffer(std::shared_ptr<IBuffer> &)39 RetCode BufferAllocator::UnmapBuffer(std::shared_ptr<IBuffer>&)
40 {
41     return RC_OK;
42 }
43 
FlushCache(std::shared_ptr<IBuffer> &)44 RetCode BufferAllocator::FlushCache(std::shared_ptr<IBuffer>&)
45 {
46     return RC_OK;
47 }
48 
InvalidateCache(std::shared_ptr<IBuffer> &)49 RetCode BufferAllocator::InvalidateCache(std::shared_ptr<IBuffer>&)
50 {
51     return RC_OK;
52 }
53 
54 REGISTER_BUFFER_ALLOCATOR(BufferAllocator, CAMERA_BUFFER_SOURCE_TYPE_NONE);
55 } // namespace OHOS::Camera
56 
57