[vlc-devel] [PATCH] vlc_filter: rename filter_chain_New() to filter_chain_NewSPU()
Steve Lhomme
robux4 at ycbcr.xyz
Thu Jul 18 12:10:07 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 138dc4dd48..03d1a11a9d 100644
--- a/include/vlc_filter.h
+++ b/include/vlc_filter.h
@@ -310,13 +310,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 8aafb95a85..dba3207b49 100644
--- a/src/misc/filter_chain.c
+++ b/src/misc/filter_chain.c
@@ -96,18 +96,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 b69ed0afb8..17c9a0a985 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