Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
0c5f718e
Commit
0c5f718e
authored
Feb 05, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up a bit audio input.c
parent
de6ce14e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
17 deletions
+10
-17
src/audio_output/input.c
src/audio_output/input.c
+10
-17
No files found.
src/audio_output/input.c
View file @
0c5f718e
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
#define AOUT_ASSERT_INPUT_LOCKED vlc_assert_locked( &p_input->lock )
#define AOUT_ASSERT_INPUT_LOCKED vlc_assert_locked( &p_input->lock )
static
void
inputFailure
(
aout_instance_t
*
,
aout_input_t
*
,
const
char
*
);
static
void
inputFailure
(
aout_instance_t
*
,
aout_input_t
*
,
const
char
*
);
static
void
inputDrop
(
aout_in
stance_t
*
,
aout_in
put_t
*
,
aout_buffer_t
*
);
static
void
inputDrop
(
aout_input_t
*
,
aout_buffer_t
*
);
static
void
inputResamplingStop
(
aout_input_t
*
p_input
);
static
void
inputResamplingStop
(
aout_input_t
*
p_input
);
static
int
VisualizationCallback
(
vlc_object_t
*
,
char
const
*
,
static
int
VisualizationCallback
(
vlc_object_t
*
,
char
const
*
,
...
@@ -135,7 +135,7 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input, const aout_
...
@@ -135,7 +135,7 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input, const aout_
if
(
var_Get
(
p_aout
,
"effect-list"
,
&
val
)
==
VLC_SUCCESS
)
if
(
var_Get
(
p_aout
,
"effect-list"
,
&
val
)
==
VLC_SUCCESS
)
{
{
var_Set
(
p_aout
,
"visual"
,
val
);
var_Set
String
(
p_aout
,
"visual"
,
val
.
psz_string
);
free
(
val
.
psz_string
);
free
(
val
.
psz_string
);
}
}
var_AddCallback
(
p_aout
,
"visual"
,
VisualizationCallback
,
NULL
);
var_AddCallback
(
p_aout
,
"visual"
,
VisualizationCallback
,
NULL
);
...
@@ -230,10 +230,8 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input, const aout_
...
@@ -230,10 +230,8 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input, const aout_
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
}
}
var_Get
(
p_aout
,
"audio-filter"
,
&
val
);
psz_filters
=
var_GetString
(
p_aout
,
"audio-filter"
);
psz_filters
=
val
.
psz_string
;
psz_visual
=
var_GetString
(
p_aout
,
"audio-visual"
);
var_Get
(
p_aout
,
"audio-visual"
,
&
val
);
psz_visual
=
val
.
psz_string
;
psz_scaletempo
=
var_GetBool
(
p_aout
,
"audio-time-stretch"
)
?
strdup
(
"scaletempo"
)
:
NULL
;
psz_scaletempo
=
var_GetBool
(
p_aout
,
"audio-time-stretch"
)
?
strdup
(
"scaletempo"
)
:
NULL
;
...
@@ -540,7 +538,7 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
...
@@ -540,7 +538,7 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
if
(
i_input_rate
!=
INPUT_RATE_DEFAULT
&&
p_input
->
p_playback_rate_filter
==
NULL
)
if
(
i_input_rate
!=
INPUT_RATE_DEFAULT
&&
p_input
->
p_playback_rate_filter
==
NULL
)
{
{
inputDrop
(
p_
aout
,
p_
input
,
p_buffer
);
inputDrop
(
p_input
,
p_buffer
);
return
0
;
return
0
;
}
}
...
@@ -607,7 +605,7 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
...
@@ -607,7 +605,7 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
msg_Warn
(
p_aout
,
"PTS is out of range (%"
PRId64
"), dropping buffer"
,
msg_Warn
(
p_aout
,
"PTS is out of range (%"
PRId64
"), dropping buffer"
,
mdate
()
-
p_buffer
->
start_date
);
mdate
()
-
p_buffer
->
start_date
);
inputDrop
(
p_
aout
,
p_
input
,
p_buffer
);
inputDrop
(
p_input
,
p_buffer
);
inputResamplingStop
(
p_input
);
inputResamplingStop
(
p_input
);
return
0
;
return
0
;
}
}
...
@@ -634,7 +632,7 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
...
@@ -634,7 +632,7 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
{
{
msg_Warn
(
p_aout
,
"audio drift is too big (%"
PRId64
"), dropping buffer"
,
msg_Warn
(
p_aout
,
"audio drift is too big (%"
PRId64
"), dropping buffer"
,
start_date
-
p_buffer
->
start_date
);
start_date
-
p_buffer
->
start_date
);
inputDrop
(
p_
aout
,
p_
input
,
p_buffer
);
inputDrop
(
p_input
,
p_buffer
);
return
0
;
return
0
;
}
}
...
@@ -784,7 +782,7 @@ static void inputFailure( aout_instance_t * p_aout, aout_input_t * p_input,
...
@@ -784,7 +782,7 @@ static void inputFailure( aout_instance_t * p_aout, aout_input_t * p_input,
p_input
->
b_error
=
1
;
p_input
->
b_error
=
1
;
}
}
static
void
inputDrop
(
aout_in
stance_t
*
p_aout
,
aout_in
put_t
*
p_input
,
aout_buffer_t
*
p_buffer
)
static
void
inputDrop
(
aout_input_t
*
p_input
,
aout_buffer_t
*
p_buffer
)
{
{
aout_BufferFree
(
p_buffer
);
aout_BufferFree
(
p_buffer
);
...
@@ -823,7 +821,6 @@ static int VisualizationCallback( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -823,7 +821,6 @@ static int VisualizationCallback( vlc_object_t *p_this, char const *psz_cmd,
{
{
aout_instance_t
*
p_aout
=
(
aout_instance_t
*
)
p_this
;
aout_instance_t
*
p_aout
=
(
aout_instance_t
*
)
p_this
;
char
*
psz_mode
=
newval
.
psz_string
;
char
*
psz_mode
=
newval
.
psz_string
;
vlc_value_t
val
;
(
void
)
psz_cmd
;
(
void
)
oldval
;
(
void
)
p_data
;
(
void
)
psz_cmd
;
(
void
)
oldval
;
(
void
)
p_data
;
if
(
!
psz_mode
||
!*
psz_mode
)
if
(
!
psz_mode
||
!*
psz_mode
)
...
@@ -848,9 +845,8 @@ static int VisualizationCallback( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -848,9 +845,8 @@ static int VisualizationCallback( vlc_object_t *p_this, char const *psz_cmd,
}
}
else
else
{
{
val
.
psz_string
=
psz_mode
;
var_Create
(
p_aout
,
"effect-list"
,
VLC_VAR_STRING
);
var_Create
(
p_aout
,
"effect-list"
,
VLC_VAR_STRING
);
var_Set
(
p_aout
,
"effect-list"
,
val
);
var_Set
String
(
p_aout
,
"effect-list"
,
psz_mode
);
ChangeFiltersString
(
p_aout
,
"audio-visual"
,
"goom"
,
false
);
ChangeFiltersString
(
p_aout
,
"audio-visual"
,
"goom"
,
false
);
ChangeFiltersString
(
p_aout
,
"audio-visual"
,
"visual"
,
true
);
ChangeFiltersString
(
p_aout
,
"audio-visual"
,
"visual"
,
true
);
...
@@ -869,7 +865,6 @@ static int EqualizerCallback( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -869,7 +865,6 @@ static int EqualizerCallback( vlc_object_t *p_this, char const *psz_cmd,
{
{
aout_instance_t
*
p_aout
=
(
aout_instance_t
*
)
p_this
;
aout_instance_t
*
p_aout
=
(
aout_instance_t
*
)
p_this
;
char
*
psz_mode
=
newval
.
psz_string
;
char
*
psz_mode
=
newval
.
psz_string
;
vlc_value_t
val
;
int
i_ret
;
int
i_ret
;
(
void
)
psz_cmd
;
(
void
)
oldval
;
(
void
)
p_data
;
(
void
)
psz_cmd
;
(
void
)
oldval
;
(
void
)
p_data
;
...
@@ -880,12 +875,10 @@ static int EqualizerCallback( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -880,12 +875,10 @@ static int EqualizerCallback( vlc_object_t *p_this, char const *psz_cmd,
}
}
else
else
{
{
val
.
psz_string
=
psz_mode
;
var_Create
(
p_aout
,
"equalizer-preset"
,
VLC_VAR_STRING
);
var_Create
(
p_aout
,
"equalizer-preset"
,
VLC_VAR_STRING
);
var_Set
(
p_aout
,
"equalizer-preset"
,
val
);
var_Set
String
(
p_aout
,
"equalizer-preset"
,
psz_mode
);
i_ret
=
ChangeFiltersString
(
p_aout
,
"audio-filter"
,
"equalizer"
,
i_ret
=
ChangeFiltersString
(
p_aout
,
"audio-filter"
,
"equalizer"
,
true
);
true
);
}
}
/* That sucks */
/* That sucks */
...
...
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