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
360a96dd
Commit
360a96dd
authored
Nov 01, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
interfaces: use playlist_GetAout() where applicable (fixes #7601)
parent
0716a916
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
44 additions
and
92 deletions
+44
-92
modules/control/hotkeys.c
modules/control/hotkeys.c
+4
-6
modules/control/rc.c
modules/control/rc.c
+1
-7
modules/gui/macosx/MainMenu.m
modules/gui/macosx/MainMenu.m
+1
-1
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+3
-5
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+1
-1
modules/gui/skins2/vars/equalizer.cpp
modules/gui/skins2/vars/equalizer.cpp
+2
-14
modules/lua/libs/equalizer.c
modules/lua/libs/equalizer.c
+26
-46
modules/lua/libs/objects.c
modules/lua/libs/objects.c
+6
-12
No files found.
modules/control/hotkeys.c
View file @
360a96dd
...
...
@@ -160,9 +160,6 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
/* Update the vout */
vout_thread_t
*
p_vout
=
p_input
?
input_GetVout
(
p_input
)
:
NULL
;
/* Update the aout */
vlc_object_t
*
p_aout
=
p_input
?
(
vlc_object_t
*
)
input_GetAout
(
p_input
)
:
NULL
;
/* Register OSD channels */
/* FIXME: this check can fail if the new vout is reallocated at the same
* address as the old one... We should rather listen to vout events.
...
...
@@ -318,7 +315,9 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
case
ACTIONID_AUDIODEVICE_CYCLE
:
{
if
(
!
p_aout
)
vlc_object_t
*
p_aout
=
(
vlc_object_t
*
)
playlist_GetAout
(
p_playlist
);
if
(
p_aout
==
NULL
)
break
;
vlc_value_t
val
,
list
,
list2
;
...
...
@@ -363,6 +362,7 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
list2
.
p_list
->
p_values
[
i
].
psz_string
);
}
var_FreeList
(
&
list
,
&
list2
);
vlc_object_release
(
p_aout
);
break
;
}
...
...
@@ -923,8 +923,6 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
}
}
cleanup_and_continue:
if
(
p_aout
)
vlc_object_release
(
p_aout
);
if
(
p_vout
)
vlc_object_release
(
p_vout
);
if
(
p_input
)
...
...
modules/control/rc.c
View file @
360a96dd
...
...
@@ -1687,17 +1687,11 @@ static int AudioConfig( vlc_object_t *p_this, char const *psz_cmd,
{
VLC_UNUSED
(
oldval
);
VLC_UNUSED
(
p_data
);
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
input_thread_t
*
p_input
=
playlist_CurrentInput
(
p_intf
->
p_sys
->
p_playlist
);
const
char
*
psz_variable
;
vlc_value_t
val_name
;
int
i_error
;
if
(
!
p_input
)
return
VLC_ENOOBJ
;
vlc_object_t
*
p_aout
=
(
vlc_object_t
*
)
input_GetAout
(
p_input
);
vlc_object_release
(
p_input
);
vlc_object_t
*
p_aout
=
(
vlc_object_t
*
)
playlist_GetAout
(
pl_Get
(
p_this
)
);
if
(
p_aout
==
NULL
)
return
VLC_ENOOBJ
;
...
...
modules/gui/macosx/MainMenu.m
View file @
360a96dd
...
...
@@ -495,7 +495,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
if
([
o_mi_videotrack
isEnabled
]
==
YES
)
[
o_mi_subtitle
setEnabled
:
YES
];
audio_output_t
*
p_aout
=
input_GetAout
(
p_inpu
t
);
audio_output_t
*
p_aout
=
playlist_GetAout
(
p_playlis
t
);
if
(
p_aout
!=
NULL
)
{
[
self
setupVarMenuItem
:
o_mi_channels
target
:
(
vlc_object_t
*
)
p_aout
var:
"stereo-mode"
selector
:
@selector
(
toggleVar
:
)];
...
...
modules/gui/macosx/intf.m
View file @
360a96dd
...
...
@@ -530,12 +530,10 @@ vout_thread_t *getVoutForActiveWindow(void)
audio_output_t
*
getAout
(
void
)
{
in
put_thread_t
*
p_input
=
getInput
()
;
if
(
!
p_in
put
)
in
tf_thread_t
*
p_intf
=
VLCIntf
;
if
(
!
p_in
tf
)
return
NULL
;
audio_output_t
*
p_aout
=
input_GetAout
(
p_input
);
vlc_object_release
(
p_input
);
return
p_aout
;
return
playlist_GetAout
(
pl_Get
(
p_intf
));
}
#pragma mark -
...
...
modules/gui/qt4/input_manager.cpp
View file @
360a96dd
...
...
@@ -1028,7 +1028,7 @@ vout_thread_t* MainInputManager::getVout()
audio_output_t
*
MainInputManager
::
getAout
()
{
return
p
_input
?
input_GetAout
(
p_input
)
:
NULL
;
return
p
laylist_GetAout
(
THEPL
)
;
}
void
MainInputManager
::
customEvent
(
QEvent
*
event
)
...
...
modules/gui/skins2/vars/equalizer.cpp
View file @
360a96dd
...
...
@@ -84,12 +84,8 @@ VariablePtr EqualizerBands::getBand( int band )
void
EqualizerBands
::
onUpdate
(
Subject
<
VarPercent
>
&
rBand
,
void
*
arg
)
{
(
void
)
rBand
;
(
void
)
arg
;
audio_output_t
*
pAout
=
NULL
;
playlist_t
*
pPlaylist
=
getIntf
()
->
p_sys
->
p_playlist
;
input_thread_t
*
pInput
=
playlist_CurrentInput
(
pPlaylist
);
if
(
pInput
)
pAout
=
input_GetAout
(
pInput
);
audio_output_t
*
pAout
=
playlist_GetAout
(
pPlaylist
);
// Make sure we are not called from set()
if
(
!
m_isUpdating
)
...
...
@@ -120,8 +116,6 @@ void EqualizerBands::onUpdate( Subject<VarPercent> &rBand, void *arg )
if
(
pAout
)
vlc_object_release
(
pAout
);
if
(
pInput
)
vlc_object_release
(
pInput
);
}
...
...
@@ -134,12 +128,8 @@ EqualizerPreamp::EqualizerPreamp( intf_thread_t *pIntf ): VarPercent( pIntf )
void
EqualizerPreamp
::
set
(
float
percentage
,
bool
updateVLC
)
{
audio_output_t
*
pAout
=
NULL
;
playlist_t
*
pPlaylist
=
getIntf
()
->
p_sys
->
p_playlist
;
input_thread_t
*
pInput
=
playlist_CurrentInput
(
pPlaylist
);
if
(
pInput
)
pAout
=
input_GetAout
(
pInput
);
audio_output_t
*
pAout
=
playlist_GetAout
(
pPlaylist
);
VarPercent
::
set
(
percentage
);
...
...
@@ -158,6 +148,4 @@ void EqualizerPreamp::set( float percentage, bool updateVLC )
if
(
pAout
)
vlc_object_release
(
pAout
);
if
(
pInput
)
vlc_object_release
(
pInput
);
}
modules/lua/libs/equalizer.c
View file @
360a96dd
...
...
@@ -60,14 +60,9 @@
*****************************************************************************/
static
int
vlclua_preamp_get
(
lua_State
*
L
)
{
input_thread_t
*
p_input
=
vlclua_get_input_internal
(
L
);
if
(
!
p_input
)
return
0
;
audio_output_t
*
p_aout
=
input_GetAout
(
p_input
);
vlc_object_release
(
p_input
);
if
(
!
p_aout
)
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
audio_output_t
*
p_aout
=
playlist_GetAout
(
p_playlist
);
if
(
p_aout
==
NULL
)
return
0
;
char
*
psz_af
=
var_GetNonEmptyString
(
p_aout
,
"audio-filter"
);
...
...
@@ -90,13 +85,9 @@ static int vlclua_preamp_get( lua_State *L )
*****************************************************************************/
static
int
vlclua_preamp_set
(
lua_State
*
L
)
{
input_thread_t
*
p_input
=
vlclua_get_input_internal
(
L
);
if
(
!
p_input
)
return
0
;
audio_output_t
*
p_aout
=
input_GetAout
(
p_input
);
vlc_object_release
(
p_input
);
if
(
!
p_aout
)
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
audio_output_t
*
p_aout
=
playlist_GetAout
(
p_playlist
);
if
(
p_aout
==
NULL
)
return
0
;
char
*
psz_af
=
var_GetNonEmptyString
(
p_aout
,
"audio-filter"
);
...
...
@@ -133,12 +124,10 @@ Band 9: 16 kHz
static
int
vlclua_equalizer_get
(
lua_State
*
L
)
{
const
unsigned
bands
=
10
;
input_thread_t
*
p_input
=
vlclua_get_input_internal
(
L
);
if
(
!
p_input
)
return
0
;
audio_output_t
*
p_aout
=
input_GetAout
(
p_input
);
vlc_object_release
(
p_input
);
if
(
!
p_aout
)
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
audio_output_t
*
p_aout
=
playlist_GetAout
(
p_playlist
);
if
(
p_aout
==
NULL
)
return
0
;
char
*
psz_af
=
var_GetNonEmptyString
(
p_aout
,
"audio-filter"
);
...
...
@@ -201,13 +190,10 @@ static int vlclua_equalizer_set( lua_State *L )
int
bandid
=
luaL_checknumber
(
L
,
1
);
if
(
bandid
<
0
||
bandid
>
9
)
return
0
;
input_thread_t
*
p_input
=
vlclua_get_input_internal
(
L
);
if
(
!
p_input
)
return
0
;
audio_output_t
*
p_aout
=
input_GetAout
(
p_input
);
vlc_object_release
(
p_inpu
t
);
if
(
!
p_aout
)
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
audio_output_t
*
p_aout
=
playlist_GetAout
(
p_playlis
t
);
if
(
p_aout
==
NULL
)
return
0
;
char
*
psz_af
=
var_GetNonEmptyString
(
p_aout
,
"audio-filter"
);
...
...
@@ -261,28 +247,22 @@ static int vlclua_equalizer_setpreset( lua_State *L )
int
presetid
=
luaL_checknumber
(
L
,
1
);
if
(
presetid
>=
NB_PRESETS
||
presetid
<
0
)
return
0
;
input_thread_t
*
p_input
=
vlclua_get_input_internal
(
L
);
if
(
p_input
)
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
audio_output_t
*
p_aout
=
playlist_GetAout
(
p_playlist
);
if
(
p_aout
==
NULL
)
return
0
;
int
ret
=
0
;
char
*
psz_af
=
var_InheritString
(
p_aout
,
"audio-filter"
);
if
(
psz_af
!=
NULL
&&
strstr
(
psz_af
,
"equalizer"
)
!=
NULL
)
{
audio_output_t
*
p_aout
=
input_GetAout
(
p_input
);
vlc_object_release
(
p_input
);
if
(
!
p_aout
)
{
return
0
;
}
char
*
psz_af
=
var_GetNonEmptyString
(
p_aout
,
"audio-filter"
);
if
(
!
psz_af
||
strstr
(
psz_af
,
"equalizer"
)
==
NULL
)
{
free
(
psz_af
);
vlc_object_release
(
p_aout
);
return
0
;
}
free
(
psz_af
);
var_SetString
(
p_aout
,
"equalizer-preset"
,
preset_list
[
presetid
]
);
vlc_object_release
(
p_aout
);
return
1
;
ret
=
1
;
}
return
0
;
free
(
psz_af
);
vlc_object_release
(
p_aout
);
return
ret
;
}
/****************************************************************************
...
...
modules/lua/libs/objects.c
View file @
360a96dd
...
...
@@ -127,18 +127,12 @@ static int vlclua_get_vout( lua_State *L )
}
static
int
vlclua_get_aout
(
lua_State
*
L
)
{
input_thread_t
*
p_input
=
vlclua_get_input_internal
(
L
);
if
(
p_input
)
{
audio_output_t
*
p_aout
=
input_GetAout
(
p_input
);
vlc_object_release
(
p_input
);
if
(
p_aout
)
{
vlclua_push_vlc_object
(
L
,
(
vlc_object_t
*
)
p_aout
);
return
1
;
}
}
lua_pushnil
(
L
);
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
audio_output_t
*
p_aout
=
playlist_GetAout
(
p_playlist
);
if
(
p_aout
!=
NULL
)
vlclua_push_vlc_object
(
L
,
(
vlc_object_t
*
)
p_aout
);
else
lua_pushnil
(
L
);
return
1
;
}
/*****************************************************************************
...
...
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