# GstMLType

Source: [https://docs.qualcomm.com/doc/80-70014-50/topic/ml-api-gstmltype.html](https://docs.qualcomm.com/doc/80-70014-50/topic/ml-api-gstmltype.html)

GstMLType enables you to get information on the GStreamer ML data types.

The following are the possible values describing the tensor format:| Enumeration | Description |
| --- | --- |
| GST\_ML\_TYPE\_UNKNOWN | Invalid data |
| GST\_ML\_TYPE\_INT8 | Data is represented as 1 byte of signed integer value |
| GST\_ML\_TYPE\_UINT8 | Data is represented as 1 byte of unsigned integer value |
| GST\_ML\_TYPE\_INT32 | Data is represented as 4 byte of signed integer value |
| GST\_ML\_TYPE\_UINT32 | Data is represented as 4 byte of unsigned integer value |
| GST\_ML\_TYPE\_FLOAT16 | Data is represented as 2 bytes of floating-point value |
| GST\_ML\_TYPE\_FLOAT32 | Data is represented as 4 bytes of floating-point value |

The following sections provide information on the GstMLType APIs.

## gst\_ml\_type\_get\_size

Returns the size of the GstMLType in bytes

**Prototype**

    guint
    gst_ml_type_get_size (GstMLType type)
    Copy to clipboard

**Parameters**

| [in] | `type` | A GstMLType |
| :--- | :--- | :--- |

**Returns**

The size in bytes.

## gst\_ml\_type\_from\_string

Returns GstMLType based on its string version.

**Prototype**

    GstMLType
    gst_ml_type_from_string (const gchar * type)
    Copy to clipboard

**Parameters**

| [in] | `type` | A char string version of a GstMLType |
| :--- | :--- | :--- |

**Returns**

A GstMLType

## gst\_ml\_type\_to\_string

Returns a char string version of a GstMLType

    const gchar *
    gst_ml_type_to_string (GstMLType type)
    Copy to clipboard

**Parameters**

| [in] | `type` | A string version of a GstMLType |
| :--- | :--- | :--- |

**Returns**

A new char string version of a GstMLType

**Parent Topic:** Machine learning APIs

Last Published: Oct 27, 2025

Previous Topic
 
Machine learning APIs Next Topic

GstMLInfo