# VA allocators

There are two types of VA allocators:

- GstVaAllocator
- GstVaDmabufAllocator

## VaAllocator

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstAllocator
                    ╰──VaAllocator

A pooled memory allocator backed by VASurfaceID.

Since : 1.22

## VaAllocator

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Allocator
                    ╰──VaAllocator

A pooled memory allocator backed by VASurfaceID.

Since : 1.22

## VaAllocator

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Allocator
                    ╰──VaAllocator

A pooled memory allocator backed by VASurfaceID.

Since : 1.22

### Constructors

#### gst_va_allocator_new

    GstAllocator *
    gst_va_allocator_new (GstVaDisplay * display,
                          GArray * surface_formats)

Instanciate a new pooled GstAllocator backed by VASurfaceID.

Parameters:

`display` –

a GstVaDisplay

`surface_formats` ( [element-typeguint][transfer: full]) –

a GArray of valid GstVideoFormat for surfaces in current VA context.

Returns –

a GstVaDisplay

Since : 1.22

#### GstVa.VaAllocator.prototype.new

    function GstVa.VaAllocator.prototype.new(display: GstVa.VaDisplay, surface_formats: [ Number ]): {
        // javascript wrapper for 'gst_va_allocator_new'
    }

Instanciate a new pooled Gst.Allocator backed by VASurfaceID.

Parameters:

`display` (GstVa.VaDisplay) –

a GstVa.VaDisplay

`surface_formats` ([ Number ]) –

a GArray (not introspectable) of valid GstVideo.VideoFormat for surfaces in current VA context.

Returns (Gst.Allocator) –

a GstVa.VaDisplay

Since : 1.22

#### GstVa.VaAllocator.new

    def GstVa.VaAllocator.new (display, surface_formats):
        #python wrapper for 'gst_va_allocator_new'

Instanciate a new pooled Gst.Allocator backed by VASurfaceID.

Parameters:

`display` (GstVa.VaDisplay) –

a GstVa.VaDisplay

`surface_formats` ([ int ]) –

a GArray (not introspectable) of valid GstVideo.VideoFormat for surfaces in current VA context.

Returns (Gst.Allocator) –

a GstVa.VaDisplay

Since : 1.22

### Functions

#### gst_va_allocator_alloc

    GstMemory *
    gst_va_allocator_alloc (GstAllocator * allocator)

Allocate a new VASurfaceID backed GstMemory.

Parameters:

`allocator` –

a GstAllocator

Returns –

a GstMemory backed with a VASurfaceID; NULL, otherwise.

Since : 1.22

#### GstVa.VaAllocator.prototype.alloc

    function GstVa.VaAllocator.prototype.alloc(allocator: Gst.Allocator): {
        // javascript wrapper for 'gst_va_allocator_alloc'
    }

Allocate a new VASurfaceID backed Gst.Memory.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

Returns (Gst.Memory) –

a Gst.Memory backed with a VASurfaceID; NULL, otherwise.

Since : 1.22

#### GstVa.VaAllocator.alloc

    def GstVa.VaAllocator.alloc (allocator):
        #python wrapper for 'gst_va_allocator_alloc'

Allocate a new VASurfaceID backed Gst.Memory.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

Returns (Gst.Memory) –

a Gst.Memory backed with a VASurfaceID; NULL, otherwise.

Since : 1.22

#### gst_va_allocator_flush

    gst_va_allocator_flush (GstAllocator * allocator)

Removes all the memories in allocator's pool.

Parameters:

`allocator` –

a GstAllocator

Since : 1.22

#### GstVa.VaAllocator.prototype.flush

    function GstVa.VaAllocator.prototype.flush(allocator: Gst.Allocator): {
        // javascript wrapper for 'gst_va_allocator_flush'
    }

Removes all the memories in allocator's pool.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

Since : 1.22

#### GstVa.VaAllocator.flush

    def GstVa.VaAllocator.flush (allocator):
        #python wrapper for 'gst_va_allocator_flush'

Removes all the memories in allocator's pool.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

Since : 1.22

#### gst_va_allocator_get_format

    gboolean
    gst_va_allocator_get_format (GstAllocator * allocator,
                                 GstVideoInfo * info,
                                 guint* usage_hint,
                                 gboolean* use_derived)

