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
1979486d
Commit
1979486d
authored
Oct 05, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc_audio_*: remove useless exception parameters
parent
1e399ae2
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
25 additions
and
83 deletions
+25
-83
include/vlc/libvlc_media_player.h
include/vlc/libvlc_media_player.h
+4
-7
projects/activex/plugin.cpp
projects/activex/plugin.cpp
+1
-1
projects/activex/vlccontrol.cpp
projects/activex/vlccontrol.cpp
+1
-7
projects/activex/vlccontrol2.cpp
projects/activex/vlccontrol2.cpp
+4
-28
projects/macosx/framework/Sources/VLCAudio.m
projects/macosx/framework/Sources/VLCAudio.m
+3
-12
projects/mozilla/control/npolibvlc.cpp
projects/mozilla/control/npolibvlc.cpp
+3
-6
projects/mozilla/vlcplugin.cpp
projects/mozilla/vlcplugin.cpp
+2
-4
src/control/audio.c
src/control/audio.c
+6
-14
src/control/mediacontrol_audio_video.c
src/control/mediacontrol_audio_video.c
+1
-4
No files found.
include/vlc/libvlc_media_player.h
View file @
1979486d
...
...
@@ -962,27 +962,24 @@ VLC_PUBLIC_API void libvlc_audio_output_set_device_type( libvlc_instance_t *,
* Toggle mute status.
*
* \param p_instance libvlc instance
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API
void
libvlc_audio_toggle_mute
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
VLC_PUBLIC_API
void
libvlc_audio_toggle_mute
(
libvlc_instance_t
*
);
/**
* Get current mute status.
*
* \param p_instance libvlc instance
* \param p_e an initialized exception pointer
* \return the mute status (boolean)
*/
VLC_PUBLIC_API
int
libvlc_audio_get_mute
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
VLC_PUBLIC_API
int
libvlc_audio_get_mute
(
libvlc_instance_t
*
);
/**
* Set mute status.
*
* \param p_instance libvlc instance
* \param status If status is true then mute, otherwise unmute
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API
void
libvlc_audio_set_mute
(
libvlc_instance_t
*
,
int
,
libvlc_exception_t
*
);
VLC_PUBLIC_API
void
libvlc_audio_set_mute
(
libvlc_instance_t
*
,
int
);
/**
* Get current audio level.
...
...
@@ -991,7 +988,7 @@ VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, int , libvlc_exc
* \param p_e an initialized exception pointer
* \return the audio level (int)
*/
VLC_PUBLIC_API
int
libvlc_audio_get_volume
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
VLC_PUBLIC_API
int
libvlc_audio_get_volume
(
libvlc_instance_t
*
);
/**
* Set current audio level.
...
...
projects/activex/plugin.cpp
View file @
1979486d
...
...
@@ -504,7 +504,7 @@ void VLCPlugin::initVLC()
libvlc_audio_set_volume
(
_p_libvlc
,
_i_volume
,
NULL
);
if
(
_b_mute
)
{
libvlc_audio_set_mute
(
_p_libvlc
,
TRUE
,
NULL
);
libvlc_audio_set_mute
(
_p_libvlc
,
TRUE
);
}
// initial playlist item
...
...
projects/activex/vlccontrol.cpp
View file @
1979486d
...
...
@@ -349,13 +349,7 @@ STDMETHODIMP VLCControl::toggleMute(void)
libvlc_instance_t
*
p_libvlc
;
HRESULT
result
=
_p_instance
->
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
result
)
)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_audio_toggle_mute
(
p_libvlc
,
&
ex
);
result
=
exception_bridge
(
&
ex
);
}
libvlc_audio_toggle_mute
(
p_libvlc
);
return
result
;
};
...
...
projects/activex/vlccontrol2.cpp
View file @
1979486d
...
...
@@ -148,14 +148,8 @@ STDMETHODIMP VLCAudio::get_mute(VARIANT_BOOL* mute)
libvlc_instance_t
*
p_libvlc
;
HRESULT
hr
=
_p_instance
->
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
hr
)
)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
*
mute
=
libvlc_audio_get_mute
(
p_libvlc
,
&
ex
)
?
*
mute
=
libvlc_audio_get_mute
(
p_libvlc
)
?
VARIANT_TRUE
:
VARIANT_FALSE
;
hr
=
exception_bridge
(
&
ex
);
}
return
hr
;
};
...
...
@@ -164,13 +158,7 @@ STDMETHODIMP VLCAudio::put_mute(VARIANT_BOOL mute)
libvlc_instance_t
*
p_libvlc
;
HRESULT
hr
=
_p_instance
->
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
hr
)
)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_audio_set_mute
(
p_libvlc
,
VARIANT_FALSE
!=
mute
,
&
ex
);
hr
=
exception_bridge
(
&
ex
);
}
libvlc_audio_set_mute
(
p_libvlc
,
VARIANT_FALSE
!=
mute
);
return
hr
;
};
...
...
@@ -182,13 +170,7 @@ STDMETHODIMP VLCAudio::get_volume(long* volume)
libvlc_instance_t
*
p_libvlc
;
HRESULT
hr
=
_p_instance
->
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
hr
)
)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
*
volume
=
libvlc_audio_get_volume
(
p_libvlc
,
&
ex
);
hr
=
exception_bridge
(
&
ex
);
}
*
volume
=
libvlc_audio_get_volume
(
p_libvlc
);
return
hr
;
};
...
...
@@ -349,13 +331,7 @@ STDMETHODIMP VLCAudio::toggleMute()
libvlc_instance_t
*
p_libvlc
;
HRESULT
hr
=
_p_instance
->
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
hr
)
)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_audio_toggle_mute
(
p_libvlc
,
&
ex
);
hr
=
exception_bridge
(
&
ex
);
}
libvlc_audio_toggle_mute
(
p_libvlc
);
return
hr
;
};
...
...
projects/macosx/framework/Sources/VLCAudio.m
View file @
1979486d
...
...
@@ -50,17 +50,12 @@ NSString * VLCMediaPlayerVolumeChanged = @"VLCMediaPlayerVolumeChanged";
-
(
void
)
setMute
:(
BOOL
)
value
{
libvlc_audio_set_mute
([
library
instance
],
value
,
NULL
);
libvlc_audio_set_mute
([
library
instance
],
value
);
}
-
(
BOOL
)
isMuted
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
BOOL
result
=
libvlc_audio_get_mute
([
library
instance
],
&
ex
);
catch_exception
(
&
ex
);
return
result
;
return
libvlc_audio_get_mute
([
library
instance
]);
}
-
(
void
)
setVolume
:(
int
)
value
...
...
@@ -74,10 +69,6 @@ NSString * VLCMediaPlayerVolumeChanged = @"VLCMediaPlayerVolumeChanged";
-
(
int
)
volume
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
int
result
=
libvlc_audio_get_volume
([
library
instance
],
&
ex
);
catch_exception
(
&
ex
);
return
result
;
return
libvlc_audio_get_volume
([
library
instance
]);
}
@end
projects/mozilla/control/npolibvlc.cpp
View file @
1979486d
...
...
@@ -225,8 +225,7 @@ LibvlcAudioNPObject::getProperty(int index, NPVariant &result)
}
case
ID_audio_volume
:
{
int
volume
=
libvlc_audio_get_volume
(
p_plugin
->
getVLC
(),
&
ex
);
RETURN_ON_EXCEPTION
(
this
,
ex
);
int
volume
=
libvlc_audio_get_volume
(
p_plugin
->
getVLC
());
INT32_TO_NPVARIANT
(
volume
,
result
);
return
INVOKERESULT_NO_ERROR
;
}
...
...
@@ -280,8 +279,7 @@ LibvlcAudioNPObject::setProperty(int index, const NPVariant &value)
if
(
NPVARIANT_IS_BOOLEAN
(
value
)
)
{
libvlc_audio_set_mute
(
p_plugin
->
getVLC
(),
NPVARIANT_TO_BOOLEAN
(
value
),
&
ex
);
RETURN_ON_EXCEPTION
(
this
,
ex
);
NPVARIANT_TO_BOOLEAN
(
value
));
return
INVOKERESULT_NO_ERROR
;
}
return
INVOKERESULT_INVALID_VALUE
;
...
...
@@ -349,8 +347,7 @@ LibvlcAudioNPObject::invoke(int index, const NPVariant *args,
case
ID_audio_togglemute
:
if
(
argCount
==
0
)
{
libvlc_audio_toggle_mute
(
p_plugin
->
getVLC
(),
&
ex
);
RETURN_ON_EXCEPTION
(
this
,
ex
);
libvlc_audio_toggle_mute
(
p_plugin
->
getVLC
());
VOID_TO_NPVARIANT
(
result
);
return
INVOKERESULT_NO_ERROR
;
}
...
...
projects/mozilla/vlcplugin.cpp
View file @
1979486d
...
...
@@ -748,8 +748,7 @@ void VlcPlugin::redrawToolbar()
libvlc_exception_init
(
&
ex
);
/* get mute info */
b_mute
=
libvlc_audio_get_mute
(
getVLC
(),
&
ex
);
libvlc_exception_clear
(
&
ex
);
b_mute
=
libvlc_audio_get_mute
(
getVLC
()
);
gcv
.
foreground
=
BlackPixel
(
p_display
,
0
);
gc
=
XCreateGC
(
p_display
,
control
,
GCForeground
,
&
gcv
);
...
...
@@ -857,8 +856,7 @@ vlc_toolbar_clicked_t VlcPlugin::getToolbarButtonClicked( int i_xpos, int i_ypos
libvlc_exception_clear
(
&
ex
);
/* get mute info */
b_mute
=
libvlc_audio_get_mute
(
getVLC
(),
&
ex
);
libvlc_exception_clear
(
&
ex
);
b_mute
=
libvlc_audio_get_mute
(
getVLC
()
);
/* is Pause of Play button clicked */
if
(
(
is_playing
!=
1
)
&&
...
...
src/control/audio.c
View file @
1979486d
...
...
@@ -313,24 +313,19 @@ void libvlc_audio_output_set_device_type( libvlc_instance_t *p_instance,
/*****************************************************************************
* libvlc_audio_get_mute : Get the volume state, true if muted
*****************************************************************************/
void
libvlc_audio_toggle_mute
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_e
)
void
libvlc_audio_toggle_mute
(
libvlc_instance_t
*
p_instance
)
{
VLC_UNUSED
(
p_e
);
aout_ToggleMute
(
p_instance
->
p_libvlc_int
,
NULL
);
}
int
libvlc_audio_get_mute
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_e
)
int
libvlc_audio_get_mute
(
libvlc_instance_t
*
p_instance
)
{
return
(
libvlc_audio_get_volume
(
p_instance
,
p_e
)
==
0
);
return
(
libvlc_audio_get_volume
(
p_instance
)
==
0
);
}
void
libvlc_audio_set_mute
(
libvlc_instance_t
*
p_instance
,
int
mute
,
libvlc_exception_t
*
p_e
)
void
libvlc_audio_set_mute
(
libvlc_instance_t
*
p_instance
,
int
mute
)
{
if
(
mute
^
libvlc_audio_get_mute
(
p_instance
,
p_
e
)
)
if
(
!
mute
!=
!
libvlc_audio_get_mute
(
p_instanc
e
)
)
{
aout_ToggleMute
(
p_instance
->
p_libvlc_int
,
NULL
);
}
...
...
@@ -339,11 +334,8 @@ void libvlc_audio_set_mute( libvlc_instance_t *p_instance, int mute,
/*****************************************************************************
* libvlc_audio_get_volume : Get the current volume (range 0-200 %)
*****************************************************************************/
int
libvlc_audio_get_volume
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_e
)
int
libvlc_audio_get_volume
(
libvlc_instance_t
*
p_instance
)
{
VLC_UNUSED
(
p_e
);
audio_volume_t
i_volume
;
aout_VolumeGet
(
p_instance
->
p_libvlc_int
,
&
i_volume
);
...
...
src/control/mediacontrol_audio_video.c
View file @
1979486d
...
...
@@ -206,14 +206,11 @@ unsigned short
mediacontrol_sound_get_volume
(
mediacontrol_Instance
*
self
,
mediacontrol_Exception
*
exception
)
{
libvlc_exception_t
ex
;
int
i_ret
=
0
;
mediacontrol_exception_init
(
exception
);
libvlc_exception_init
(
&
ex
);
i_ret
=
libvlc_audio_get_volume
(
self
->
p_instance
,
&
ex
);
HANDLE_LIBVLC_EXCEPTION_ZERO
(
&
ex
);
i_ret
=
libvlc_audio_get_volume
(
self
->
p_instance
);
/* FIXME: Normalize in [0..100] */
return
(
unsigned
short
)
i_ret
;
}
...
...
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