GstVaapiDisplay

GstVaapiDisplay — VA display abstraction

Synopsis

                    GstVaapiDisplay;
                    GstVaapiDisplayClass;
GstVaapiDisplay *   gst_vaapi_display_new_with_display  (VADisplay va_display);
void                gst_vaapi_display_lock              (GstVaapiDisplay *display);
void                gst_vaapi_display_unlock            (GstVaapiDisplay *display);
void                gst_vaapi_display_sync              (GstVaapiDisplay *display);
void                gst_vaapi_display_flush             (GstVaapiDisplay *display);
VADisplay           gst_vaapi_display_get_display       (GstVaapiDisplay *display);
guint               gst_vaapi_display_get_width         (GstVaapiDisplay *display);
guint               gst_vaapi_display_get_height        (GstVaapiDisplay *display);
void                gst_vaapi_display_get_size          (GstVaapiDisplay *display,
                                                         guint *pwidth,
                                                         guint *pheight);
void                gst_vaapi_display_get_pixel_aspect_ratio
                                                        (GstVaapiDisplay *display,
                                                         guint *par_n,
                                                         guint *par_d);
GstCaps *           gst_vaapi_display_get_decode_caps   (GstVaapiDisplay *display);
gboolean            gst_vaapi_display_has_decoder       (GstVaapiDisplay *display,
                                                         GstVaapiProfile profile,
                                                         GstVaapiEntrypoint entrypoint);
GstCaps *           gst_vaapi_display_get_encode_caps   (GstVaapiDisplay *display);
gboolean            gst_vaapi_display_has_encoder       (GstVaapiDisplay *display,
                                                         GstVaapiProfile profile,
                                                         GstVaapiEntrypoint entrypoint);
GstCaps *           gst_vaapi_display_get_image_caps    (GstVaapiDisplay *display);
gboolean            gst_vaapi_display_has_image_format  (GstVaapiDisplay *display,
                                                         GstVaapiImageFormat format);
GstCaps *           gst_vaapi_display_get_subpicture_caps
                                                        (GstVaapiDisplay *display);
gboolean            gst_vaapi_display_has_subpicture_format
                                                        (GstVaapiDisplay *display,
                                                         GstVaapiImageFormat format);

Object Hierarchy

  GObject
   +----GstVaapiDisplay
         +----GstVaapiDisplayX11

Properties

  "display"                  gpointer              : Read / Write / Construct Only
  "height"                   guint                 : Read
  "width"                    guint                 : Read

Description

Details

GstVaapiDisplay

typedef struct _GstVaapiDisplay GstVaapiDisplay;

Base class for VA displays.


GstVaapiDisplayClass

typedef struct {
    gboolean   (*open_display)  (GstVaapiDisplay *display);
    void       (*close_display) (GstVaapiDisplay *display);
    void       (*lock)          (GstVaapiDisplay *display);
    void       (*unlock)        (GstVaapiDisplay *display);
    void       (*sync)          (GstVaapiDisplay *display);
    void       (*flush)         (GstVaapiDisplay *display);
    VADisplay  (*get_display)   (GstVaapiDisplay *display);
    void       (*get_size)      (GstVaapiDisplay *display,
                                 guint *pwidth, guint *pheight);
    void       (*get_size_mm)   (GstVaapiDisplay *display,
                                 guint *pwidth, guint *pheight);
} GstVaapiDisplayClass;

Base class for VA displays.

open_display ()

virtual function to open a display

close_display ()

virtual function to close a display

lock ()

(optional) virtual function to lock a display

unlock ()

(optional) virtual function to unlock a display

sync ()

(optional) virtual function to sync a display

flush ()

(optional) virtual function to flush pending requests of a display

get_display ()

virtual function to retrieve the VADisplay

get_size ()

virtual function to retrieve the display dimensions, in pixels

get_size_mm ()

virtual function to retrieve the display dimensions, in millimeters

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.

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.

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.

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.

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.

display :

a GstVaapiDisplay

gst_vaapi_display_get_display ()

VADisplay           gst_vaapi_display_get_display       (GstVaapiDisplay *display);

Returns the VADisplay bound to display.

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.

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

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.

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.

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_get_decode_caps ()

GstCaps *           gst_vaapi_display_get_decode_caps   (GstVaapiDisplay *display);

Gets the supported profiles for decoding as GstCaps capabilities.

display :

a GstVaapiDisplay

Returns :

a newly allocated GstCaps object, possibly empty

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.

display :

a GstVaapiDisplay

profile :

a VAProfile

entrypoint :

a GstVaaiEntrypoint

Returns :

TRUE if VA display supports profile for decoding.

gst_vaapi_display_get_encode_caps ()

GstCaps *           gst_vaapi_display_get_encode_caps   (GstVaapiDisplay *display);

Gets the supported profiles for decoding as GstCaps capabilities.

display :

a GstVaapiDisplay

Returns :

a newly allocated GstCaps object, possibly empty

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.

display :

a GstVaapiDisplay

profile :

a VAProfile

entrypoint :

a GstVaapiEntrypoint

Returns :

TRUE if VA display supports profile for encoding.

gst_vaapi_display_get_image_caps ()

GstCaps *           gst_vaapi_display_get_image_caps    (GstVaapiDisplay *display);

Gets the supported image formats for gst_vaapi_surface_get_image() or gst_vaapi_surface_put_image() as GstCaps capabilities.

Note that this method does not necessarily map image formats returned by vaQueryImageFormats(). The set of capabilities can be stripped down, if gstreamer-vaapi does not support the format, or expanded to cover compatible formats not exposed by the underlying driver. e.g. I420 can be supported even if the driver only exposes YV12.

display :

a GstVaapiDisplay

Returns :

a newly allocated GstCaps object, possibly empty

gst_vaapi_display_has_image_format ()

gboolean            gst_vaapi_display_has_image_format  (GstVaapiDisplay *display,
                                                         GstVaapiImageFormat format);

Returns whether VA display supports format image format.

display :

a GstVaapiDisplay

format :

a GstVaapiFormat

Returns :

TRUE if VA display supports format image format

gst_vaapi_display_get_subpicture_caps ()

GstCaps *           gst_vaapi_display_get_subpicture_caps
                                                        (GstVaapiDisplay *display);

Gets the supported subpicture formats as GstCaps capabilities.

Note that this method does not necessarily map subpicture formats returned by vaQuerySubpictureFormats(). The set of capabilities can be stripped down if gstreamer-vaapi does not support the format. e.g. this is the case for paletted formats like IA44.

display :

a GstVaapiDisplay

Returns :

a newly allocated GstCaps object, possibly empty

gst_vaapi_display_has_subpicture_format ()

gboolean            gst_vaapi_display_has_subpicture_format
                                                        (GstVaapiDisplay *display,
                                                         GstVaapiImageFormat format);

Returns whether VA display supports format subpicture format.

display :

a GstVaapiDisplay

format :

a GstVaapiFormat

Returns :

TRUE if VA display supports format subpicture format

Property Details

The "display" property

  "display"                  gpointer              : Read / Write / Construct Only

VA display.


The "height" property

  "height"                   guint                 : Read

The display height.

Allowed values: >= 1

Default value: 1


The "width" property

  "width"                    guint                 : Read

The display width.

Allowed values: >= 1

Default value: 1