[vlc-devel] [PATCH 01/15] vlc_filter: rename filter_chain_New() to filter_chain_NewSPU()

Steve Lhomme robux4 at ycbcr.xyz
Fri Jul 19 15:32:05 CEST 2019


Similar to filter_chain_NewVideo() as this is the only use of this supposedly
generic function.

Also fix the function documentation.
---
 include/vlc_filter.h                | 6 +++---
 src/misc/filter_chain.c             | 7 +++----
 src/video_output/vout_subpictures.c | 4 ++--
 3 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/include/vlc_filter.h b/include/vlc_filter.h
index 331a2e3454..0c756ce10e 100644
--- a/include/vlc_filter.h
+++ b/include/vlc_filter.h
@@ -307,13 +307,13 @@ typedef struct filter_chain_t filter_chain_t;
 /**
  * Create new filter chain
  *
- * \param p_object pointer to a vlc object
+ * \param obj pointer to a vlc object
  * \param psz_capability vlc capability of filters in filter chain
  * \return pointer to a filter chain
  */
-filter_chain_t * filter_chain_New( vlc_object_t *, const char *, enum es_format_category_e )
+filter_chain_t * filter_chain_NewSPU( vlc_object_t *obj, const char *psz_capability )
 VLC_USED;
-#define filter_chain_New( a, b, c ) filter_chain_New( VLC_OBJECT( a ), b, c )
+#define filter_chain_NewSPU( a, b ) filter_chain_NewSPU( VLC_OBJECT( a ), b )
 
 /**
  * Creates a new video filter chain.
diff --git a/src/misc/filter_chain.c b/src/misc/filter_chain.c
index 59823c287f..89b499d26a 100644
--- a/src/misc/filter_chain.c
+++ b/src/misc/filter_chain.c
@@ -94,18 +94,17 @@ static filter_chain_t *filter_chain_NewInner( const filter_owner_t *callbacks,
     return chain;
 }
 
-#undef filter_chain_New
+#undef filter_chain_NewSPU
 /**
  * Filter chain initialisation
  */
-filter_chain_t *filter_chain_New( vlc_object_t *obj, const char *cap,
-                                  enum es_format_category_e cat )
+filter_chain_t *filter_chain_NewSPU( vlc_object_t *obj, const char *cap )
 {
     filter_owner_t callbacks = {
         .sys = obj,
     };
 
-    return filter_chain_NewInner( &callbacks, cap, NULL, false, NULL, cat );
+    return filter_chain_NewInner( &callbacks, cap, NULL, false, NULL, SPU_ES );
 }
 
 /** Chained filter picture allocator function */
diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index bdc2237173..2709d3e8a5 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -1416,8 +1416,8 @@ spu_t *spu_Create(vlc_object_t *object, vout_thread_t *vout)
     sys->source_chain_update = NULL;
     sys->filter_chain_update = NULL;
     vlc_mutex_init(&sys->filter_chain_lock);
-    sys->source_chain = filter_chain_New(spu, "sub source", SPU_ES);
-    sys->filter_chain = filter_chain_New(spu, "sub filter", SPU_ES);
+    sys->source_chain = filter_chain_NewSPU(spu, "sub source");
+    sys->filter_chain = filter_chain_NewSPU(spu, "sub filter");
 
     /* Load text and scale module */
     sys->text = SpuRenderCreateAndLoadText(spu);
-- 
2.17.1



More information about the vlc-devel mailing list