[v4l2videodecoder] Support TBM for output buffer
[platform/upstream/gst-plugins-good.git] / sys / v4l2 / gstv4l2allocator.h
index eb51524..7e959f0 100644 (file)
 #include "ext/videodev2.h"
 #include <gst/gst.h>
 #include <gst/gstatomicqueue.h>
+#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+#include <tbm_surface.h>
+#include <tbm_surface_internal.h>
+#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
 
 G_BEGIN_DECLS
 
@@ -90,6 +94,9 @@ struct _GstV4l2MemoryGroup
   gint mems_allocated;
   struct v4l2_buffer buffer;
   struct v4l2_plane planes[VIDEO_MAX_PLANES];
+#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+  tbm_surface_h surface;
+#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
 };
 
 struct _GstV4l2Allocator
@@ -104,7 +111,11 @@ struct _GstV4l2Allocator
   GstV4l2MemoryGroup * groups[VIDEO_MAX_FRAME];
   GstAtomicQueue *free_queue;
   GstAtomicQueue *pending_queue;
-
+#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+  tbm_bufmgr bufmgr;
+  tbm_surface_info_s s_info;
+  gint live_buffer_count;
+#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
 };
 
 struct _GstV4l2AllocatorClass {