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
da5f53e5
Commit
da5f53e5
authored
Aug 06, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout_ChangeFilterString: use vlc_object instead of audio_output
parent
6fbd2fdd
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
56 deletions
+51
-56
src/audio_output/aout_internal.h
src/audio_output/aout_internal.h
+2
-1
src/audio_output/common.c
src/audio_output/common.c
+1
-1
src/audio_output/input.c
src/audio_output/input.c
+47
-53
src/audio_output/intf.c
src/audio_output/intf.c
+1
-1
No files found.
src/audio_output/aout_internal.h
View file @
da5f53e5
...
...
@@ -175,7 +175,8 @@ void aout_FormatsPrint(vlc_object_t *, const char *,
const
audio_sample_format_t
*
);
#define aout_FormatsPrint(o, t, a, b) \
aout_FormatsPrint(VLC_OBJECT(o), t, a, b)
bool
aout_ChangeFilterString
(
vlc_object_t
*
,
audio_output_t
*
,
const
char
*
psz_variable
,
const
char
*
psz_name
,
bool
b_add
);
bool
aout_ChangeFilterString
(
vlc_object_t
*
manager
,
vlc_object_t
*
aout
,
const
char
*
var
,
const
char
*
name
,
bool
b_add
);
/* From dec.c */
int
aout_DecNew
(
audio_output_t
*
,
const
audio_sample_format_t
*
,
...
...
src/audio_output/common.c
View file @
da5f53e5
...
...
@@ -664,7 +664,7 @@ static int FilterOrder( const char *psz_name )
/* This function will add or remove a a module from a string list (colon
* separated). It will return true if there is a modification
* In case p_aout is NULL, we will use configuration instead of variable */
bool
aout_ChangeFilterString
(
vlc_object_t
*
p_obj
,
audio_outpu
t_t
*
p_aout
,
bool
aout_ChangeFilterString
(
vlc_object_t
*
p_obj
,
vlc_objec
t_t
*
p_aout
,
const
char
*
psz_variable
,
const
char
*
psz_name
,
bool
b_add
)
{
...
...
src/audio_output/input.c
View file @
da5f53e5
...
...
@@ -135,7 +135,7 @@ int aout_InputNew( audio_output_t * p_aout, aout_input_t * p_input, const aout_r
var_SetString
(
p_aout
,
"visual"
,
val
.
psz_string
);
free
(
val
.
psz_string
);
}
var_AddCallback
(
p_aout
,
"visual"
,
VisualizationCallback
,
NULL
);
var_AddCallback
(
p_aout
,
"visual"
,
VisualizationCallback
,
p_input
);
}
if
(
var_Type
(
p_aout
,
"equalizer"
)
==
0
)
...
...
@@ -767,81 +767,75 @@ vout_thread_t *aout_filter_RequestVout( filter_t *p_filter,
p_vout
,
p_fmt
,
p_input
->
b_recycle_vout
);
}
static
in
t
ChangeFiltersString
(
audio_output_t
*
p_aout
,
const
char
*
psz_variable
,
const
char
*
psz_name
,
bool
b_add
)
static
in
line
bool
ChangeFiltersString
(
vlc_object_t
*
aout
,
const
char
*
var
,
const
char
*
filter
,
bool
add
)
{
return
aout_ChangeFilterString
(
VLC_OBJECT
(
p_aout
),
p_aout
,
psz_variable
,
psz_name
,
b_add
)
?
1
:
0
;
return
aout_ChangeFilterString
(
aout
,
aout
,
var
,
filter
,
add
);
}
static
int
VisualizationCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
static
int
VisualizationCallback
(
vlc_object_t
*
obj
,
char
const
*
var
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
data
)
{
audio_output_t
*
p_aout
=
(
audio_output_t
*
)
p_this
;
char
*
psz_mode
=
newval
.
psz_string
;
(
void
)
psz_cmd
;
(
void
)
oldval
;
(
void
)
p_data
;
const
char
*
mode
=
newval
.
psz_string
;
aout_input_t
*
input
=
data
;
if
(
!
psz_mode
||
!*
psz_mode
)
if
(
!*
mode
)
{
ChangeFiltersString
(
p_aout
,
"audio-visual"
,
"goom"
,
false
);
ChangeFiltersString
(
p_aout
,
"audio-visual"
,
"visual"
,
false
);
ChangeFiltersString
(
p_aout
,
"audio-visual"
,
"projectm"
,
false
);
ChangeFiltersString
(
obj
,
"audio-visual"
,
"goom"
,
false
);
ChangeFiltersString
(
obj
,
"audio-visual"
,
"visual"
,
false
);
ChangeFiltersString
(
obj
,
"audio-visual"
,
"projectm"
,
false
);
}
else
else
if
(
!
strcmp
(
"goom"
,
mode
))
{
if
(
!
strcmp
(
"goom"
,
psz_mode
)
)
{
ChangeFiltersString
(
p_aout
,
"audio-visual"
,
"visual"
,
false
);
ChangeFiltersString
(
p_aout
,
"audio-visual"
,
"goom"
,
true
);
ChangeFiltersString
(
p_aout
,
"audio-visual"
,
"projectm"
,
false
);
ChangeFiltersString
(
obj
,
"audio-visual"
,
"visual"
,
false
);
ChangeFiltersString
(
obj
,
"audio-visual"
,
"goom"
,
true
);
ChangeFiltersString
(
obj
,
"audio-visual"
,
"projectm"
,
false
);
}
else
if
(
!
strcmp
(
"projectm"
,
psz_mode
)
)
else
if
(
!
strcmp
(
"projectm"
,
mode
)
)
{
ChangeFiltersString
(
p_aout
,
"audio-visual"
,
"visual"
,
false
);
ChangeFiltersString
(
p_aout
,
"audio-visual"
,
"goom"
,
false
);
ChangeFiltersString
(
p_aout
,
"audio-visual"
,
"projectm"
,
true
);
ChangeFiltersString
(
obj
,
"audio-visual"
,
"visual"
,
false
);
ChangeFiltersString
(
obj
,
"audio-visual"
,
"goom"
,
false
);
ChangeFiltersString
(
obj
,
"audio-visual"
,
"projectm"
,
true
);
}
else
{
var_Create
(
p_aout
,
"effect-list"
,
VLC_VAR_STRING
);
var_SetString
(
p_aout
,
"effect-list"
,
psz_mode
);
var_Create
(
obj
,
"effect-list"
,
VLC_VAR_STRING
);
var_SetString
(
obj
,
"effect-list"
,
mode
);
ChangeFiltersString
(
p_aout
,
"audio-visual"
,
"goom"
,
false
);
ChangeFiltersString
(
p_aout
,
"audio-visual"
,
"visual"
,
true
);
ChangeFiltersString
(
p_aout
,
"audio-visual"
,
"projectm"
,
false
);
}
ChangeFiltersString
(
obj
,
"audio-visual"
,
"goom"
,
false
);
ChangeFiltersString
(
obj
,
"audio-visual"
,
"visual"
,
true
);
ChangeFiltersString
(
obj
,
"audio-visual"
,
"projectm"
,
false
);
}
/* That sucks */
AoutInputsMarkToRestart
(
p_aout
);
/* That sucks
FIXME: use "input" instead of cast
*/
AoutInputsMarkToRestart
((
audio_output_t
*
)
obj
);
(
void
)
var
;
(
void
)
oldval
;
return
VLC_SUCCESS
;
}
static
int
EqualizerCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
static
int
EqualizerCallback
(
vlc_object_t
*
obj
,
char
const
*
cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
data
)
{
audio_output_t
*
p_aout
=
(
audio_output_t
*
)
p_this
;
char
*
psz_mode
=
newval
.
psz_string
;
int
i_ret
;
(
void
)
psz_cmd
;
(
void
)
oldval
;
(
void
)
p_data
;
char
*
mode
=
newval
.
psz_string
;
aout_input_t
*
input
=
data
;
bool
ret
;
if
(
!
psz_mode
||
!*
psz_mode
)
{
i_ret
=
ChangeFiltersString
(
p_aout
,
"audio-filter"
,
"equalizer"
,
false
);
}
(
void
)
cmd
;
(
void
)
oldval
;
if
(
!*
mode
)
ret
=
ChangeFiltersString
(
obj
,
"audio-filter"
,
"equalizer"
,
false
);
else
{
var_Create
(
p_aout
,
"equalizer-preset"
,
VLC_VAR_STRING
);
var_SetString
(
p_aout
,
"equalizer-preset"
,
psz_mode
);
i_ret
=
ChangeFiltersString
(
p_aout
,
"audio-filter"
,
"equalizer"
,
true
);
var_Create
(
obj
,
"equalizer-preset"
,
VLC_VAR_STRING
);
var_SetString
(
obj
,
"equalizer-preset"
,
mode
);
ret
=
ChangeFiltersString
(
obj
,
"audio-filter"
,
"equalizer"
,
true
);
}
/* That sucks */
if
(
i_ret
==
1
)
AoutInputsMarkToRestart
(
p_aout
);
if
(
ret
)
AoutInputsMarkToRestart
((
audio_output_t
*
)
obj
);
return
VLC_SUCCESS
;
}
...
...
src/audio_output/intf.c
View file @
da5f53e5
...
...
@@ -278,7 +278,7 @@ void aout_EnableFilter( vlc_object_t *p_this, const char *psz_name,
{
audio_output_t
*
p_aout
=
findAout
(
p_this
);
if
(
aout_ChangeFilterString
(
p_this
,
p_aout
,
"audio-filter"
,
psz_name
,
b_add
)
)
if
(
aout_ChangeFilterString
(
p_this
,
VLC_OBJECT
(
p_aout
)
,
"audio-filter"
,
psz_name
,
b_add
)
)
{
if
(
p_aout
)
AoutInputsMarkToRestart
(
p_aout
);
...
...
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