[vlc-commits] commit: Added picture_pool_GetSize helper. (Laurent Aimar )

git at videolan.org git at videolan.org
Fri Apr 23 21:17:04 CEST 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Apr 22 20:02:52 2010 +0200| [889ae4fb267810151ceaa91ad1041dfd60576f56] | committer: Laurent Aimar 

Added picture_pool_GetSize helper.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=889ae4fb267810151ceaa91ad1041dfd60576f56
---

 include/vlc_picture_pool.h |    5 +++++
 src/libvlccore.sym         |    1 +
 src/misc/picture_pool.c    |    4 ++++
 3 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/include/vlc_picture_pool.h b/include/vlc_picture_pool.h
index 1f22e32..a4ab493 100644
--- a/include/vlc_picture_pool.h
+++ b/include/vlc_picture_pool.h
@@ -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 */
 
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index afcf654..5cb1dd9 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -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
diff --git a/src/misc/picture_pool.c b/src/misc/picture_pool.c
index 9264122..39ae0f8 100644
--- a/src/misc/picture_pool.c
+++ b/src/misc/picture_pool.c
@@ -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)
 {



More information about the vlc-commits mailing list