[vlc-devel] [PATCH 6/8] aout: rename aout_Dec* to aout_Stream*
Thomas Guillem
thomas at gllm.fr
Fri Mar 8 17:24:44 CET 2019
---
src/audio_output/aout_internal.h | 18 +++++++-------
src/audio_output/async.c | 18 +++++++-------
src/audio_output/stream.c | 41 ++++++++++++++++----------------
3 files changed, 39 insertions(+), 38 deletions(-)
diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h
index 579cd8abf2..71b2224a3e 100644
--- a/src/audio_output/aout_internal.h
+++ b/src/audio_output/aout_internal.h
@@ -144,16 +144,16 @@ void aout_FormatsPrint(vlc_object_t *, const char *,
#define AOUT_DEC_CHANGED 1
#define AOUT_DEC_FAILED VLC_EGENERIC
-int aout_DecNew(audio_output_t *, const audio_sample_format_t *,
- struct vlc_clock_t *clock, const audio_replay_gain_t *);
-void aout_DecDelete(audio_output_t *);
-int aout_DecPlay(audio_output_t *aout, block_t *block);
-void aout_DecChangePause(audio_output_t *, bool b_paused, vlc_tick_t i_date);
-void aout_DecChangeRate(audio_output_t *aout, float rate);
-void aout_DecChangeDelay(audio_output_t *aout, vlc_tick_t delay);
-void aout_DecFlush(audio_output_t *, bool wait);
+int aout_StreamStart(audio_output_t *, const audio_sample_format_t *,
+ struct vlc_clock_t *clock, const audio_replay_gain_t *);
+void aout_StreamStop(audio_output_t *);
+int aout_StreamPlay(audio_output_t *aout, block_t *block);
void aout_GetResetStats(audio_output_t *, unsigned *, unsigned *);
-void aout_RequestRestart (audio_output_t *, unsigned);
+void aout_StreamChangePause(audio_output_t *, bool b_paused, vlc_tick_t i_date);
+void aout_StreamChangeRate(audio_output_t *aout, float rate);
+void aout_StreamChangeDelay(audio_output_t *aout, vlc_tick_t delay);
+void aout_StreamFlush(audio_output_t *, bool wait);
+void aout_StreamRestart (audio_output_t *, unsigned);
void aout_RequestRetiming(audio_output_t *aout, vlc_tick_t system_ts,
vlc_tick_t audio_ts);
diff --git a/src/audio_output/async.c b/src/audio_output/async.c
index 513f5481c4..bd98955978 100644
--- a/src/audio_output/async.c
+++ b/src/audio_output/async.c
@@ -113,30 +113,30 @@ aout_Thread(void *data)
{
case AOUT_ASYNC_CMD_START:
assert(cmd->wait);
- ret = aout_DecNew(aout, arg->start.fmt, arg->start.clock,
- arg->start.replay_gain);
+ ret = aout_StreamStart(aout, arg->start.fmt, arg->start.clock,
+ arg->start.replay_gain);
break;
case AOUT_ASYNC_CMD_STOP:
- aout_DecDelete(aout);
+ aout_StreamStop(aout);
break;
case AOUT_ASYNC_CMD_RESTART:
- aout_RequestRestart(aout, arg->restart_flag);
+ aout_StreamRestart(aout, arg->restart_flag);
break;
case AOUT_ASYNC_CMD_PLAY:
assert(cmd->wait);
- ret = aout_DecPlay(aout, arg->block);
+ ret = aout_StreamPlay(aout, arg->block);
break;
case AOUT_ASYNC_CMD_FLUSH:
- aout_DecFlush(aout, arg->drain);
+ aout_StreamFlush(aout, arg->drain);
break;
case AOUT_ASYNC_CMD_CHANGE_PAUSE:
- aout_DecChangePause(aout, arg->pause.enabled, arg->pause.date);
+ aout_StreamChangePause(aout, arg->pause.enabled, arg->pause.date);
break;
case AOUT_ASYNC_CMD_CHANGE_RATE:
- aout_DecChangeRate(aout, arg->rate);
+ aout_StreamChangeRate(aout, arg->rate);
break;
case AOUT_ASYNC_CMD_CHANGE_DELAY:
- aout_DecChangeDelay(aout, arg->delay);
+ aout_StreamChangeDelay(aout, arg->delay);
break;
case AOUT_ASYNC_CMD_CLOSE:
stop = true;
diff --git a/src/audio_output/stream.c b/src/audio_output/stream.c
index 3bb411c31e..8c7975450c 100644
--- a/src/audio_output/stream.c
+++ b/src/audio_output/stream.c
@@ -41,8 +41,8 @@
/**
* Creates an audio output
*/
-int aout_DecNew(audio_output_t *p_aout, const audio_sample_format_t *p_format,
- vlc_clock_t *clock, const audio_replay_gain_t *p_replay_gain)
+int aout_StreamStart(audio_output_t *p_aout, const audio_sample_format_t *p_format,
+ vlc_clock_t *clock, const audio_replay_gain_t *p_replay_gain)
{
assert(p_aout);
assert(p_format);
@@ -116,9 +116,9 @@ error:
/**
* Stops all plugins involved in the audio output.
*/
-void aout_DecDelete (audio_output_t *aout)
+void aout_StreamStop(audio_output_t *aout)
{
- aout_DecFlush( aout, false );
+ aout_StreamFlush( aout, false );
aout_owner_t *owner = aout_owner (aout);
if (owner->mixer_format.i_format)
@@ -190,7 +190,7 @@ static int aout_CheckReady (audio_output_t *aout)
* Marks the audio output for restart, to update any parameter of the output
* plug-in (e.g. output device or channel mapping).
*/
-void aout_RequestRestart (audio_output_t *aout, unsigned mode)
+void aout_StreamRestart (audio_output_t *aout, unsigned mode)
{
aout_owner_t *owner = aout_owner (aout);
atomic_fetch_or_explicit(&owner->restart, mode, memory_order_release);
@@ -209,9 +209,10 @@ static void aout_StopResampling (audio_output_t *aout)
aout_FiltersAdjustResampling (owner->filters, 0);
}
-static void aout_DecSynchronize(audio_output_t *aout, vlc_tick_t system_now,
- vlc_tick_t dec_pts);
-static void aout_DecSilence (audio_output_t *aout, vlc_tick_t length, vlc_tick_t pts)
+static void aout_StreamSynchronize(audio_output_t *aout, vlc_tick_t system_now,
+ vlc_tick_t dec_pts);
+static void aout_StreamSilence(audio_output_t *aout, vlc_tick_t length,
+ vlc_tick_t pts)
{
aout_owner_t *owner = aout_owner (aout);
const audio_sample_format_t *fmt = &owner->mixer_format;
@@ -236,7 +237,7 @@ static void aout_DecSilence (audio_output_t *aout, vlc_tick_t length, vlc_tick_t
aout->play(aout, block, system_pts);
}
-static void aout_DecSynchronize(audio_output_t *aout, vlc_tick_t system_now,
+static void aout_StreamSynchronize(audio_output_t *aout, vlc_tick_t system_now,
vlc_tick_t dec_pts)
{
/**
@@ -278,7 +279,7 @@ static void aout_DecSynchronize(audio_output_t *aout, vlc_tick_t system_now,
vlc_tick_t jitter = play_date - system_now;
if (jitter > 0)
{
- aout_DecSilence (aout, jitter, dec_pts - delay);
+ aout_StreamSilence (aout, jitter, dec_pts - delay);
if (aout->time_get(aout, &delay) != 0)
return;
}
@@ -310,7 +311,7 @@ void aout_RequestRetiming(audio_output_t *aout, vlc_tick_t system_ts,
else
msg_Dbg (aout, "playback too late (%"PRId64"): "
"flushing buffers", drift);
- aout_DecFlush(aout, false);
+ aout_StreamFlush(aout, false);
aout_StopResampling (aout);
return; /* nothing can be done if timing is unknown */
@@ -324,7 +325,7 @@ void aout_RequestRetiming(audio_output_t *aout, vlc_tick_t system_ts,
if (!owner->sync.discontinuity)
msg_Warn (aout, "playback way too early (%"PRId64"): "
"playing silence", drift);
- aout_DecSilence (aout, -drift, audio_ts);
+ aout_StreamSilence (aout, -drift, audio_ts);
aout_StopResampling (aout);
owner->sync.discontinuity = true;
@@ -382,9 +383,9 @@ void aout_RequestRetiming(audio_output_t *aout, vlc_tick_t system_ts,
}
/*****************************************************************************
- * aout_DecPlay : filter & mix the decoded buffer
+ * aout_StreamPlay : filter & mix the decoded buffer
*****************************************************************************/
-int aout_DecPlay(audio_output_t *aout, block_t *block)
+int aout_StreamPlay(audio_output_t *aout, block_t *block)
{
aout_owner_t *owner = aout_owner (aout);
@@ -437,12 +438,12 @@ int aout_DecPlay(audio_output_t *aout, block_t *block)
vlc_tick_t delta = vlc_clock_SetDelay(owner->sync.clock, owner->sync.delay);
aout_FiltersSetClockDelay(owner->filters, owner->sync.delay);
if (delta > 0)
- aout_DecSilence (aout, delta, block->i_pts);
+ aout_StreamSilence (aout, delta, block->i_pts);
}
/* Drift correction */
vlc_tick_t system_now = vlc_tick_now();
- aout_DecSynchronize(aout, system_now, original_pts);
+ aout_StreamSynchronize(aout, system_now, original_pts);
const vlc_tick_t play_date =
vlc_clock_ConvertToSystem(owner->sync.clock, system_now, original_pts,
@@ -472,7 +473,7 @@ void aout_GetResetStats(audio_output_t *aout, unsigned *restrict lost,
memory_order_relaxed);
}
-void aout_DecChangePause (audio_output_t *aout, bool paused, vlc_tick_t date)
+void aout_StreamChangePause(audio_output_t *aout, bool paused, vlc_tick_t date)
{
aout_owner_t *owner = aout_owner (aout);
@@ -485,21 +486,21 @@ void aout_DecChangePause (audio_output_t *aout, bool paused, vlc_tick_t date)
}
}
-void aout_DecChangeRate(audio_output_t *aout, float rate)
+void aout_StreamChangeRate(audio_output_t *aout, float rate)
{
aout_owner_t *owner = aout_owner(aout);
owner->sync.rate = rate;
}
-void aout_DecChangeDelay(audio_output_t *aout, vlc_tick_t delay)
+void aout_StreamChangeDelay(audio_output_t *aout, vlc_tick_t delay)
{
aout_owner_t *owner = aout_owner(aout);
owner->sync.request_delay = delay;
}
-void aout_DecFlush (audio_output_t *aout, bool wait)
+void aout_StreamFlush(audio_output_t *aout, bool wait)
{
aout_owner_t *owner = aout_owner (aout);
--
2.20.1
More information about the vlc-devel
mailing list