1 /*
2  * gstxcambufferpool.h - buffer pool
3  *
4  *  Copyright (c) 2015 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: John Ye <john.ye@intel.com>
19  * Author: Wind Yuan <feng.yuan@intel.com>
20  */
21 
22 #ifndef GST_XCAM_BUFFER_POOL_H
23 #define GST_XCAM_BUFFER_POOL_H
24 
25 #include <gst/gst.h>
26 #include "main_dev_manager.h"
27 #include "gstxcamsrc.h"
28 
29 G_BEGIN_DECLS
30 
31 #define GST_TYPE_XCAM_BUFFER_POOL \
32   (gst_xcam_buffer_pool_get_type())
33 #define GST_XCAM_BUFFER_POOL(obj) \
34   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_XCAM_BUFFER_POOL,GstXCamBufferPool))
35 
36 typedef struct _GstXCamBufferPool      GstXCamBufferPool;
37 typedef struct _GstXCamBufferPoolClass GstXCamBufferPoolClass;
38 
39 struct _GstXCamBufferPool
40 {
41     GstBufferPool                              parent;
42     GstAllocator                              *allocator;
43     GstXCamSrc                                *src;
44     gboolean                                   need_video_meta;
45     XCam::SmartPtr<GstXCam::MainDeviceManager> device_manager;
46 };
47 
48 struct _GstXCamBufferPoolClass
49 {
50     GstBufferPoolClass parent_class;
51 };
52 
53 GType gst_xcam_buffer_pool_get_type (void);
54 
55 GstBufferPool *
56 gst_xcam_buffer_pool_new (GstXCamSrc *xcamsrc, GstCaps *caps, XCam::SmartPtr<GstXCam::MainDeviceManager> &device_manager);
57 
58 G_END_DECLS
59 
60 #endif // GST_XCAM_BUFFER_POOL_H
61