## gstvideo

gstvideo — Support library for video operations

## Synopsis

    #include <gst/video/video.h>

    #define             GST_VIDEO_BLUE_MASK_15
    #define             GST_VIDEO_BLUE_MASK_15_INT
    #define             GST_VIDEO_BLUE_MASK_16
    #define             GST_VIDEO_BLUE_MASK_16_INT
    #define             GST_VIDEO_BYTE1_MASK_24
    #define             GST_VIDEO_BYTE1_MASK_24_INT
    #define             GST_VIDEO_BYTE1_MASK_32
    #define             GST_VIDEO_BYTE1_MASK_32_INT
    #define             GST_VIDEO_BYTE2_MASK_24
    #define             GST_VIDEO_BYTE2_MASK_24_INT
    #define             GST_VIDEO_BYTE2_MASK_32
    #define             GST_VIDEO_BYTE2_MASK_32_INT
    #define             GST_VIDEO_BYTE3_MASK_24
    #define             GST_VIDEO_BYTE3_MASK_24_INT
    #define             GST_VIDEO_BYTE3_MASK_32
    #define             GST_VIDEO_BYTE3_MASK_32_INT
    #define             GST_VIDEO_BYTE4_MASK_32
    #define             GST_VIDEO_BYTE4_MASK_32_INT
    #define             GST_VIDEO_CAPS_ABGR
    #define             GST_VIDEO_CAPS_ARGB
    #define             GST_VIDEO_CAPS_BGR
    #define             GST_VIDEO_CAPS_BGRA
    #define             GST_VIDEO_CAPS_BGRx
    #define             GST_VIDEO_CAPS_BGRx_HOST_ENDIAN
    #define             GST_VIDEO_CAPS_RGB
    #define             GST_VIDEO_CAPS_RGBA
    #define             GST_VIDEO_CAPS_RGB_15
    #define             GST_VIDEO_CAPS_RGB_16
    #define             GST_VIDEO_CAPS_RGBx
    #define             GST_VIDEO_CAPS_YUV                  (fourcc)
    #define             GST_VIDEO_CAPS_xBGR
    #define             GST_VIDEO_CAPS_xRGB
    #define             GST_VIDEO_CAPS_xRGB_HOST_ENDIAN
    #define             GST_VIDEO_FPS_RANGE
    #define             GST_VIDEO_GREEN_MASK_15
    #define             GST_VIDEO_GREEN_MASK_15_INT
    #define             GST_VIDEO_GREEN_MASK_16
    #define             GST_VIDEO_GREEN_MASK_16_INT
    #define             GST_VIDEO_RED_MASK_15
    #define             GST_VIDEO_RED_MASK_15_INT
    #define             GST_VIDEO_RED_MASK_16
    #define             GST_VIDEO_RED_MASK_16_INT
    #define             GST_VIDEO_SIZE_RANGE
    gboolean            gst_video_calculate_display_ratio   (guint *dar_n,
                                                             guint *dar_d,
                                                             guint video_width,
                                                             guint video_height,
                                                             guint video_par_n,
                                                             guint video_par_d,
                                                             guint display_par_n,
                                                             guint display_par_d);
    const GValue*       gst_video_frame_rate                (GstPad *pad);
    gboolean            gst_video_get_size                  (GstPad *pad,
                                                             gint *width,
                                                             gint *height);

## Description

This library contains some helper functions and includes the videosink and videofilter base classes.

## Details

### GST_VIDEO_BLUE_MASK_15

    #define GST_VIDEO_BLUE_MASK_15 "0x001f"

### GST_VIDEO_BLUE_MASK_15_INT

    #define GST_VIDEO_BLUE_MASK_15_INT 0x001f

### GST_VIDEO_BLUE_MASK_16

    #define GST_VIDEO_BLUE_MASK_16 "0x001f"

### GST_VIDEO_BLUE_MASK_16_INT

    #define GST_VIDEO_BLUE_MASK_16_INT 0x001f

### GST_VIDEO_BYTE1_MASK_24

    #define GST_VIDEO_BYTE1_MASK_24  "0x00FF0000"

### GST_VIDEO_BYTE1_MASK_24_INT

    #define GST_VIDEO_BYTE1_MASK_24_INT  0x00FF0000

### GST_VIDEO_BYTE1_MASK_32

    #define GST_VIDEO_BYTE1_MASK_32  "0xFF000000"

### GST_VIDEO_BYTE1_MASK_32_INT

    #define GST_VIDEO_BYTE1_MASK_32_INT  0xFF000000

### GST_VIDEO_BYTE2_MASK_24

    #define GST_VIDEO_BYTE2_MASK_24  "0x0000FF00"

### GST_VIDEO_BYTE2_MASK_24_INT

    #define GST_VIDEO_BYTE2_MASK_24_INT  0x0000FF00

### GST_VIDEO_BYTE2_MASK_32

    #define GST_VIDEO_BYTE2_MASK_32  "0x00FF0000"

### GST_VIDEO_BYTE2_MASK_32_INT

    #define GST_VIDEO_BYTE2_MASK_32_INT  0x00FF0000

### GST_VIDEO_BYTE3_MASK_24

    #define GST_VIDEO_BYTE3_MASK_24  "0x000000FF"

