+
+/**
+ * gst_base_src_get_buffer_pool:
+ * @src: a #GstBaseSrc
+ *
+ * Returns: (transfer full): the instance of the #GstBufferPool used
+ * by the src; unref it after usage.
+ */
+GstBufferPool *
+gst_base_src_get_buffer_pool (GstBaseSrc * src)
+{
+ GstBufferPool *ret = NULL;
+
+ g_return_val_if_fail (GST_IS_BASE_SRC (src), NULL);
+
+ GST_OBJECT_LOCK (src);
+ if (src->priv->pool)
+ ret = gst_object_ref (src->priv->pool);
+ GST_OBJECT_UNLOCK (src);
+
+ return ret;
+}
+
+/**
+ * gst_base_src_get_allocator:
+ * @src: a #GstBaseSrc
+ * @allocator: (out) (allow-none) (transfer full): the #GstAllocator
+ * used
+ * @params: (out) (allow-none) (transfer full): the
+ * #GstAllocationParams of @allocator
+ *
+ * Lets #GstBaseSrc sub-classes to know the memory @allocator
+ * used by the base class and its @params.
+ *
+ * Unref the @allocator after usage.
+ */
+void
+gst_base_src_get_allocator (GstBaseSrc * src,
+ GstAllocator ** allocator, GstAllocationParams * params)
+{
+ g_return_if_fail (GST_IS_BASE_SRC (src));
+
+ GST_OBJECT_LOCK (src);
+ if (allocator)
+ *allocator = src->priv->allocator ?
+ gst_object_ref (src->priv->allocator) : NULL;
+
+ if (params)
+ *params = src->priv->params;
+ GST_OBJECT_UNLOCK (src);
+}
+
+/**
+ * gst_base_src_submit_buffer_list:
+ * @src: a #GstBaseSrc
+ * @buffer_list: (transfer full): a #GstBufferList
+ *
+ * Subclasses can call this from their create virtual method implementation
+ * to submit a buffer list to be pushed out later. This is useful in
+ * cases where the create function wants to produce multiple buffers to be
+ * pushed out in one go in form of a #GstBufferList, which can reduce overhead
+ * drastically, especially for packetised inputs (for data streams where
+ * the packetisation/chunking is not important it is usually more efficient
+ * to return larger buffers instead).
+ *
+ * Subclasses that use this function from their create function must return
+ * %GST_FLOW_OK and no buffer from their create virtual method implementation.
+ * If a buffer is returned after a buffer list has also been submitted via this
+ * function the behaviour is undefined.
+ *
+ * Subclasses must only call this function once per create function call and
+ * subclasses must only call this function when the source operates in push
+ * mode.
+ *
+ * Since: 1.14
+ */
+void
+gst_base_src_submit_buffer_list (GstBaseSrc * src, GstBufferList * buffer_list)
+{
+ g_return_if_fail (GST_IS_BASE_SRC (src));
+ g_return_if_fail (GST_IS_BUFFER_LIST (buffer_list));
+ g_return_if_fail (BASE_SRC_HAS_PENDING_BUFFER_LIST (src) == FALSE);
+
+ /* we need it to be writable later in get_range() where we use get_writable */
+ src->priv->pending_bufferlist = gst_buffer_list_make_writable (buffer_list);
+
+ GST_LOG_OBJECT (src, "%u buffers submitted in buffer list",
+ gst_buffer_list_length (buffer_list));
+}