• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * gstxcambuffermeta.h - gst xcam buffer meta data
3  *
4  *  Copyright (c) 2014-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: Wind Yuan <feng.yuan@intel.com>
19  */
20 
21 #ifndef GST_XCAM_BUFFER_META_H
22 #define GST_XCAM_BUFFER_META_H
23 
24 #include <gst/gst.h>
25 #include <gst/gstmeta.h>
26 
27 #include <video_buffer.h>
28 
29 XCAM_BEGIN_DECLARE
30 
31 #define GST_XCAM_META_TAG_XCAM  "xcam"
32 #define GST_XCAM_META_TAG_BUF   "buf"
33 
34 #define GST_XCAM_BUFFER_META_API_TYPE  \
35     (gst_xcam_buffer_meta_api_get_type ())
36 
37 #define gst_buffer_get_xcam_buffer_meta(b) \
38     ((GstXCamBufferMeta*)gst_buffer_get_meta ((b), GST_XCAM_BUFFER_META_API_TYPE))
39 
40 typedef struct _GstXCamBufferMeta {
41     GstMeta                           meta_base;
42     XCam::SmartPtr<XCam::VideoBuffer> buffer;
43 } GstXCamBufferMeta;
44 
45 GType
46 gst_xcam_buffer_meta_api_get_type (void);
47 
48 GstXCamBufferMeta *
49 gst_buffer_add_xcam_buffer_meta (
50     GstBuffer *buffer,
51     const XCam::SmartPtr<XCam::VideoBuffer>  &data);
52 
53 XCAM_END_DECLARE
54 
55 #endif //GST_XCAM_BUFFER_META_H
56