![]() |
![]() |
![]() |
GStreamer VA-API Plugins 0.10 Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
GstVaapiVideoPool; GstVaapiVideoPoolClass; GstVaapiDisplay * gst_vaapi_video_pool_get_display (GstVaapiVideoPool *pool); GstCaps * gst_vaapi_video_pool_get_caps (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);
"capacity" guint : Read / Write "caps" gpointer : Read / Write / Construct Only "display" GstVaapiDisplay* : Read / Write / Construct Only
typedef struct _GstVaapiVideoPool GstVaapiVideoPool;
A pool of lazily allocated video objects. e.g. surfaces, images.
typedef struct { void (*set_caps) (GstVaapiVideoPool *pool, GstCaps *caps); gpointer (*alloc_object)(GstVaapiVideoPool *pool, GstVaapiDisplay *display); } GstVaapiVideoPoolClass;
A pool base class used to hold video objects. e.g. surfaces, images.
|
virtual function for notifying the subclass of the negotiated caps |
|
virtual function for allocating a video pool object |
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
|
GstCaps * gst_vaapi_video_pool_get_caps (GstVaapiVideoPool *pool);
Retrieves the GstCaps the pool
was created with. The pool
owns
the returned object and it shall not be unref'ed.
|
a GstVaapiVideoPool |
Returns : |
the GstCaps the pool was created with
|
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
|
"capacity"
property"capacity" guint : Read / Write
The maximum number of objects in the pool.
Default value: 0
"display"
property"display" GstVaapiDisplay* : Read / Write / Construct Only
The GstVaapiDisplay this pool is bound to.