Gets current internal configuration of allocator.

Parameters:

`allocator` –

a GstAllocator

`info` ( [out][optional]) –

a GstVideoInfo

`usage_hint` ( [out][optional]) –

VA usage hint

`use_derived` ( [out][optional]) –

whether derived images are used for buffer mapping.

Returns –

TRUE if allocator is already configured; FALSE otherwise.

Since : 1.22

#### GstVa.VaAllocator.prototype.get_format

    function GstVa.VaAllocator.prototype.get_format(allocator: Gst.Allocator): {
        // javascript wrapper for 'gst_va_allocator_get_format'
    }

Gets current internal configuration of allocator.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

Returns a tuple made of:

(Number ) –

TRUE if allocator is already configured; FALSE otherwise.

`info` (GstVideo.VideoInfo ) –

TRUE if allocator is already configured; FALSE otherwise.

`usage_hint` (Number ) –

TRUE if allocator is already configured; FALSE otherwise.

`use_derived` (Number ) –

TRUE if allocator is already configured; FALSE otherwise.

Since : 1.22

#### GstVa.VaAllocator.get_format

    def GstVa.VaAllocator.get_format (allocator):
        #python wrapper for 'gst_va_allocator_get_format'

Gets current internal configuration of allocator.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

Returns a tuple made of:

(bool ) –

TRUE if allocator is already configured; FALSE otherwise.

`info` (GstVideo.VideoInfo ) –

TRUE if allocator is already configured; FALSE otherwise.

`usage_hint` (int ) –

TRUE if allocator is already configured; FALSE otherwise.

`use_derived` (bool ) –

TRUE if allocator is already configured; FALSE otherwise.

Since : 1.22

#### gst_va_allocator_peek_display

    GstVaDisplay *
    gst_va_allocator_peek_display (GstAllocator * allocator)

Parameters:

`allocator` –

a GstAllocator

Returns ( [transfer: none]) –

the display which this allocator belongs to. The reference of the display is unchanged.

Since : 1.22

#### GstVa.VaAllocator.prototype.peek_display

    function GstVa.VaAllocator.prototype.peek_display(allocator: Gst.Allocator): {
        // javascript wrapper for 'gst_va_allocator_peek_display'
    }

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

Returns (GstVa.VaDisplay) –

the display which this allocator belongs to. The reference of the display is unchanged.

Since : 1.22

#### GstVa.VaAllocator.peek_display

    def GstVa.VaAllocator.peek_display (allocator):
        #python wrapper for 'gst_va_allocator_peek_display'

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

Returns (GstVa.VaDisplay) –

the display which this allocator belongs to. The reference of the display is unchanged.

Since : 1.22

#### gst_va_allocator_prepare_buffer

    gboolean
    gst_va_allocator_prepare_buffer (GstAllocator * allocator,
                                     GstBuffer * buffer)

This method will populate buffer with pooled VASurfaceID memories. It doesn't allocate new VASurfacesID.

Parameters:

`allocator` –

a GstAllocator

`buffer` –

an empty GstBuffer

Returns –

TRUE if buffer was populated correctly; FALSE otherwise.

Since : 1.22

#### GstVa.VaAllocator.prototype.prepare_buffer

    function GstVa.VaAllocator.prototype.prepare_buffer(allocator: Gst.Allocator, buffer: Gst.Buffer): {
        // javascript wrapper for 'gst_va_allocator_prepare_buffer'
    }

This method will populate buffer with pooled VASurfaceID memories. It doesn't allocate new VASurfacesID.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

`buffer` (Gst.Buffer) –

an empty Gst.Buffer

Returns (Number) –

TRUE if buffer was populated correctly; FALSE otherwise.

Since : 1.22

#### GstVa.VaAllocator.prepare_buffer

    def GstVa.VaAllocator.prepare_buffer (allocator, buffer):
        #python wrapper for 'gst_va_allocator_prepare_buffer'

This method will populate buffer with pooled VASurfaceID memories. It doesn't allocate new VASurfacesID.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

`buffer` (Gst.Buffer) –

an empty Gst.Buffer

Returns (bool) –

TRUE if buffer was populated correctly; FALSE otherwise.

