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
00f8067d
Commit
00f8067d
authored
Jul 09, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HTTP: set volume on playlist
parent
4ba623ec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
modules/control/http/http.c
modules/control/http/http.c
+1
-1
modules/control/http/macro.c
modules/control/http/macro.c
+7
-7
modules/control/http/rpn.c
modules/control/http/rpn.c
+8
-8
No files found.
modules/control/http/http.c
View file @
00f8067d
...
...
@@ -418,7 +418,7 @@ static void ParseExecute( httpd_file_sys_t *p_args, char *p_buffer,
state
=
"stop"
;
}
aout_VolumeGet
(
p_
args
->
p_intf
,
&
i_volume
);
aout_VolumeGet
(
p_
sys
->
p_playlist
,
&
i_volume
);
sprintf
(
volume
,
"%d"
,
(
int
)
i_volume
);
p_args
->
vars
=
mvar_New
(
"variables"
,
""
);
...
...
modules/control/http/macro.c
View file @
00f8067d
...
...
@@ -256,7 +256,7 @@ static void MacroDo( httpd_file_sys_t *p_args,
int
i_value
;
ExtractURIValue
(
p_request
,
"value"
,
vol
,
8
);
aout_VolumeGet
(
p_
intf
,
&
i_volume
);
aout_VolumeGet
(
p_
sys
->
p_playlist
,
&
i_volume
);
decode_URI
(
vol
);
if
(
vol
[
0
]
==
'+'
)
...
...
@@ -264,12 +264,12 @@ static void MacroDo( httpd_file_sys_t *p_args,
i_value
=
atoi
(
vol
+
1
);
if
(
(
i_volume
+
i_value
)
>
AOUT_VOLUME_MAX
)
{
aout_VolumeSet
(
p_
intf
,
AOUT_VOLUME_MAX
);
aout_VolumeSet
(
p_
sys
->
p_playlist
,
AOUT_VOLUME_MAX
);
msg_Dbg
(
p_intf
,
"requested volume set: max"
);
}
else
{
aout_VolumeSet
(
p_
intf
,
(
i_volume
+
i_value
)
);
aout_VolumeSet
(
p_
sys
->
p_playlist
,
(
i_volume
+
i_value
)
);
msg_Dbg
(
p_intf
,
"requested volume set: +%i"
,
(
i_volume
+
i_value
)
);
}
}
...
...
@@ -278,12 +278,12 @@ static void MacroDo( httpd_file_sys_t *p_args,
i_value
=
atoi
(
vol
+
1
);
if
(
(
i_volume
-
i_value
)
<
AOUT_VOLUME_MIN
)
{
aout_VolumeSet
(
p_
intf
,
AOUT_VOLUME_MIN
);
aout_VolumeSet
(
p_
sys
->
p_playlist
,
AOUT_VOLUME_MIN
);
msg_Dbg
(
p_intf
,
"requested volume set: min"
);
}
else
{
aout_VolumeSet
(
p_
intf
,
(
i_volume
-
i_value
)
);
aout_VolumeSet
(
p_
sys
->
p_playlist
,
(
i_volume
-
i_value
)
);
msg_Dbg
(
p_intf
,
"requested volume set: -%i"
,
(
i_volume
-
i_value
)
);
}
}
...
...
@@ -291,7 +291,7 @@ static void MacroDo( httpd_file_sys_t *p_args,
{
i_value
=
atoi
(
vol
);
if
(
(
i_value
<=
400
)
&&
(
i_value
>=
0
)
){
aout_VolumeSet
(
p_
intf
,
(
i_value
*
(
AOUT_VOLUME_MAX
-
AOUT_VOLUME_MIN
))
/
400
+
AOUT_VOLUME_MIN
);
aout_VolumeSet
(
p_
sys
->
p_playlist
,
(
i_value
*
(
AOUT_VOLUME_MAX
-
AOUT_VOLUME_MIN
))
/
400
+
AOUT_VOLUME_MIN
);
msg_Dbg
(
p_intf
,
"requested volume set: %i%%"
,
atoi
(
vol
));
}
}
...
...
@@ -300,7 +300,7 @@ static void MacroDo( httpd_file_sys_t *p_args,
i_value
=
atoi
(
vol
);
if
(
(
i_value
<=
AOUT_VOLUME_MAX
)
&&
(
i_value
>=
AOUT_VOLUME_MIN
)
)
{
aout_VolumeSet
(
p_
intf
,
atoi
(
vol
)
);
aout_VolumeSet
(
p_
sys
->
p_playlist
,
atoi
(
vol
)
);
msg_Dbg
(
p_intf
,
"requested volume set: %i"
,
atoi
(
vol
)
);
}
}
...
...
modules/control/http/rpn.c
View file @
00f8067d
...
...
@@ -944,38 +944,38 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars,
char
*
psz_vol
=
SSPop
(
st
);
int
i_value
;
audio_volume_t
i_volume
;
aout_VolumeGet
(
p_
intf
,
&
i_volume
);
aout_VolumeGet
(
p_
sys
->
p_playlist
,
&
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
);
aout_VolumeSet
(
p_
sys
->
p_playlist
,
AOUT_VOLUME_MAX
);
else
aout_VolumeSet
(
p_
intf
,
i_volume
+
i_value
);
aout_VolumeSet
(
p_
sys
->
p_playlist
,
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
);
aout_VolumeSet
(
p_
sys
->
p_playlist
,
AOUT_VOLUME_MIN
);
else
aout_VolumeSet
(
p_
intf
,
i_volume
+
i_value
);
aout_VolumeSet
(
p_
sys
->
p_playlist
,
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
);
aout_VolumeSet
(
p_
sys
->
p_playlist
,
(
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_VolumeSet
(
p_
sys
->
p_playlist
,
i_value
);
}
aout_VolumeGet
(
p_
intf
,
&
i_volume
);
aout_VolumeGet
(
p_
sys
->
p_playlist
,
&
i_volume
);
free
(
psz_vol
);
}
else
if
(
!
strcmp
(
s
,
"vlc_get_meta"
)
)
...
...
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