### GST_VIDEO_BYTE3_MASK_24_INT

    #define GST_VIDEO_BYTE3_MASK_24_INT  0x000000FF

### GST_VIDEO_BYTE3_MASK_32

    #define GST_VIDEO_BYTE3_MASK_32  "0x0000FF00"

### GST_VIDEO_BYTE3_MASK_32_INT

    #define GST_VIDEO_BYTE3_MASK_32_INT  0x0000FF00

### GST_VIDEO_BYTE4_MASK_32

    #define GST_VIDEO_BYTE4_MASK_32  "0x000000FF"

### GST_VIDEO_BYTE4_MASK_32_INT

    #define GST_VIDEO_BYTE4_MASK_32_INT  0x000000FF

### GST_VIDEO_CAPS_ABGR

    #define             GST_VIDEO_CAPS_ABGR

### GST_VIDEO_CAPS_ARGB

    #define             GST_VIDEO_CAPS_ARGB

### GST_VIDEO_CAPS_BGR

    #define             GST_VIDEO_CAPS_BGR

### GST_VIDEO_CAPS_BGRA

    #define             GST_VIDEO_CAPS_BGRA

### GST_VIDEO_CAPS_BGRx

    #define             GST_VIDEO_CAPS_BGRx

### GST_VIDEO_CAPS_BGRx_HOST_ENDIAN

    #define             GST_VIDEO_CAPS_BGRx_HOST_ENDIAN

### GST_VIDEO_CAPS_RGB

    #define             GST_VIDEO_CAPS_RGB

### GST_VIDEO_CAPS_RGBA

    #define             GST_VIDEO_CAPS_RGBA

### GST_VIDEO_CAPS_RGB_15

    #define             GST_VIDEO_CAPS_RGB_15

### GST_VIDEO_CAPS_RGB_16

    #define             GST_VIDEO_CAPS_RGB_16

### GST_VIDEO_CAPS_RGBx

    #define             GST_VIDEO_CAPS_RGBx

### GST_VIDEO_CAPS_YUV()

    #define             GST_VIDEO_CAPS_YUV(fourcc)

`fourcc` : |

### GST_VIDEO_CAPS_xBGR

    #define             GST_VIDEO_CAPS_xBGR

### GST_VIDEO_CAPS_xRGB

    #define             GST_VIDEO_CAPS_xRGB

### GST_VIDEO_CAPS_xRGB_HOST_ENDIAN

    #define             GST_VIDEO_CAPS_xRGB_HOST_ENDIAN

### GST_VIDEO_FPS_RANGE

    #define GST_VIDEO_FPS_RANGE "(fraction) [ 0, max ]"

### GST_VIDEO_GREEN_MASK_15

    #define GST_VIDEO_GREEN_MASK_15 "0x03e0"

### GST_VIDEO_GREEN_MASK_15_INT

    #define GST_VIDEO_GREEN_MASK_15_INT 0x03e0

### GST_VIDEO_GREEN_MASK_16

    #define GST_VIDEO_GREEN_MASK_16 "0x07e0"

### GST_VIDEO_GREEN_MASK_16_INT

    #define GST_VIDEO_GREEN_MASK_16_INT 0x07e0

### GST_VIDEO_RED_MASK_15

    #define GST_VIDEO_RED_MASK_15 "0x7c00"

### GST_VIDEO_RED_MASK_15_INT

    #define GST_VIDEO_RED_MASK_15_INT 0x7c00

### GST_VIDEO_RED_MASK_16

    #define GST_VIDEO_RED_MASK_16 "0xf800"

### GST_VIDEO_RED_MASK_16_INT

    #define GST_VIDEO_RED_MASK_16_INT 0xf800

### GST_VIDEO_SIZE_RANGE

    #define GST_VIDEO_SIZE_RANGE "(int) [ 1, max ]"

### gst_video_calculate_display_ratio ()

    gboolean            gst_video_calculate_display_ratio   (guint *dar_n,
                                                             guint *dar_d,
                                                             guint video_width,
                                                             guint video_height,
                                                             guint video_par_n,
                                                             guint video_par_d,
                                                             guint display_par_n,
                                                             guint display_par_d);

Given the Pixel Aspect Ratio and size of an input video frame, and the pixel aspect ratio of the intended display device, calculates the actual display ratio the video will be rendered with.

`dar_n` : | Numerator of the calculated display_ratio
`dar_d` : | Denominator of the calculated display_ratio
`video_width` : | Width of the video frame in pixels
`video_height` : | Height of the video frame in pixels
`video_par_n` : | Numerator of the pixel aspect ratio of the input video.
`video_par_d` : | Denominator of the pixel aspect ratio of the input video.
`display_par_n` : | Numerator of the pixel aspect ratio of the display device
`display_par_d` : | Denominator of the pixel aspect ratio of the display device
Returns : | A boolean indicating success and a calculated Display Ratio in the dar_n and dar_d parameters. The return value is FALSE in the case of integer overflow or other error.

Since 0.10.7

### gst_video_frame_rate ()

    const GValue*       gst_video_frame_rate                (GstPad *pad);

`pad` : |
Returns : |

### gst_video_get_size ()

    gboolean            gst_video_get_size                  (GstPad *pad,
                                                             gint *width,
                                                             gint *height);

`pad` : |
`width` : |
`height` : |
Returns : |