Since : 1.22

#### gst_va_allocator_set_format

    gboolean
    gst_va_allocator_set_format (GstAllocator * allocator,
                                 GstVideoInfo * info,
                                 guint usage_hint,
                                 GstVaFeature feat_use_derived)

Sets the configuration defined by info, usage_hint and use_derived for allocator, and it tries the configuration, if allocator has not allocated memories yet.

If allocator has memory allocated already, and frame size and format in info are the same as currently configured in allocator, the rest of info parameters are updated internally.

Parameters:

`allocator` –

a GstAllocator

`info` ( [inout]) –

a GstVideoInfo

`usage_hint` –

VA usage hint

`feat_use_derived` –

a GstVaFeature

Returns –

TRUE if the configuration is valid or updated; FALSE if configuration is not valid or not updated.

Since : 1.22

#### GstVa.VaAllocator.prototype.set_format

    function GstVa.VaAllocator.prototype.set_format(allocator: Gst.Allocator, info: GstVideo.VideoInfo, usage_hint: Number, feat_use_derived: GstVa.VaFeature): {
        // javascript wrapper for 'gst_va_allocator_set_format'
    }

Sets the configuration defined by info, usage_hint and use_derived for allocator, and it tries the configuration, if allocator has not allocated memories yet.

If allocator has memory allocated already, and frame size and format in info are the same as currently configured in allocator, the rest of info parameters are updated internally.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

`info` (GstVideo.VideoInfo) –

a GstVideo.VideoInfo

`usage_hint` (Number) –

VA usage hint

`feat_use_derived` (GstVa.VaFeature) –

a GstVa.VaFeature

Returns a tuple made of:

(Number ) –

TRUE if the configuration is valid or updated; FALSE if configuration is not valid or not updated.

`info` (GstVideo.VideoInfo ) –

TRUE if the configuration is valid or updated; FALSE if configuration is not valid or not updated.

Since : 1.22

#### GstVa.VaAllocator.set_format

    def GstVa.VaAllocator.set_format (allocator, info, usage_hint, feat_use_derived):
        #python wrapper for 'gst_va_allocator_set_format'

Sets the configuration defined by info, usage_hint and use_derived for allocator, and it tries the configuration, if allocator has not allocated memories yet.

If allocator has memory allocated already, and frame size and format in info are the same as currently configured in allocator, the rest of info parameters are updated internally.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

`info` (GstVideo.VideoInfo) –

a GstVideo.VideoInfo

`usage_hint` (int) –

VA usage hint

`feat_use_derived` (GstVa.VaFeature) –

a GstVa.VaFeature

Returns a tuple made of:

(bool ) –

TRUE if the configuration is valid or updated; FALSE if configuration is not valid or not updated.

`info` (GstVideo.VideoInfo ) –

TRUE if the configuration is valid or updated; FALSE if configuration is not valid or not updated.

Since : 1.22

#### gst_va_allocator_set_hacks

    gst_va_allocator_set_hacks (GstAllocator * allocator,
                                guint32 hacks)

Internal method to set allocator specific logic changes.

Parameters:

`allocator` –

a GstAllocator

`hacks` –

hacks id to set

Since : 1.22

#### gst_va_allocator_setup_buffer

    gboolean
    gst_va_allocator_setup_buffer (GstAllocator * allocator,
                                   GstBuffer * buffer)

Populates an empty buffer with a VASuface backed GstMemory.

Parameters:

`allocator` –

a GstAllocator

`buffer` –

a GstBuffer

Returns –

TRUE if buffer is populated; FALSE otherwise.

Since : 1.22

#### GstVa.VaAllocator.prototype.setup_buffer

    function GstVa.VaAllocator.prototype.setup_buffer(allocator: Gst.Allocator, buffer: Gst.Buffer): {
        // javascript wrapper for 'gst_va_allocator_setup_buffer'
    }

Populates an empty buffer with a VASuface backed Gst.Memory.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

`buffer` (Gst.Buffer) –

a Gst.Buffer

Returns (Number) –

TRUE if buffer is populated; FALSE otherwise.

Since : 1.22

