Added picture_pool_GetSize helper.

This commit is contained in:
Laurent Aimar 2010-04-22 20:02:52 +02:00
parent 0a3c6b714f
commit 889ae4fb26
3 changed files with 10 additions and 0 deletions

View File

@ -116,6 +116,11 @@ VLC_EXPORT( void, picture_pool_NonEmpty, ( picture_pool_t *, bool reset ) );
*/
VLC_EXPORT( picture_pool_t *, picture_pool_Reserve, (picture_pool_t *, int picture_count) );
/**
* It returns the size of the given pool.
*/
VLC_EXPORT( int, picture_pool_GetSize, (picture_pool_t *) );
#endif /* VLC_PICTURE_POOL_H */

View File

@ -310,6 +310,7 @@ picture_NewFromFormat
picture_NewFromResource
picture_pool_Delete
picture_pool_Get
picture_pool_GetSize
picture_pool_New
picture_pool_NewExtended
picture_pool_NewFromFormat

View File

@ -255,6 +255,10 @@ void picture_pool_NonEmpty(picture_pool_t *pool, bool reset)
old->i_refcount = 0;
}
}
int picture_pool_GetSize(picture_pool_t *pool)
{
return pool->picture_count;
}
static void Release(picture_t *picture)
{