1 /*
2  *  gstvaapicodedbuffer_priv.h - VA coded buffer abstraction (private defs)
3  *
4  *  Copyright (C) 2013 Intel Corporation
5  *    Author: Wind Yuan <feng.yuan@intel.com>
6  *    Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
7  *
8  *  This library is free software; you can redistribute it and/or
9  *  modify it under the terms of the GNU Lesser General Public License
10  *  as published by the Free Software Foundation; either version 2.1
11  *  of the License, or (at your option) any later version.
12  *
13  *  This library is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  *  Lesser General Public License for more details.
17  *
18  *  You should have received a copy of the GNU Lesser General Public
19  *  License along with this library; if not, write to the Free
20  *  Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  *  Boston, MA 02110-1301 USA
22  */
23 
24 #ifndef GST_VAAPI_CODED_BUFFER_PRIV_H
25 #define GST_VAAPI_CODED_BUFFER_PRIV_H
26 
27 #include <gst/vaapi/gstvaapicontext.h>
28 #include "gstvaapicodedbuffer.h"
29 #include "gstvaapiobject_priv.h"
30 
31 G_BEGIN_DECLS
32 
33 #define GST_VAAPI_CODED_BUFFER_CAST(obj) \
34     ((GstVaapiCodedBuffer *)(obj))
35 
36 typedef struct _GstVaapiCodedBufferClass        GstVaapiCodedBufferClass;
37 
38 /**
39  * GstVaapiCodedBuffer:
40  *
41  * A VA coded buffer object wrapper.
42  */
43 struct _GstVaapiCodedBuffer
44 {
45   /*< private >*/
46   GstVaapiObject parent_instance;
47 
48   GstVaapiContext      *context;
49   VACodedBufferSegment *segment_list;
50 };
51 
52 /**
53  * GstVaapiCodedBufferClass:
54  *
55  * A VA coded buffer object wrapper class.
56  */
57 struct _GstVaapiCodedBufferClass
58 {
59   /*< private >*/
60   GstVaapiObjectClass parent_class;
61 };
62 
63 G_GNUC_INTERNAL
64 GstVaapiCodedBuffer *
65 gst_vaapi_coded_buffer_new (GstVaapiContext * context, guint buf_size);
66 
67 G_GNUC_INTERNAL
68 gboolean
69 gst_vaapi_coded_buffer_map (GstVaapiCodedBuffer * buf,
70     VACodedBufferSegment ** out_segment_list_ptr);
71 
72 G_GNUC_INTERNAL
73 void
74 gst_vaapi_coded_buffer_unmap (GstVaapiCodedBuffer * buf);
75 
76 G_END_DECLS
77 
78 #endif /* GST_VAAPI_CODED_BUFFER_PRIV_H */
79