#### GstVa.VaAllocator.setup_buffer

    def GstVa.VaAllocator.setup_buffer (allocator, buffer):
        #python wrapper for 'gst_va_allocator_setup_buffer'

Populates an empty buffer with a VASuface backed Gst.Memory.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

`buffer` (Gst.Buffer) –

a Gst.Buffer

Returns (bool) –

TRUE if buffer is populated; FALSE otherwise.

Since : 1.22

## VaDmabufAllocator

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstAllocator
                    ╰──VaDmabufAllocator

A pooled memory allocator backed by the DMABufs exported from a VASurfaceID. Also it is possible to import DMAbufs into a VASurfaceID.

Since : 1.22

## VaDmabufAllocator

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Allocator
                    ╰──VaDmabufAllocator

A pooled memory allocator backed by the DMABufs exported from a VASurfaceID. Also it is possible to import DMAbufs into a VASurfaceID.

Since : 1.22

## VaDmabufAllocator

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Allocator
                    ╰──VaDmabufAllocator

A pooled memory allocator backed by the DMABufs exported from a VASurfaceID. Also it is possible to import DMAbufs into a VASurfaceID.

Since : 1.22

### Constructors

#### gst_va_dmabuf_allocator_new

    GstAllocator *
    gst_va_dmabuf_allocator_new (GstVaDisplay * display)

Instanciate a new pooled allocator backed with both DMABuf and VASurfaceID.

Parameters:

`display` –

a GstVaDisplay

Returns –

a new allocated GstAllocator

Since : 1.22

#### GstVa.VaDmabufAllocator.prototype.new

    function GstVa.VaDmabufAllocator.prototype.new(display: GstVa.VaDisplay): {
        // javascript wrapper for 'gst_va_dmabuf_allocator_new'
    }

Instanciate a new pooled allocator backed with both DMABuf and VASurfaceID.

Parameters:

`display` (GstVa.VaDisplay) –

a GstVa.VaDisplay

Returns (Gst.Allocator) –

a new allocated Gst.Allocator

Since : 1.22

#### GstVa.VaDmabufAllocator.new

    def GstVa.VaDmabufAllocator.new (display):
        #python wrapper for 'gst_va_dmabuf_allocator_new'

Instanciate a new pooled allocator backed with both DMABuf and VASurfaceID.

Parameters:

`display` (GstVa.VaDisplay) –

a GstVa.VaDisplay

Returns (Gst.Allocator) –

a new allocated Gst.Allocator

Since : 1.22

### Functions

#### gst_va_dmabuf_allocator_flush

    gst_va_dmabuf_allocator_flush (GstAllocator * allocator)

Removes all the memories in allocator's pool.

Parameters:

`allocator` –

a GstAllocator

Since : 1.22

#### GstVa.VaDmabufAllocator.prototype.flush

    function GstVa.VaDmabufAllocator.prototype.flush(allocator: Gst.Allocator): {
        // javascript wrapper for 'gst_va_dmabuf_allocator_flush'
    }

Removes all the memories in allocator's pool.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

Since : 1.22

#### GstVa.VaDmabufAllocator.flush

    def GstVa.VaDmabufAllocator.flush (allocator):
        #python wrapper for 'gst_va_dmabuf_allocator_flush'

Removes all the memories in allocator's pool.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

Since : 1.22

#### gst_va_dmabuf_allocator_get_format

    gboolean
    gst_va_dmabuf_allocator_get_format (GstAllocator * allocator,
                                        GstVideoInfoDmaDrm * info,
                                        guint* usage_hint)

Gets current internal configuration of allocator.

Parameters:

`allocator` –

a GstAllocator

`info` ( [out][optional]) –

a GstVideoInfoDmaDrm

`usage_hint` ( [out][optional]) –

VA usage hint

Returns –

TRUE if allocator is already configured; FALSE otherwise.

Since : 1.22

#### GstVa.VaDmabufAllocator.prototype.get_format

    function GstVa.VaDmabufAllocator.prototype.get_format(allocator: Gst.Allocator): {
        // javascript wrapper for 'gst_va_dmabuf_allocator_get_format'
    }

Gets current internal configuration of allocator.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

Returns a tuple made of:

(Number ) –

TRUE if allocator is already configured; FALSE otherwise.

`info` (GstVideo.VideoInfoDmaDrm ) –

