[vlc-commits] aout: make some functions static
Rémi Denis-Courmont
git at videolan.org
Tue Nov 13 19:28:20 CET 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Nov 13 20:27:59 2012 +0200| [f72132f1cd2ca4af82663a80427bb9605f6bca38] | committer: Rémi Denis-Courmont
aout: make some functions static
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f72132f1cd2ca4af82663a80427bb9605f6bca38
---
src/audio_output/aout_internal.h | 7 -------
src/audio_output/filters.c | 36 +++++++++++++++++++-----------------
2 files changed, 19 insertions(+), 24 deletions(-)
diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h
index f3fac12..b241ca2 100644
--- a/src/audio_output/aout_internal.h
+++ b/src/audio_output/aout_internal.h
@@ -94,13 +94,6 @@ static inline aout_owner_t *aout_owner (audio_output_t *aout)
*****************************************************************************/
/* From filters.c : */
-int aout_FiltersPipelineCreate(vlc_object_t *, filter_t **, unsigned *,
- unsigned, const audio_sample_format_t *, const audio_sample_format_t *);
-#define aout_FiltersPipelineCreate(o, pv, pc, max, inf, outf) \
- aout_FiltersPipelineCreate(VLC_OBJECT(o), pv, pc, max, inf, outf)
-void aout_FiltersPipelineDestroy(filter_t *const *, unsigned);
-block_t *aout_FiltersPipelinePlay(filter_t *const *, unsigned, block_t *);
-
int aout_FiltersNew(audio_output_t *, const audio_sample_format_t *,
const audio_sample_format_t *, const aout_request_vout_t *);
void aout_FiltersDelete(audio_output_t *);
diff --git a/src/audio_output/filters.c b/src/audio_output/filters.c
index c95b93f..056b9d0 100644
--- a/src/audio_output/filters.c
+++ b/src/audio_output/filters.c
@@ -127,6 +127,20 @@ static int SplitConversion( const audio_sample_format_t *restrict infmt,
}
/**
+ * Destroys a chain of audio filters.
+ */
+static void aout_FiltersPipelineDestroy(filter_t *const *filters, unsigned n)
+{
+ for( unsigned i = 0; i < n; i++ )
+ {
+ filter_t *p_filter = filters[i];
+
+ module_unneed( p_filter, p_filter->p_module );
+ vlc_object_release( p_filter );
+ }
+}
+
+/**
* Allocates audio format conversion filters
* @param obj parent VLC object for new filters
* @param filters table of filters [IN/OUT]
@@ -136,7 +150,7 @@ static int SplitConversion( const audio_sample_format_t *restrict infmt,
* @param outfmt output audio format
* @return 0 on success, -1 on failure
*/
-int (aout_FiltersPipelineCreate)(vlc_object_t *obj, filter_t **filters,
+static int aout_FiltersPipelineCreate(vlc_object_t *obj, filter_t **filters,
unsigned *nb_filters, unsigned max_filters,
const audio_sample_format_t *restrict infmt,
const audio_sample_format_t *restrict outfmt)
@@ -197,20 +211,8 @@ rollback:
aout_FiltersPipelineDestroy (filters, i);
return -1;
}
-
-/**
- * Destroys a chain of audio filters.
- */
-void aout_FiltersPipelineDestroy(filter_t *const *filters, unsigned n)
-{
- for( unsigned i = 0; i < n; i++ )
- {
- filter_t *p_filter = filters[i];
-
- module_unneed( p_filter, p_filter->p_module );
- vlc_object_release( p_filter );
- }
-}
+#define aout_FiltersPipelineCreate(obj,f,n,m,i,o) \
+ aout_FiltersPipelineCreate(VLC_OBJECT(obj),f,n,m,i,o)
static inline bool ChangeFiltersString (vlc_object_t *aout, const char *var,
const char *filter, bool add)
@@ -221,8 +223,8 @@ static inline bool ChangeFiltersString (vlc_object_t *aout, const char *var,
/**
* Filters an audio buffer through a chain of filters.
*/
-block_t *aout_FiltersPipelinePlay(filter_t *const *filters, unsigned count,
- block_t *block)
+static block_t *aout_FiltersPipelinePlay(filter_t *const *filters,
+ unsigned count, block_t *block)
{
/* TODO: use filter chain */
for (unsigned i = 0; (i < count) && (block != NULL); i++)
More information about the vlc-commits
mailing list