# GstMLBufferPool
Source: [https://docs.qualcomm.com/doc/80-70014-50/topic/ml-api-gstmlbufferpool.html](https://docs.qualcomm.com/doc/80-70014-50/topic/ml-api-gstmlbufferpool.html)
GstMLBufferPool is a special GstBufferPool subclass for ML tensor buffers. It allows
you to configure the tensor-specific requirements such as multiple [GstMemory](https://gstreamer.freedesktop.org/documentation/gstreamer/gstmemory.html?gi-language=c) blocks in a single [GstBuffer](https://gstreamer.freedesktop.org/documentation/gstreamer/gstbuffer.html?gi-language=c).
You can also configure the following using GstMLBufferPool:
- Type of memory used for allocation.
- Addition of GstMLTensorMeta to the buffers.
Figure : GstBufferPool subclass for ML

## Prototype
Creates a new buffer pool that can allocate the ML frames.
GstBufferPool *
gst_ml_buffer_pool_new (const gchar * type)
Copy to clipboard
## Parameters
| [in] | `type` | The memory used by the pool to allocate buffers. |
| :--- | :--- | :--- |
## Returns
- A new [GstBufferPool](https://gstreamer.freedesktop.org/documentation/gstreamer/gstbufferpool.html?gi-language=c) to allocate ML
frames.
- Free with [gst_object_unref](https://gstreamer.freedesktop.org/documentation/gstreamer/gstobject.html#gst_object_unref).
## Arguments
The following arguments can be passed to
gst\_ml\_buffer\_pool\_new() to configure the buffer
memories:
| Argument | Description | Usage |
| --- | --- | --- |
| GST\_ML\_BUFFER\_POOL\_TYPE\_ION | Allocates buffers by passing it as arguments to
gst\_ml\_buffer\_pool\_new() | #define GST_ML_BUFFER_POOL_TYPE_ION "GstMLBufferPoolTypeIonMemory"Copy to clipboard |
| GST\_ML\_BUFFER\_POOL\_TYPE\_SYSTEM | Allocates buffers by passing it as arguments to
gst\_ml\_buffer\_pool\_new() | #define GST_ML_BUFFER_POOL_TYPE_SYSTEM "GstMLBufferPoolTypeSystemMemory"Copy to clipboard |
| GST\_ML\_BUFFER\_POOL\_OPTION\_TENSOR\_META | Requests ML tensor metadata on buffers from the pool. | #define GST_ML_BUFFER_POOL_OPTION_TENSOR_META "GstMLBufferPoolOptionTensorMeta"Copy to clipboard |
| GST\_ML\_BUFFER\_POOL\_OPTION\_CONTINUOUS | Requests all tensors to be into a continuous physical
memory. | #define GST_ML_BUFFER_POOL_OPTION_CONTINUOUS "GstMLBufferPoolOptionContinuous"Copy to clipboard |
| | | |
**Parent Topic:** [Machine learning APIs](https://docs.qualcomm.com/doc/80-70014-50/topic/machine-learning-apis.html)
Last Published: Oct 27, 2025
[Previous Topic
GstMLFrame](https://docs.qualcomm.com/bundle/publicresource/80-70014-50/topics/ml-api-gstmlframe.md) [Next Topic
Sample applications](https://docs.qualcomm.com/bundle/publicresource/80-70014-50/topics/example-applications.md)