TRUE if allocator is already configured; FALSE otherwise.

`usage_hint` (Number ) –

TRUE if allocator is already configured; FALSE otherwise.

Since : 1.22

#### GstVa.VaDmabufAllocator.get_format

    def GstVa.VaDmabufAllocator.get_format (allocator):
        #python wrapper for 'gst_va_dmabuf_allocator_get_format'

Gets current internal configuration of allocator.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

Returns a tuple made of:

(bool ) –

TRUE if allocator is already configured; FALSE otherwise.

`info` (GstVideo.VideoInfoDmaDrm ) –

TRUE if allocator is already configured; FALSE otherwise.

`usage_hint` (int ) –

TRUE if allocator is already configured; FALSE otherwise.

Since : 1.22

#### gst_va_dmabuf_allocator_prepare_buffer

    gboolean
    gst_va_dmabuf_allocator_prepare_buffer (GstAllocator * allocator,
                                            GstBuffer * buffer)

This method will populate buffer with pooled VASurfaceID/DMABuf memories. It doesn't allocate new VASurfacesID.

Parameters:

`allocator` –

a GstAllocator

`buffer` –

an empty GstBuffer

Returns –

TRUE if buffer was populated correctly; FALSE otherwise.

Since : 1.22

#### GstVa.VaDmabufAllocator.prototype.prepare_buffer

    function GstVa.VaDmabufAllocator.prototype.prepare_buffer(allocator: Gst.Allocator, buffer: Gst.Buffer): {
        // javascript wrapper for 'gst_va_dmabuf_allocator_prepare_buffer'
    }

This method will populate buffer with pooled VASurfaceID/DMABuf memories. It doesn't allocate new VASurfacesID.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

`buffer` (Gst.Buffer) –

an empty Gst.Buffer

Returns (Number) –

TRUE if buffer was populated correctly; FALSE otherwise.

Since : 1.22

#### GstVa.VaDmabufAllocator.prepare_buffer

    def GstVa.VaDmabufAllocator.prepare_buffer (allocator, buffer):
        #python wrapper for 'gst_va_dmabuf_allocator_prepare_buffer'

This method will populate buffer with pooled VASurfaceID/DMABuf memories. It doesn't allocate new VASurfacesID.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

`buffer` (Gst.Buffer) –

an empty Gst.Buffer

Returns (bool) –

TRUE if buffer was populated correctly; FALSE otherwise.

Since : 1.22

#### gst_va_dmabuf_allocator_set_format

    gboolean
    gst_va_dmabuf_allocator_set_format (GstAllocator * allocator,
                                        GstVideoInfoDmaDrm * info,
                                        guint usage_hint)

Sets the configuration defined by info and usage_hint for allocator, and it tries the configuration, if allocator has not allocated memories yet.

If allocator has memory allocated already, and frame size, format and modifier in info are the same as currently configured in allocator, the rest of info parameters are updated internally.

Parameters:

`allocator` –

a GstAllocator

`info` ( [in][out][not nullable]) –

a GstVideoInfoDmaDrm

`usage_hint` –

VA usage hint

Returns –

TRUE if the configuration is valid or updated; FALSE if configuration is not valid or not updated.

Since : 1.22

#### GstVa.VaDmabufAllocator.prototype.set_format

    function GstVa.VaDmabufAllocator.prototype.set_format(allocator: Gst.Allocator, usage_hint: Number): {
        // javascript wrapper for 'gst_va_dmabuf_allocator_set_format'
    }

Sets the configuration defined by info and usage_hint for allocator, and it tries the configuration, if allocator has not allocated memories yet.

If allocator has memory allocated already, and frame size, format and modifier in info are the same as currently configured in allocator, the rest of info parameters are updated internally.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

`usage_hint` (Number) –

VA usage hint

Returns a tuple made of:

(Number ) –

TRUE if the configuration is valid or updated; FALSE if configuration is not valid or not updated.

`info` (GstVideo.VideoInfoDmaDrm ) –

TRUE if the configuration is valid or updated; FALSE if configuration is not valid or not updated.

Since : 1.22

