## GstVaapiSurfaceProxy GstVaapiSurfaceProxy — VA surface proxy |

## Functions

GstClockTime | gst_vaapi_surface_proxy_get_duration ()
guint | gst_vaapi_surface_proxy_get_flags ()
GstVaapiSurface * | gst_vaapi_surface_proxy_get_surface ()
GstVaapiID | gst_vaapi_surface_proxy_get_surface_id ()
GstClockTime | gst_vaapi_surface_proxy_get_timestamp ()
GstVaapiSurfaceProxy * | gst_vaapi_surface_proxy_new_from_pool ()
GstVaapiSurfaceProxy * | gst_vaapi_surface_proxy_copy ()
GstVaapiSurfaceProxy * | gst_vaapi_surface_proxy_ref ()
void | gst_vaapi_surface_proxy_replace ()
void | gst_vaapi_surface_proxy_set_destroy_notify ()
void | gst_vaapi_surface_proxy_unref ()

## Description

## Functions

### gst_vaapi_surface_proxy_get_duration ()

    GstClockTime
    gst_vaapi_surface_proxy_get_duration (GstVaapiSurfaceProxy *proxy);

Returns the presentation duration for this surface `proxy` .

#### Parameters

proxy | a GstVaapiSurfaceProxy |

#### Returns

the presentation duration

### gst_vaapi_surface_proxy_get_flags ()

    guint
    gst_vaapi_surface_proxy_get_flags (GstVaapiSurfaceProxy *proxy);

Returns the GstVaapiSurfaceProxyFlags associated with this surface `proxy` .

#### Parameters

proxy | a GstVaapiSurfaceProxy |

#### Returns

the set of GstVaapiSurfaceProxyFlags

### gst_vaapi_surface_proxy_get_surface ()

    GstVaapiSurface *
    gst_vaapi_surface_proxy_get_surface (GstVaapiSurfaceProxy *proxy);

Returns the GstVaapiSurface stored in the `proxy` .

#### Parameters

proxy | a GstVaapiSurfaceProxy |

#### Returns

the GstVaapiSurface

### gst_vaapi_surface_proxy_get_surface_id ()

    GstVaapiID
    gst_vaapi_surface_proxy_get_surface_id
                                   (GstVaapiSurfaceProxy *proxy);

Returns the VA surface ID stored in the `proxy` .

#### Parameters

proxy | a GstVaapiSurfaceProxy |

#### Returns

the GstVaapiID

### gst_vaapi_surface_proxy_get_timestamp ()

    GstClockTime
    gst_vaapi_surface_proxy_get_timestamp (GstVaapiSurfaceProxy *proxy);

Returns the presentation timestamp for this surface `proxy` .

#### Parameters

proxy | a GstVaapiSurfaceProxy |

#### Returns

the presentation timestamp

### gst_vaapi_surface_proxy_new_from_pool ()

    GstVaapiSurfaceProxy *
    gst_vaapi_surface_proxy_new_from_pool (GstVaapiSurfacePool *pool);

Allocates a new surface from the supplied surface `pool` and creates the wrapped surface proxy object from it. When the last reference to the proxy object is released, then the underlying VA surface is pushed back to its parent pool.

#### Parameters

pool | a GstVaapiSurfacePool |

#### Returns

The same newly allocated `proxy` object, or `NULL` on error

### gst_vaapi_surface_proxy_copy ()

    GstVaapiSurfaceProxy *
    gst_vaapi_surface_proxy_copy (GstVaapiSurfaceProxy *proxy);

Creates are new VA surface proxy object from the supplied parent `proxy` object with the same initial information, e.g. timestamp, duration.

Note: the destroy notify function is not copied into the new surface proxy object.

#### Parameters

proxy | the parent GstVaapiSurfaceProxy |

#### Returns

The same newly allocated `proxy` object, or `NULL` on error

### gst_vaapi_surface_proxy_ref ()

    GstVaapiSurfaceProxy *
    gst_vaapi_surface_proxy_ref (GstVaapiSurfaceProxy *proxy);

Atomically increases the reference count of the given `proxy` by one.

#### Parameters

proxy | a GstVaapiSurfaceProxy |

#### Returns

The same `proxy` argument

### gst_vaapi_surface_proxy_replace ()

    void
    gst_vaapi_surface_proxy_replace (GstVaapiSurfaceProxy **old_proxy_ptr,
                                     GstVaapiSurfaceProxy *new_proxy);

Atomically replaces the proxy object held in `old_proxy_ptr` with `new_proxy` . This means that `old_proxy_ptr` shall reference a valid object. However, `new_proxy` can be NULL.

#### Parameters

old_proxy_ptr | a pointer to a GstVaapiSurfaceProxy |
new_proxy | a GstVaapiSurfaceProxy |

### gst_vaapi_surface_proxy_set_destroy_notify ()

    void
    gst_vaapi_surface_proxy_set_destroy_notify
                                   (GstVaapiSurfaceProxy *proxy,
                                    GDestroyNotify destroy_func,
                                    gpointer user_data);

Sets `destroy_func` as the function to call when the surface `proxy` was released. At this point, the proxy object is considered released, i.e. the underlying data storage is no longer valid and the callback function shall not expect anything from that.

#### Parameters

proxy | a `GstVaapiSurfaceProxy` |
destroy_func | a GDestroyNotify function |
user_data | some extra data to pass to the `destroy_func` function |

### gst_vaapi_surface_proxy_unref ()

    void
    gst_vaapi_surface_proxy_unref (GstVaapiSurfaceProxy *proxy);

Atomically decreases the reference count of the `proxy` by one. If the reference count reaches zero, the object will be free'd.

#### Parameters

proxy | a GstVaapiSurfaceProxy |

## Types and Values