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_PENDINGno transition is schedules for this element
GST_STATE_NULLthis is the default state all elements are in, after they have been created and are doing nothing
GST_STATE_READYthe element is ready to start doing something
GST_STATE_PAUSEDthe element is paused for a period of time
GST_STATE_PLAYINGthe 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_FAILUREthe state of the element could not be changed
GST_STATE_SUCCESSthe state of the element has already be changed
GST_STATE_ASYNCthe 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_NONEwill be chosen last or not at all
GST_RANK_MARGINALunlikly to be chosen
GST_RANK_SECONDARYlikely to be chosen
GST_RANK_PRIMARYwill be chosen first

GST_PADDING

#define GST_PADDING 4


GST_PADDING_INIT

#define GST_PADDING_INIT	{ 0 }