#### GstVa.VaDmabufAllocator.set_format

    def GstVa.VaDmabufAllocator.set_format (allocator, usage_hint):
        #python wrapper for 'gst_va_dmabuf_allocator_set_format'

Sets the configuration defined by info and usage_hint for allocator, and it tries the configuration, if allocator has not allocated memories yet.

If allocator has memory allocated already, and frame size, format and modifier in info are the same as currently configured in allocator, the rest of info parameters are updated internally.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

`usage_hint` (int) –

VA usage hint

Returns a tuple made of:

(bool ) –

TRUE if the configuration is valid or updated; FALSE if configuration is not valid or not updated.

`info` (GstVideo.VideoInfoDmaDrm ) –

TRUE if the configuration is valid or updated; FALSE if configuration is not valid or not updated.

Since : 1.22

#### gst_va_dmabuf_allocator_setup_buffer

    gboolean
    gst_va_dmabuf_allocator_setup_buffer (GstAllocator * allocator,
                                          GstBuffer * buffer)

This function creates a new VASurfaceID and exposes its DMABufs, later it populates the buffer with those DMABufs.

Return: TRUE if buffer is populated correctly; FALSE otherwise.

Parameters:

`allocator` –

a GstAllocator

`buffer` –

an empty GstBuffer

Returns –
No description available

Since : 1.22

#### GstVa.VaDmabufAllocator.prototype.setup_buffer

    function GstVa.VaDmabufAllocator.prototype.setup_buffer(allocator: Gst.Allocator, buffer: Gst.Buffer): {
        // javascript wrapper for 'gst_va_dmabuf_allocator_setup_buffer'
    }

This function creates a new VASurfaceID and exposes its DMABufs, later it populates the buffer with those DMABufs.

Return: TRUE if buffer is populated correctly; FALSE otherwise.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

`buffer` (Gst.Buffer) –

an empty Gst.Buffer

Returns (Number) –
No description available

Since : 1.22

#### GstVa.VaDmabufAllocator.setup_buffer

    def GstVa.VaDmabufAllocator.setup_buffer (allocator, buffer):
        #python wrapper for 'gst_va_dmabuf_allocator_setup_buffer'

This function creates a new VASurfaceID and exposes its DMABufs, later it populates the buffer with those DMABufs.

Return: TRUE if buffer is populated correctly; FALSE otherwise.

Parameters:

`allocator` (Gst.Allocator) –

a Gst.Allocator

`buffer` (Gst.Buffer) –

an empty Gst.Buffer

Returns (bool) –
No description available

Since : 1.22

## Functions

### gst_va_buffer_create_aux_surface

    gboolean
    gst_va_buffer_create_aux_surface (GstBuffer * buffer)

Creates a new VASurfaceID with buffer's allocator and attached it to it.

This method is used only by plugin's internal VA decoder.

Parameters:

`buffer` –

a GstBuffer

Returns –

TRUE if the new VASurfaceID is attached to buffer correctly; FALSE, otherwise.

Since : 1.22

### GstVa.prototype.va_buffer_create_aux_surface

    function GstVa.prototype.va_buffer_create_aux_surface(buffer: Gst.Buffer): {
        // javascript wrapper for 'gst_va_buffer_create_aux_surface'
    }

Creates a new VASurfaceID with buffer's allocator and attached it to it.

This method is used only by plugin's internal VA decoder.

Parameters:

`buffer` (Gst.Buffer) –

a Gst.Buffer

Returns (Number) –

TRUE if the new VASurfaceID is attached to buffer correctly; FALSE, otherwise.

Since : 1.22

### GstVa.va_buffer_create_aux_surface

    def GstVa.va_buffer_create_aux_surface (buffer):
        #python wrapper for 'gst_va_buffer_create_aux_surface'

Creates a new VASurfaceID with buffer's allocator and attached it to it.

This method is used only by plugin's internal VA decoder.

Parameters:

`buffer` (Gst.Buffer) –

a Gst.Buffer

Returns (bool) –

TRUE if the new VASurfaceID is attached to buffer correctly; FALSE, otherwise.

Since : 1.22

### gst_va_buffer_get_aux_surface

    VASurfaceID
    gst_va_buffer_get_aux_surface (GstBuffer * buffer)

Parameters:

`buffer` –

a GstBuffer

