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
32ca7955
Commit
32ca7955
authored
Jan 31, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Kill a few vlc_object_find
parent
dd57c0a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
10 deletions
+23
-10
src/audio_output/intf.c
src/audio_output/intf.c
+23
-10
No files found.
src/audio_output/intf.c
View file @
32ca7955
...
...
@@ -38,6 +38,24 @@
#include <vlc_aout.h>
#include "aout_internal.h"
#include <vlc_playlist.h>
static
aout_instance_t
*
findAout
(
vlc_object_t
*
obj
)
{
playlist_t
*
pl
=
pl_Hold
(
obj
->
p_libvlc
);
if
(
pl
==
NULL
)
return
NULL
;
input_thread_t
*
p_input
=
playlist_CurrentInput
(
pl
);
pl_Release
(
obj
->
p_libvlc
);
if
(
p_input
==
NULL
)
return
NULL
;
aout_instance_t
*
p_aout
=
input_GetAout
(
p_input
);
vlc_object_release
(
p_input
);
return
p_aout
;
}
/*
* Volume management
*
...
...
@@ -78,8 +96,7 @@ int doVolumeChanges( unsigned action, vlc_object_t * p_object, int i_nb_steps,
int
i_result
=
VLC_SUCCESS
;
int
i_volume_step
=
1
,
i_new_volume
=
0
;
bool
b_var_mute
=
false
;
aout_instance_t
*
p_aout
=
vlc_object_find
(
p_object
,
VLC_OBJECT_AOUT
,
FIND_ANYWHERE
);
aout_instance_t
*
p_aout
=
findAout
(
p_object
);
if
(
p_aout
)
aout_lock_volume
(
p_aout
);
...
...
@@ -176,8 +193,7 @@ int doVolumeChanges( unsigned action, vlc_object_t * p_object, int i_nb_steps,
int
__aout_VolumeGet
(
vlc_object_t
*
p_object
,
audio_volume_t
*
pi_volume
)
{
int
i_result
=
0
;
aout_instance_t
*
p_aout
=
vlc_object_find
(
p_object
,
VLC_OBJECT_AOUT
,
FIND_ANYWHERE
);
aout_instance_t
*
p_aout
=
findAout
(
p_object
);
if
(
pi_volume
==
NULL
)
return
-
1
;
...
...
@@ -253,8 +269,7 @@ int __aout_ToggleMute( vlc_object_t * p_object, audio_volume_t * pi_volume )
bool
aout_IsMuted
(
vlc_object_t
*
p_object
)
{
bool
b_return_val
;
aout_instance_t
*
p_aout
=
vlc_object_find
(
p_object
,
VLC_OBJECT_AOUT
,
FIND_ANYWHERE
);
aout_instance_t
*
p_aout
=
findAout
(
p_object
);
if
(
p_aout
)
aout_lock_volume
(
p_aout
);
b_return_val
=
var_GetBool
(
p_object
->
p_libvlc
,
"volume-muted"
);
if
(
p_aout
)
...
...
@@ -435,8 +450,7 @@ static int aout_Restart( aout_instance_t * p_aout )
int
aout_FindAndRestart
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
aout_instance_t
*
p_aout
=
vlc_object_find
(
p_this
,
VLC_OBJECT_AOUT
,
FIND_ANYWHERE
);
aout_instance_t
*
p_aout
=
findAout
(
p_this
);
(
void
)
psz_name
;
(
void
)
oldval
;
(
void
)
newval
;
(
void
)
p_data
;
if
(
p_aout
==
NULL
)
return
VLC_SUCCESS
;
...
...
@@ -479,8 +493,7 @@ int aout_ChannelsRestart( vlc_object_t * p_this, const char * psz_variable,
void
aout_EnableFilter
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
,
bool
b_add
)
{
aout_instance_t
*
p_aout
=
vlc_object_find
(
p_this
,
VLC_OBJECT_AOUT
,
FIND_ANYWHERE
);
aout_instance_t
*
p_aout
=
findAout
(
p_this
);
if
(
AoutChangeFilterString
(
p_this
,
p_aout
,
"audio-filter"
,
psz_name
,
b_add
)
)
{
...
...
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