#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
GstStructure *structure = NULL;
const gchar *caps_format = NULL;
+ GstMessage *msg = NULL;
+ GstV4l2BufferPool *capture_pool = NULL;
#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
GST_DEBUG_OBJECT (self, "Handling frame %d", frame->system_frame_number);
if (!gst_buffer_pool_set_active (GST_BUFFER_POOL (self->v4l2capture->pool),
TRUE))
goto activate_failed;
+#ifdef TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER
+ capture_pool = GST_V4L2_BUFFER_POOL (self->v4l2capture->pool);
+
+ msg = gst_message_new_element (GST_OBJECT_CAST (decoder),
+ gst_structure_new ("prepare-decode-buffers",
+ "num_buffers", G_TYPE_INT, capture_pool->num_allocated,
+ "extra_num_buffers", G_TYPE_INT, capture_pool->num_allocated - 2, NULL));
+
+ gst_element_post_message (GST_ELEMENT_CAST (decoder), msg);
+
+ GST_WARNING_OBJECT (self, "output buffer[%d]", capture_pool->num_allocated);
+#endif /* TIZEN_FEATURE_TBM_SUPPORT_FOR_V4L2_DECODER */
}
task_state = gst_pad_get_task_state (GST_VIDEO_DECODER_SRC_PAD (self));