## GstVaapiDisplay

GstVaapiDisplay — VA display abstraction

## Functions

GstVaapiDisplay * | gst_vaapi_display_new_with_display ()
void | gst_vaapi_display_lock ()
void | gst_vaapi_display_unlock ()
void | gst_vaapi_display_sync ()
void | gst_vaapi_display_flush ()
VADisplay | gst_vaapi_display_get_display ()
guint | gst_vaapi_display_get_width ()
guint | gst_vaapi_display_get_height ()
void | gst_vaapi_display_get_size ()
void | gst_vaapi_display_get_pixel_aspect_ratio ()
gboolean | gst_vaapi_display_has_decoder ()
gboolean | gst_vaapi_display_has_encoder ()
gboolean | gst_vaapi_display_has_image_format ()
gboolean | gst_vaapi_display_has_subpicture_format ()
gboolean | gst_vaapi_display_has_property ()
GstVaapiRotation | gst_vaapi_display_get_rotation ()
gboolean | gst_vaapi_display_set_rotation ()
gboolean | gst_vaapi_display_get_render_mode ()
gboolean | gst_vaapi_display_set_render_mode ()

## Types and Values

| GstVaapiDisplay

## Object Hierarchy

## Description

## Functions

### gst_vaapi_display_new_with_display ()

    GstVaapiDisplay *
    gst_vaapi_display_new_with_display (VADisplay va_display);

Creates a new GstVaapiDisplay, using `va_display` as the VA display.

#### Parameters

va_display | a VADisplay |

#### Returns

the newly created GstVaapiDisplay object

### gst_vaapi_display_lock ()

    void
    gst_vaapi_display_lock (GstVaapiDisplay *display);

Locks `display` . If `display` is already locked by another thread, the current thread will block until `display` is unlocked by the other thread.

#### Parameters

display | a GstVaapiDisplay |

### gst_vaapi_display_unlock ()

    void
    gst_vaapi_display_unlock (GstVaapiDisplay *display);

Unlocks `display` . If another thread is blocked in a `gst_vaapi_display_lock()` call for `display` , it will be woken and can lock `display` itself.

#### Parameters

display | a GstVaapiDisplay |

### gst_vaapi_display_sync ()

    void
    gst_vaapi_display_sync (GstVaapiDisplay *display);

Flushes any requests queued for the windowing system and waits until all requests have been handled. This is often used for making sure that the display is synchronized with the current state of the program.

This is most useful for X11. On windowing systems where requests are handled synchronously, this function will do nothing.

#### Parameters

display | a GstVaapiDisplay |

### gst_vaapi_display_flush ()

    void
    gst_vaapi_display_flush (GstVaapiDisplay *display);

Flushes any requests queued for the windowing system.

This is most useful for X11. On windowing systems where requests are handled synchronously, this function will do nothing.

#### Parameters

display | a GstVaapiDisplay |

### gst_vaapi_display_get_display ()

    VADisplay
    gst_vaapi_display_get_display (GstVaapiDisplay *display);

Returns the VADisplay bound to `display` .

#### Parameters

display | a GstVaapiDisplay |

#### Returns

the VADisplay

### gst_vaapi_display_get_width ()

    guint
    gst_vaapi_display_get_width (GstVaapiDisplay *display);

Retrieves the width of a GstVaapiDisplay.

#### Parameters

display | a GstVaapiDisplay |

#### Returns

the width of the `display` , in pixels

### gst_vaapi_display_get_height ()

    guint
    gst_vaapi_display_get_height (GstVaapiDisplay *display);

Retrieves the height of a GstVaapiDisplay

#### Parameters

display | a GstVaapiDisplay |

#### Returns

the height of the `display` , in pixels

### gst_vaapi_display_get_size ()

    void
    gst_vaapi_display_get_size (GstVaapiDisplay *display,
                                guint *pwidth,
                                guint *pheight);

Retrieves the dimensions of a GstVaapiDisplay.

#### Parameters

display | a GstVaapiDisplay |
pwidth | return location for the width, or `NULL` |
pheight | return location for the height, or `NULL` |

### gst_vaapi_display_get_pixel_aspect_ratio ()

    void
    gst_vaapi_display_get_pixel_aspect_ratio
                                   (GstVaapiDisplay *display,
                                    guint *par_n,
                                    guint *par_d);

Retrieves the pixel aspect ratio of a GstVaapiDisplay.

#### Parameters

display | a GstVaapiDisplay |
par_n | return location for the numerator of pixel aspect ratio, or `NULL` |
par_d | return location for the denominator of pixel aspect ratio, or `NULL` |

