[vlc-commits] aout: hide aout_ChannelsRestart callback
Thomas Guillem
git at videolan.org
Wed Jul 12 13:12:17 CEST 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Jul 11 12:58:24 2017 +0200| [bb9c83f4ce6883c3c12faf0aa181ca4e12fad6fe] | committer: Thomas Guillem
aout: hide aout_ChannelsRestart callback
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bb9c83f4ce6883c3c12faf0aa181ca4e12fad6fe
---
include/vlc_aout.h | 10 ----------
src/audio_output/output.c | 14 ++++++++++++--
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/include/vlc_aout.h b/include/vlc_aout.h
index bbe7b4cbbe..e6b570361e 100644
--- a/include/vlc_aout.h
+++ b/include/vlc_aout.h
@@ -316,16 +316,6 @@ static inline void aout_RestartRequest(audio_output_t *aout, unsigned mode)
aout->event.restart_request(aout, mode);
}
-static inline int aout_ChannelsRestart (vlc_object_t *obj, const char *varname,
- vlc_value_t oldval, vlc_value_t newval, void *data)
-{
- audio_output_t *aout = (audio_output_t *)obj;
- (void)varname; (void)oldval; (void)newval; (void)data;
-
- aout_RestartRequest (aout, AOUT_RESTART_OUTPUT);
- return 0;
-}
-
/* Audio output filters */
typedef struct aout_filters aout_filters_t;
typedef struct aout_request_vout aout_request_vout_t;
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 59d2cb121d..d9ac95a78a 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -171,6 +171,16 @@ static int FilterCallback (vlc_object_t *obj, const char *var,
return VLC_SUCCESS;
}
+static int StereoModeCallback (vlc_object_t *obj, const char *varname,
+ vlc_value_t oldval, vlc_value_t newval, void *data)
+{
+ audio_output_t *aout = (audio_output_t *)obj;
+ (void)varname; (void)oldval; (void)newval; (void)data;
+
+ aout_RestartRequest (aout, AOUT_RESTART_OUTPUT);
+ return 0;
+}
+
#undef aout_New
/**
* Creates an audio output object and initializes an output module.
@@ -388,7 +398,7 @@ int aout_OutputNew (audio_output_t *aout, audio_sample_format_t *restrict fmt)
}
/* The user may have selected a different channels configuration. */
- var_AddCallback (aout, "stereo-mode", aout_ChannelsRestart, NULL);
+ var_AddCallback (aout, "stereo-mode", StereoModeCallback, NULL);
switch (var_GetInteger (aout, "stereo-mode"))
{
case AOUT_VAR_CHAN_RSTEREO:
@@ -460,7 +470,7 @@ void aout_OutputDelete (audio_output_t *aout)
{
aout_OutputAssertLocked (aout);
- var_DelCallback (aout, "stereo-mode", aout_ChannelsRestart, NULL);
+ var_DelCallback (aout, "stereo-mode", StereoModeCallback, NULL);
if (aout->stop != NULL)
aout->stop (aout);
}
More information about the vlc-commits
mailing list