Returns ( [typeguint]) –

the VASurfaceID attached to buffer.

Since : 1.22

### gst_va_buffer_get_surface

    VASurfaceID
    gst_va_buffer_get_surface (GstBuffer * buffer)

Parameters:

`buffer` –

a GstBuffer

Returns ( [typeguint]) –

the VASurfaceID in buffer.

Since : 1.22

### gst_va_buffer_peek_display

    GstVaDisplay *
    gst_va_buffer_peek_display (GstBuffer * buffer)

Parameters:

`buffer` –

a GstBuffer

Returns ( [transfer: none]) –

the display which this buffer belongs to. The reference of the display is unchanged.

Since : 1.22

### GstVa.prototype.va_buffer_peek_display

    function GstVa.prototype.va_buffer_peek_display(buffer: Gst.Buffer): {
        // javascript wrapper for 'gst_va_buffer_peek_display'
    }

Parameters:

`buffer` (Gst.Buffer) –

a Gst.Buffer

Returns (GstVa.VaDisplay) –

the display which this buffer belongs to. The reference of the display is unchanged.

Since : 1.22

### GstVa.va_buffer_peek_display

    def GstVa.va_buffer_peek_display (buffer):
        #python wrapper for 'gst_va_buffer_peek_display'

Parameters:

`buffer` (Gst.Buffer) –

a Gst.Buffer

Returns (GstVa.VaDisplay) –

the display which this buffer belongs to. The reference of the display is unchanged.

Since : 1.22

### gst_va_dmabuf_get_modifier_for_format

    guint64
    gst_va_dmabuf_get_modifier_for_format (GstVaDisplay * display,
                                           GstVideoFormat format,
                                           guint usage_hint)

Get the underlying modifier for specified format and usage_hint.

Parameters:

`display` –

a GstVaDisplay

`format` –

a GstVideoFormat

`usage_hint` –

VA usage hint

Returns –

the underlying modifier.

Since : 1.24

### GstVa.prototype.va_dmabuf_get_modifier_for_format

    function GstVa.prototype.va_dmabuf_get_modifier_for_format(display: GstVa.VaDisplay, format: GstVideo.VideoFormat, usage_hint: Number): {
        // javascript wrapper for 'gst_va_dmabuf_get_modifier_for_format'
    }

Get the underlying modifier for specified format and usage_hint.

Parameters:

`display` (GstVa.VaDisplay) –

a GstVa.VaDisplay

`format` (GstVideo.VideoFormat) –

a GstVideo.VideoFormat

`usage_hint` (Number) –

VA usage hint

Returns (Number) –

the underlying modifier.

Since : 1.24

### GstVa.va_dmabuf_get_modifier_for_format

    def GstVa.va_dmabuf_get_modifier_for_format (display, format, usage_hint):
        #python wrapper for 'gst_va_dmabuf_get_modifier_for_format'

Get the underlying modifier for specified format and usage_hint.

Parameters:

`display` (GstVa.VaDisplay) –

a GstVa.VaDisplay

`format` (GstVideo.VideoFormat) –

a GstVideo.VideoFormat

`usage_hint` (int) –

VA usage hint

Returns (int) –

the underlying modifier.

Since : 1.24

### gst_va_dmabuf_memories_setup

    gboolean
    gst_va_dmabuf_memories_setup (GstVaDisplay * display,
                                  GstVideoInfoDmaDrm * drm_info,
                                  GstMemory ** mem,
                                  uintptr_t* fds,
                                  gsize* offset,
                                  guint usage_hint)

It imports the array of mem, representing a single frame, into a VASurfaceID and it's attached into every mem.

Parameters:

`display` –

a GstVaDisplay

`drm_info` –

a GstVideoInfoDmaDrm

`mem` ( [arrayfixed-size=4][element-typeGstMemory]) –

Memories. One per plane.

`fds` ( [arrayfixed-size=4][element-typeuintptr_t]) –

array of DMABuf file descriptors.

`offset` ( [arrayfixed-size=4][element-typegsize]) –

array of memory offsets.

`usage_hint` –

VA usage hint.

Returns –

TRUE if frame is imported correctly into a VASurfaceID; FALSE otherwise.

Since : 1.22

