[vlc-devel] [PATCH 2/3] picture_pool: don't make picture_pool_NewExtended public anymore

Steve Lhomme robux4 at ycbcr.xyz
Wed Jan 22 12:07:23 CET 2020


It's strictly equivalent to picture_pool_New().
---
 include/vlc_picture_pool.h | 19 +------------------
 src/libvlccore.sym         |  1 -
 src/misc/picture_pool.c    |  9 +++++++++
 3 files changed, 10 insertions(+), 19 deletions(-)

diff --git a/include/vlc_picture_pool.h b/include/vlc_picture_pool.h
index c523e7630d4..a9589f85d1e 100644
--- a/include/vlc_picture_pool.h
+++ b/include/vlc_picture_pool.h
@@ -35,14 +35,6 @@
  */
 typedef struct picture_pool_t picture_pool_t;
 
-/**
- * Picture pool configuration
- */
-typedef struct {
-    unsigned  picture_count;
-    picture_t *const *picture;
-} picture_pool_configuration_t;
-
 /**
  * Creates a pool of preallocated pictures. Free pictures can be allocated from
  * the pool, and are returned to the pool when they are no longer referenced.
@@ -54,15 +46,6 @@ typedef struct {
  * decrease the reference count, use picture_Hold() and picture_Release()
  * respectively.
  *
- * @return A pointer to the new pool on success, or NULL on error
- * (pictures are <b>not</b> released on error).
- */
-VLC_API picture_pool_t * picture_pool_NewExtended( const picture_pool_configuration_t * ) VLC_USED;
-
-/**
- * Creates a picture pool with pictures in a given array.
- * This is a convenience wrapper for picture_pool_NewExtended().
- *
  * @param count number of pictures in the array
  * @param tab array of pictures
  *
@@ -86,7 +69,7 @@ VLC_API picture_pool_t * picture_pool_NewFromFormat(const video_format_t *fmt,
                                                     unsigned count) VLC_USED;
 
 /**
- * Releases a pool created by picture_pool_NewExtended(), picture_pool_New()
+ * Releases a pool created by picture_pool_New()
  * or picture_pool_NewFromFormat().
  *
  * @note If there are no pending references to the pooled pictures, and the
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 9680cd35f28..bc35aefec75 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -316,7 +316,6 @@ picture_pool_Release
 picture_pool_Get
 picture_pool_GetSize
 picture_pool_New
-picture_pool_NewExtended
 picture_pool_NewFromFormat
 picture_pool_Reserve
 picture_pool_Wait
diff --git a/src/misc/picture_pool.c b/src/misc/picture_pool.c
index 25c161b8b60..9181597a477 100644
--- a/src/misc/picture_pool.c
+++ b/src/misc/picture_pool.c
@@ -96,6 +96,15 @@ static picture_t *picture_pool_ClonePicture(picture_pool_t *pool,
                                  (void*)sys);
 }
 
+/**
+ * Picture pool configuration
+ */
+typedef struct {
+    unsigned  picture_count;
+    picture_t *const *picture;
+} picture_pool_configuration_t;
+
+static
 picture_pool_t *picture_pool_NewExtended(const picture_pool_configuration_t *cfg)
 {
     if (unlikely(cfg->picture_count > POOL_MAX))
-- 
2.17.1



More information about the vlc-devel mailing list