## GstTypes

GstTypes — various global enums and constants

## Synopsis

    #include <gst/gst.h>

    enum        GstElementState;
    enum        GstElementStateReturn;
    enum        GstResult;
    enum        GstRank;
    #define     GST_PADDING
    #define     GST_PADDING_INIT

## Description

## Details

### enum GstElementState

    typedef enum {
      GST_STATE_VOID_PENDING        = 0,
      GST_STATE_NULL                = (1 << 0),
      GST_STATE_READY               = (1 << 1),
      GST_STATE_PAUSED              = (1 << 2),
      GST_STATE_PLAYING             = (1 << 3)
    } GstElementState;

These contants describe the state a GstElement is in and transition scheduled for the GstElement (the pending state).

`GST_STATE_VOID_PENDING` | no transition is schedules for this element
`GST_STATE_NULL` | this is the default state all elements are in, after they have been created and are doing nothing
`GST_STATE_READY` | the element is ready to start doing something
`GST_STATE_PAUSED` | the element is paused for a period of time
`GST_STATE_PLAYING` | the element is doing something

### enum GstElementStateReturn

    typedef enum {
      GST_STATE_FAILURE             = 0,
      GST_STATE_SUCCESS             = 1,
      GST_STATE_ASYNC               = 2
    } GstElementStateReturn;

One of these values is returned from a `gst_element_set_state()` call. As GST_STATE_FAILURE is equal to 0, one can use a boolean comparission against the GstElementStateReturn value.

`GST_STATE_FAILURE` | the state of the element could not be changed
`GST_STATE_SUCCESS` | the state of the element has already be changed
`GST_STATE_ASYNC` | the state of the element will change in the near future

### enum GstResult

    typedef enum {
      GST_RESULT_OK,
      GST_RESULT_NOK,
      GST_RESULT_NOT_IMPL
    } GstResult;

### enum GstRank

    typedef enum {
      GST_RANK_NONE                 = 0,
      GST_RANK_MARGINAL             = 64,
      GST_RANK_SECONDARY            = 128,
      GST_RANK_PRIMARY              = 256
    } GstRank;

Element priority ranks. Defines the order in which the autoplugger (or similar rank-picking mechanisms) will choose this element over an alternative one with the same function. The rank is a unsigned integer ranging from 0 (GST_RANK_NONE) to 256 (GST_RANK_PRIMARY). These constants serve as a rough guidiance for defining the rank of a GstPlugin using `gst_plugin_feature_set_rank()`.

`GST_RANK_NONE` | will be chosen last or not at all
`GST_RANK_MARGINAL` | unlikly to be chosen
`GST_RANK_SECONDARY` | likely to be chosen
`GST_RANK_PRIMARY` | will be chosen first

### GST_PADDING

    #define GST_PADDING 4

### GST_PADDING_INIT

    #define GST_PADDING_INIT	{ 0 }