### GstVa.prototype.va_dmabuf_memories_setup

    function GstVa.prototype.va_dmabuf_memories_setup(display: GstVa.VaDisplay, drm_info: GstVideo.VideoInfoDmaDrm, mem: [ Gst.Memory ], fds: [ Number ], offset: [ Number ], usage_hint: Number): {
        // javascript wrapper for 'gst_va_dmabuf_memories_setup'
    }

It imports the array of mem, representing a single frame, into a VASurfaceID and it's attached into every mem.

Parameters:

`display` (GstVa.VaDisplay) –

a GstVa.VaDisplay

`drm_info` (GstVideo.VideoInfoDmaDrm) –

a GstVideo.VideoInfoDmaDrm

`mem` ([ Gst.Memory ]) –

Memories. One per plane.

`fds` ([ Number ]) –

array of DMABuf file descriptors.

`offset` ([ Number ]) –

array of memory offsets.

`usage_hint` (Number) –

VA usage hint.

Returns (Number) –

TRUE if frame is imported correctly into a VASurfaceID; FALSE otherwise.

Since : 1.22

### GstVa.va_dmabuf_memories_setup

    def GstVa.va_dmabuf_memories_setup (display, drm_info, mem, fds, offset, usage_hint):
        #python wrapper for 'gst_va_dmabuf_memories_setup'

It imports the array of mem, representing a single frame, into a VASurfaceID and it's attached into every mem.

Parameters:

`display` (GstVa.VaDisplay) –

a GstVa.VaDisplay

`drm_info` (GstVideo.VideoInfoDmaDrm) –

a GstVideo.VideoInfoDmaDrm

`mem` ([ Gst.Memory ]) –

Memories. One per plane.

`fds` ([ int ]) –

array of DMABuf file descriptors.

`offset` ([ int ]) –

array of memory offsets.

`usage_hint` (int) –

VA usage hint.

Returns (bool) –

TRUE if frame is imported correctly into a VASurfaceID; FALSE otherwise.

Since : 1.22

### gst_va_memory_get_surface

    VASurfaceID
    gst_va_memory_get_surface (GstMemory * mem)

Parameters:

`mem` –

a GstMemory

Returns ( [typeguint]) –

the VASurfaceID in mem.

Since : 1.22

### gst_va_memory_peek_display

    GstVaDisplay *
    gst_va_memory_peek_display (GstMemory * mem)

Parameters:

`mem` –

a GstMemory

Returns ( [transfer: none]) –

the display which this mem belongs to. The reference of the display is unchanged.

Since : 1.22

### GstVa.prototype.va_memory_peek_display

    function GstVa.prototype.va_memory_peek_display(mem: Gst.Memory): {
        // javascript wrapper for 'gst_va_memory_peek_display'
    }

Parameters:

`mem` (Gst.Memory) –

a Gst.Memory

Returns (GstVa.VaDisplay) –

the display which this mem belongs to. The reference of the display is unchanged.

Since : 1.22

### GstVa.va_memory_peek_display

    def GstVa.va_memory_peek_display (mem):
        #python wrapper for 'gst_va_memory_peek_display'

Parameters:

`mem` (Gst.Memory) –

a Gst.Memory

Returns (GstVa.VaDisplay) –

the display which this mem belongs to. The reference of the display is unchanged.

Since : 1.22

## Constants

### GST_ALLOCATOR_VASURFACE

    #define GST_ALLOCATOR_VASURFACE   "VAMemory"

Since : 1.22

### GstVa.ALLOCATOR_VASURFACE

Since : 1.22

### GstVa.ALLOCATOR_VASURFACE

Since : 1.22

### GST_MAP_VA

    #define GST_MAP_VA (GST_MAP_FLAG_LAST << 1)

Flag indicating that we should map the VASurfaceID instead of to system memory, so users can use libva primitives to operate with that surface.

Since : 1.22

### GstVa.MAP_VA

Flag indicating that we should map the VASurfaceID instead of to system memory, so users can use libva primitives to operate with that surface.

Since : 1.22

### GstVa.MAP_VA

Flag indicating that we should map the VASurfaceID instead of to system memory, so users can use libva primitives to operate with that surface.

Since : 1.22

The results of the search are