![]() |
![]() |
![]() |
GStreamer VA-API Plugins 1.0 Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
GstVaapiVideoPool; GstVaapiDisplay * gst_vaapi_video_pool_get_display (GstVaapiVideoPool *pool
); GstVaapiVideoPoolObjectType gst_vaapi_video_pool_get_object_type (GstVaapiVideoPool *pool
); gpointer gst_vaapi_video_pool_get_object (GstVaapiVideoPool *pool
); void gst_vaapi_video_pool_put_object (GstVaapiVideoPool *pool
,gpointer object
); gboolean gst_vaapi_video_pool_add_object (GstVaapiVideoPool *pool
,gpointer object
); gboolean gst_vaapi_video_pool_add_objects (GstVaapiVideoPool *pool
,GPtrArray *objects
); guint gst_vaapi_video_pool_get_capacity (GstVaapiVideoPool *pool
); void gst_vaapi_video_pool_set_capacity (GstVaapiVideoPool *pool
,guint capacity
); guint gst_vaapi_video_pool_get_size (GstVaapiVideoPool *pool
); gboolean gst_vaapi_video_pool_reserve (GstVaapiVideoPool *pool
,guint n
);
typedef struct { } GstVaapiVideoPool;
A pool of lazily allocated video objects. e.g. surfaces, images.
GstVaapiDisplay * gst_vaapi_video_pool_get_display (GstVaapiVideoPool *pool
);
Retrieves the GstVaapiDisplay the pool
is bound to. The pool
owns the returned object and it shall not be unref'ed.
|
a GstVaapiVideoPool |
Returns : |
the GstVaapiDisplay the pool is bound to |
GstVaapiVideoPoolObjectType gst_vaapi_video_pool_get_object_type
(GstVaapiVideoPool *pool
);
Retrieves the type of objects the video pool
supports.
|
a GstVaapiVideoPool |
Returns : |
the GstVaapiVideoPoolObjectType of the underlying pool objects |
gpointer gst_vaapi_video_pool_get_object (GstVaapiVideoPool *pool
);
Retrieves a new object from the pool
, or allocates a new one if
none was found. The pool
holds a reference on the returned object
and thus shall be released through gst_vaapi_video_pool_put_object()
when it's no longer needed.
|
a GstVaapiVideoPool |
Returns : |
a possibly newly allocated object, or NULL on error |
void gst_vaapi_video_pool_put_object (GstVaapiVideoPool *pool
,gpointer object
);
Pushes the object
back into the pool. The object
shall be
obtained from the pool
through gst_vaapi_video_pool_get_object()
.
Calling this function with an arbitrary object yields undefined
behaviour.
|
a GstVaapiVideoPool |
|
the object to add back to the pool |
gboolean gst_vaapi_video_pool_add_object (GstVaapiVideoPool *pool
,gpointer object
);
Adds the object
to the pool. The pool then holds a reference on
the object
. This operation does not change the capacity of the
pool.
|
a GstVaapiVideoPool |
|
the object to add to the pool |
Returns : |
TRUE on success. |
gboolean gst_vaapi_video_pool_add_objects (GstVaapiVideoPool *pool
,GPtrArray *objects
);
Adds the objects
to the pool. The pool then holds a reference on
the objects
. This operation does not change the capacity of the
pool and is just a wrapper around gst_vaapi_video_pool_add_object()
.
|
a GstVaapiVideoPool |
|
a GPtrArray of objects |
Returns : |
TRUE on success. |
guint gst_vaapi_video_pool_get_capacity (GstVaapiVideoPool *pool
);
Returns the maximum number of objects in the pool. i.e. the maximum
number of objects that can be returned by gst_vaapi_video_pool_get_object()
.
|
a GstVaapiVideoPool |
Returns : |
the capacity of the pool |
void gst_vaapi_video_pool_set_capacity (GstVaapiVideoPool *pool
,guint capacity
);
Sets the maximum number of objects that can be allocated in the pool.
|
a GstVaapiVideoPool |
|
the maximal capacity of the pool |
guint gst_vaapi_video_pool_get_size (GstVaapiVideoPool *pool
);
Returns the number of free objects available in the pool.
|
a GstVaapiVideoPool |
Returns : |
number of free objects in the pool |
gboolean gst_vaapi_video_pool_reserve (GstVaapiVideoPool *pool
,guint n
);
Pre-allocates up to n
objects in the pool. If n
is less than or
equal to the number of free and used objects in the pool, this call
has no effect. Otherwise, it is a request for allocation of
additional objects.
|
a GstVaapiVideoPool |
|
the number of objects to pre-allocate |
Returns : |
TRUE on success |