Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
db0675fa
Commit
db0675fa
authored
Jul 26, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: remove aout_mixer_input_t (no functional changes)
parent
d1136fc4
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
24 deletions
+18
-24
include/vlc_aout_mixer.h
include/vlc_aout_mixer.h
+1
-6
src/audio_output/aout_internal.h
src/audio_output/aout_internal.h
+1
-1
src/audio_output/dec.c
src/audio_output/dec.c
+3
-3
src/audio_output/input.c
src/audio_output/input.c
+10
-10
src/audio_output/mixer.c
src/audio_output/mixer.c
+2
-3
src/audio_output/output.c
src/audio_output/output.c
+1
-1
No files found.
include/vlc_aout_mixer.h
View file @
db0675fa
...
...
@@ -40,10 +40,6 @@ extern "C" {
typedef
struct
aout_mixer_sys_t
aout_mixer_sys_t
;
typedef
struct
aout_mixer_t
aout_mixer_t
;
typedef
struct
{
aout_fifo_t
fifo
;
}
aout_mixer_input_t
;
/**
* audio output mixer
*/
...
...
@@ -59,8 +55,7 @@ struct aout_mixer_t {
*/
audio_sample_format_t
fmt
;
/* Array of mixer inputs */
aout_mixer_input_t
*
input
;
aout_fifo_t
*
fifo
;
/* Mix buffer (mandatory) */
void
(
*
mix
)(
aout_mixer_t
*
,
aout_buffer_t
*
,
float
);
...
...
src/audio_output/aout_internal.h
View file @
db0675fa
...
...
@@ -93,7 +93,7 @@ struct aout_input_t
aout_request_vout_t
request_vout
;
/* */
aout_
mixer_input_t
mixer
;
aout_
fifo_t
fifo
;
};
/****************************************************************************
...
...
src/audio_output/dec.c
View file @
db0675fa
...
...
@@ -231,7 +231,7 @@ void aout_DecChangePause( audio_output_t *p_aout, aout_input_t *p_input, bool b_
if
(
i_duration
!=
0
)
{
for
(
aout_buffer_t
*
p
=
p_input
->
mixer
.
fifo
.
p_first
;
p
!=
NULL
;
p
=
p
->
p_next
)
for
(
aout_buffer_t
*
p
=
p_input
->
fifo
.
p_first
;
p
!=
NULL
;
p
=
p
->
p_next
)
{
p
->
i_pts
+=
i_duration
;
}
...
...
@@ -243,7 +243,7 @@ void aout_DecChangePause( audio_output_t *p_aout, aout_input_t *p_input, bool b_
void
aout_DecFlush
(
audio_output_t
*
p_aout
,
aout_input_t
*
p_input
)
{
aout_lock
(
p_aout
);
aout_FifoSet
(
&
p_input
->
mixer
.
fifo
,
0
);
aout_FifoSet
(
&
p_input
->
fifo
,
0
);
aout_unlock
(
p_aout
);
}
...
...
@@ -252,7 +252,7 @@ bool aout_DecIsEmpty( audio_output_t * p_aout, aout_input_t * p_input )
mtime_t
end_date
;
aout_lock
(
p_aout
);
end_date
=
aout_FifoNextStart
(
&
p_input
->
mixer
.
fifo
);
end_date
=
aout_FifoNextStart
(
&
p_input
->
fifo
);
aout_unlock
(
p_aout
);
return
end_date
<=
mdate
();
}
src/audio_output/input.c
View file @
db0675fa
...
...
@@ -81,7 +81,7 @@ int aout_InputNew( audio_output_t * p_aout, aout_input_t * p_input, const aout_r
p_input
->
i_nb_resamplers
=
p_input
->
i_nb_filters
=
0
;
/* Prepare FIFO. */
aout_FifoInit
(
p_aout
,
&
p_input
->
mixer
.
fifo
,
p_aout
->
mixer_format
.
i_rate
);
aout_FifoInit
(
p_aout
,
&
p_input
->
fifo
,
p_aout
->
mixer_format
.
i_rate
);
/* */
if
(
p_request_vout
)
...
...
@@ -446,7 +446,7 @@ int aout_InputDelete( audio_output_t * p_aout, aout_input_t * p_input )
aout_FiltersDestroyPipeline
(
p_input
->
pp_resamplers
,
p_input
->
i_nb_resamplers
);
p_input
->
i_nb_resamplers
=
0
;
aout_FifoDestroy
(
&
p_input
->
mixer
.
fifo
);
aout_FifoDestroy
(
&
p_input
->
fifo
);
return
0
;
}
...
...
@@ -465,16 +465,16 @@ void aout_InputCheckAndRestart( audio_output_t * p_aout, aout_input_t * p_input
/* A little trick to avoid loosing our input fifo and properties */
aout_fifo_t
fifo
=
p_input
->
mixer
.
fifo
;
aout_fifo_t
fifo
=
p_input
->
fifo
;
bool
b_paused
=
p_input
->
b_paused
;
mtime_t
i_pause_date
=
p_input
->
i_pause_date
;
aout_FifoInit
(
p_aout
,
&
p_input
->
mixer
.
fifo
,
p_aout
->
mixer_format
.
i_rate
);
aout_FifoInit
(
p_aout
,
&
p_input
->
fifo
,
p_aout
->
mixer_format
.
i_rate
);
aout_InputDelete
(
p_aout
,
p_input
);
aout_InputNew
(
p_aout
,
p_input
,
&
p_input
->
request_vout
);
p_input
->
mixer
.
fifo
=
fifo
;
p_input
->
fifo
=
fifo
;
p_input
->
b_paused
=
b_paused
;
p_input
->
i_pause_date
=
i_pause_date
;
...
...
@@ -540,7 +540,7 @@ void aout_InputPlay( audio_output_t * p_aout, aout_input_t * p_input,
/* We don't care if someone changes the start date behind our back after
* this. We'll deal with that when pushing the buffer, and compensate
* with the next incoming buffer. */
start_date
=
aout_FifoNextStart
(
&
p_input
->
mixer
.
fifo
);
start_date
=
aout_FifoNextStart
(
&
p_input
->
fifo
);
if
(
start_date
!=
0
&&
start_date
<
now
)
{
...
...
@@ -549,7 +549,7 @@ void aout_InputPlay( audio_output_t * p_aout, aout_input_t * p_input,
* happen :). */
msg_Warn
(
p_aout
,
"computed PTS is out of range (%"
PRId64
"), "
"clearing out"
,
now
-
start_date
);
aout_FifoSet
(
&
p_input
->
mixer
.
fifo
,
0
);
aout_FifoSet
(
&
p_input
->
fifo
,
0
);
if
(
p_input
->
i_resampling_type
!=
AOUT_RESAMPLING_NONE
)
msg_Warn
(
p_aout
,
"timing screwed, stopping resampling"
);
inputResamplingStop
(
p_input
);
...
...
@@ -579,7 +579,7 @@ void aout_InputPlay( audio_output_t * p_aout, aout_input_t * p_input,
{
msg_Warn
(
p_aout
,
"buffer way too early (%"
PRId64
"), clearing queue"
,
drift
);
aout_FifoSet
(
&
p_input
->
mixer
.
fifo
,
0
);
aout_FifoSet
(
&
p_input
->
fifo
,
0
);
if
(
p_input
->
i_resampling_type
!=
AOUT_RESAMPLING_NONE
)
msg_Warn
(
p_aout
,
"timing screwed, stopping resampling"
);
inputResamplingStop
(
p_input
);
...
...
@@ -692,7 +692,7 @@ void aout_InputPlay( audio_output_t * p_aout, aout_input_t * p_input,
/* Adding the start date will be managed by aout_FifoPush(). */
p_buffer
->
i_pts
=
start_date
;
aout_FifoPush
(
&
p_input
->
mixer
.
fifo
,
p_buffer
);
aout_FifoPush
(
&
p_input
->
fifo
,
p_buffer
);
}
/*****************************************************************************
...
...
@@ -709,7 +709,7 @@ static void inputFailure( audio_output_t * p_aout, aout_input_t * p_input,
aout_FiltersDestroyPipeline
(
p_input
->
pp_filters
,
p_input
->
i_nb_filters
);
aout_FiltersDestroyPipeline
(
p_input
->
pp_resamplers
,
p_input
->
i_nb_resamplers
);
aout_FifoDestroy
(
&
p_input
->
mixer
.
fifo
);
aout_FifoDestroy
(
&
p_input
->
fifo
);
var_Destroy
(
p_aout
,
"visual"
);
var_Destroy
(
p_aout
,
"equalizer"
);
var_Destroy
(
p_aout
,
"audio-filter"
);
...
...
src/audio_output/mixer.c
View file @
db0675fa
...
...
@@ -51,7 +51,7 @@ int aout_MixerNew( audio_output_t * p_aout )
return
VLC_EGENERIC
;
p_mixer
->
fmt
=
p_aout
->
mixer_format
;
p_mixer
->
input
=
&
p_aout
->
p_input
->
mixer
;
p_mixer
->
fifo
=
&
p_aout
->
p_input
->
fifo
;
p_mixer
->
mix
=
NULL
;
p_mixer
->
sys
=
NULL
;
...
...
@@ -93,8 +93,7 @@ void aout_MixerDelete( audio_output_t * p_aout )
static
int
MixBuffer
(
audio_output_t
*
p_aout
,
float
volume
)
{
aout_mixer_t
*
p_mixer
=
p_aout
->
p_mixer
;
aout_mixer_input_t
*
p_input
=
p_mixer
->
input
;
aout_fifo_t
*
p_fifo
=
&
p_input
->
fifo
;
aout_fifo_t
*
p_fifo
=
p_mixer
->
fifo
;
mtime_t
now
=
mdate
();
const
unsigned
samples
=
p_aout
->
i_nb_samples
;
/* FIXME: Remove this silly constraint. Just pass buffers as they come to
...
...
src/audio_output/output.c
View file @
db0675fa
...
...
@@ -418,7 +418,7 @@ aout_buffer_t * aout_OutputNextBuffer( audio_output_t * p_aout,
msg_Warn
(
p_aout
,
"output date isn't PTS date, requesting "
"resampling (%"
PRId64
")"
,
delta
);
aout_FifoMoveDates
(
&
p_aout
->
p_input
->
mixer
.
fifo
,
delta
);
aout_FifoMoveDates
(
&
p_aout
->
p_input
->
fifo
,
delta
);
aout_FifoMoveDates
(
p_fifo
,
delta
);
}
out:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment