Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
faf9f7cd
Commit
faf9f7cd
authored
Dec 06, 2005
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new rpn function : volume_set
parent
65357d51
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
1 deletion
+39
-1
modules/control/http/rpn.c
modules/control/http/rpn.c
+39
-1
No files found.
modules/control/http/rpn.c
View file @
faf9f7cd
...
...
@@ -2,7 +2,7 @@
* rpn.c : RPN evaluator for the HTTP Interface
*****************************************************************************
* Copyright (C) 2001-2005 the VideoLAN team
* $Id
: http.c 12225 2005-08-18 10:01:30Z massiot
$
* $Id$
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Laurent Aimar <fenrir@via.ecp.fr>
...
...
@@ -907,6 +907,44 @@ void E_(EvaluateRPN)( intf_thread_t *p_intf, mvar_t *vars,
msg_Dbg
(
p_intf
,
"requested to move playlist item %d to %d"
,
i_pos
,
i_newpos
);
}
else
if
(
!
strcmp
(
s
,
"volume_set"
)
)
{
char
*
psz_vol
=
E_
(
SSPop
)(
st
);
int
i_value
;
audio_volume_t
i_volume
;
aout_VolumeGet
(
p_intf
,
&
i_volume
);
if
(
psz_vol
[
0
]
==
'+'
)
{
i_value
=
atoi
(
psz_vol
);
if
(
(
i_volume
+
i_value
)
>
AOUT_VOLUME_MAX
)
aout_VolumeSet
(
p_intf
,
AOUT_VOLUME_MAX
);
else
aout_VolumeSet
(
p_intf
,
i_volume
+
i_value
);
}
else
if
(
psz_vol
[
0
]
==
'-'
)
{
i_value
=
atoi
(
psz_vol
);
if
(
(
i_volume
+
i_value
)
<
AOUT_VOLUME_MIN
)
aout_VolumeSet
(
p_intf
,
AOUT_VOLUME_MIN
);
else
aout_VolumeSet
(
p_intf
,
i_volume
+
i_value
);
}
else
if
(
strstr
(
psz_vol
,
"%"
)
!=
NULL
)
{
i_value
=
atoi
(
psz_vol
);
if
(
i_value
<
0
)
i_value
=
0
;
if
(
i_value
>
400
)
i_value
=
400
;
aout_VolumeSet
(
p_intf
,
(
i_value
*
(
AOUT_VOLUME_MAX
-
AOUT_VOLUME_MIN
))
/
400
+
AOUT_VOLUME_MIN
);
}
else
{
i_value
=
atoi
(
psz_vol
);
if
(
i_value
>
AOUT_VOLUME_MAX
)
i_value
=
AOUT_VOLUME_MAX
;
if
(
i_value
<
AOUT_VOLUME_MIN
)
i_value
=
AOUT_VOLUME_MIN
;
aout_VolumeSet
(
p_intf
,
i_value
);
}
aout_VolumeGet
(
p_intf
,
&
i_volume
);
}
else
{
E_
(
SSPush
)(
st
,
s
);
...
...
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