### gst_vaapi_display_has_decoder ()

    gboolean
    gst_vaapi_display_has_decoder (GstVaapiDisplay *display,
                                   GstVaapiProfile profile,
                                   GstVaapiEntrypoint entrypoint);

Returns whether VA `display` supports `profile` for decoding at the specified `entrypoint` .

#### Parameters

display | a GstVaapiDisplay |
profile | a VAProfile |
entrypoint | a GstVaaiEntrypoint |

#### Returns

`TRUE` if VA `display` supports `profile` for decoding.

### gst_vaapi_display_has_encoder ()

    gboolean
    gst_vaapi_display_has_encoder (GstVaapiDisplay *display,
                                   GstVaapiProfile profile,
                                   GstVaapiEntrypoint entrypoint);

Returns whether VA `display` supports `profile` for encoding at the specified `entrypoint` .

#### Parameters

display | a GstVaapiDisplay |
profile | a VAProfile |
entrypoint | a GstVaapiEntrypoint |

#### Returns

`TRUE` if VA `display` supports `profile` for encoding.

### gst_vaapi_display_has_image_format ()

    gboolean
    gst_vaapi_display_has_image_format (GstVaapiDisplay *display,
                                        GstVideoFormat format);

Returns whether VA `display` supports `format` image format.

#### Parameters

display | a GstVaapiDisplay |
format | a GstVideoFormat |

#### Returns

`TRUE` if VA `display` supports `format` image format

### gst_vaapi_display_has_subpicture_format ()

    gboolean
    gst_vaapi_display_has_subpicture_format
                                   (GstVaapiDisplay *display,
                                    GstVideoFormat format,
                                    guint *flags_ptr);

Returns whether VA `display` supports `format` subpicture format with the supplied `flags` .

#### Parameters

display | a GstVaapiDisplay |
format | a GstVideoFormat |
flags_ptr | pointer to GstVaapiSubpictureFlags, or zero |

#### Returns

`TRUE` if VA `display` supports `format` subpicture format

### gst_vaapi_display_has_property ()

    gboolean
    gst_vaapi_display_has_property (GstVaapiDisplay *display,
                                    const gchar *name);

Returns whether VA `display` supports the requested property. The check is performed against the property `name` . So, the client application may perform this check only once and cache this information.

#### Parameters

display | a GstVaapiDisplay |
name | the property name to check |

#### Returns

`TRUE` if VA `display` supports property `name`

### gst_vaapi_display_get_rotation ()

    GstVaapiRotation
    gst_vaapi_display_get_rotation (GstVaapiDisplay *display);

Returns the current VA `display` rotation angle. If the VA driver does not support "rotation" display attribute, then the display is assumed to be un-rotated.

#### Parameters

display | a GstVaapiDisplay |

#### Returns

the current GstVaapiRotation value

### gst_vaapi_display_set_rotation ()

    gboolean
    gst_vaapi_display_set_rotation (GstVaapiDisplay *display,
                                    GstVaapiRotation rotation);

Sets the VA `display` rotation angle to the supplied `rotation` value. This function returns `FALSE` if the rotation angle could not be set, e.g. the VA driver does not allow to change the display rotation angle.

#### Parameters

display | a GstVaapiDisplay |
rotation | the GstVaapiRotation value to set |

#### Returns

`TRUE` if VA `display` rotation angle could be changed to the requested value

### gst_vaapi_display_get_render_mode ()

    gboolean
    gst_vaapi_display_get_render_mode (GstVaapiDisplay *display,
                                       GstVaapiRenderMode *pmode);

Returns the current VA `display` rendering mode.

#### Parameters

display | a GstVaapiDisplay |
pmode | return location for the VA `display` rendering mode |

#### Returns

`TRUE` if VA `display` rendering mode could be determined

### gst_vaapi_display_set_render_mode ()

    gboolean
    gst_vaapi_display_set_render_mode (GstVaapiDisplay *display,
                                       GstVaapiRenderMode mode);

Sets the VA `display` rendering mode to the supplied `mode` . This function returns `FALSE` if the rendering mode could not be set, e.g. run-time switching rendering mode is not supported.

#### Parameters

display | a GstVaapiDisplay |
mode | the GstVaapiRenderMode to set |

#### Returns

`TRUE` if VA `display` rendering `mode` could be changed to the requested value

## Types and Values

### GstVaapiDisplay

    typedef struct _GstVaapiDisplay GstVaapiDisplay;

Base class for VA displays.