Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
ccdb1377
Commit
ccdb1377
authored
May 24, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: move input restart on filter change from playlist code
So that it works for LibVLC too.
parent
0e63a3fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
src/audio_output/output.c
src/audio_output/output.c
+10
-0
src/playlist/aout.c
src/playlist/aout.c
+2
-6
No files found.
src/audio_output/output.c
View file @
ccdb1377
...
...
@@ -153,6 +153,14 @@ static int aout_GainNotify (audio_output_t *aout, float gain)
return
0
;
}
static
int
FilterCallback
(
vlc_object_t
*
obj
,
const
char
*
var
,
vlc_value_t
prev
,
vlc_value_t
cur
,
void
*
data
)
{
aout_InputRequestRestart
((
audio_output_t
*
)
obj
);
(
void
)
var
;
(
void
)
prev
;
(
void
)
cur
;
(
void
)
data
;
return
VLC_SUCCESS
;
}
#undef aout_New
/**
* Creates an audio output object and initializes an output module.
...
...
@@ -267,6 +275,7 @@ audio_output_t *aout_New (vlc_object_t *parent)
}
var_Create
(
aout
,
"audio-filter"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_AddCallback
(
aout
,
"audio-filter"
,
FilterCallback
,
NULL
);
text
.
psz_string
=
_
(
"Audio filters"
);
var_Change
(
aout
,
"audio-filter"
,
VLC_VAR_SETTEXT
,
&
text
,
NULL
);
...
...
@@ -313,6 +322,7 @@ void aout_Destroy (audio_output_t *aout)
aout
->
device_select
=
NULL
;
aout_OutputUnlock
(
aout
);
var_DelCallback
(
aout
,
"audio-filter"
,
FilterCallback
,
NULL
);
var_DelCallback
(
aout
,
"mute"
,
var_Copy
,
aout
->
p_parent
);
var_SetFloat
(
aout
,
"volume"
,
-
1
.
f
);
var_DelCallback
(
aout
,
"volume"
,
var_Copy
,
aout
->
p_parent
);
...
...
src/playlist/aout.c
View file @
ccdb1377
...
...
@@ -133,12 +133,8 @@ void playlist_EnableAudioFilter (playlist_t *pl, const char *name, bool add)
{
audio_output_t
*
aout
=
playlist_GetAout
(
pl
);
if
(
aout_ChangeFilterString
(
VLC_OBJECT
(
pl
),
VLC_OBJECT
(
aout
),
"audio-filter"
,
name
,
add
))
{
if
(
aout
!=
NULL
)
aout_InputRequestRestart
(
aout
);
}
aout_ChangeFilterString
(
VLC_OBJECT
(
pl
),
VLC_OBJECT
(
aout
),
"audio-filter"
,
name
,
add
);
if
(
aout
!=
NULL
)
vlc_object_release
(
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