• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * soft_video_buf_allocator.h - soft video buffer allocator class
3  *
4  *  Copyright (c) 2017 Intel Corporation
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * Author: Wind Yuan <feng.yuan@intel.com>
19  */
20 
21 #ifndef XCAM_SOFT_VIDEO_BUF_ALLOCATOR_H
22 #define XCAM_SOFT_VIDEO_BUF_ALLOCATOR_H
23 
24 #include <xcam_std.h>
25 #include <buffer_pool.h>
26 
27 namespace XCam {
28 
29 class SoftVideoBufAllocator
30     : public BufferPool
31 {
32 public:
33     explicit SoftVideoBufAllocator ();
34     explicit SoftVideoBufAllocator (const VideoBufferInfo &info);
35     virtual ~SoftVideoBufAllocator ();
36 
37 private:
38     //derive from BufferPool
39     virtual SmartPtr<BufferData> allocate_data (const VideoBufferInfo &buffer_info);
40 };
41 
42 #if 0
43 class AllocatorPool {
44 public:
45     explicit AllocatorPool ();
46     virtual ~AllocatorPool ();
47 
48     SmartPtr<VideoBuffer> allocate_video_buf (const VideoBufferInfo &info);
49 
50 private:
51     SafeList<BufferPool> _pools;
52 };
53 #endif
54 
55 }
56 
57 #endif //XCAM_SOFT_VIDEO_BUF_ALLOCATOR_H
58