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
38518ced
Commit
38518ced
authored
Nov 09, 2003
by
Simon Latapie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* http.c: removed a completely useless check (now you can change volume
value without playing anything)
parent
fe2d6895
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
35 deletions
+31
-35
modules/control/http.c
modules/control/http.c
+31
-35
No files found.
modules/control/http.c
View file @
38518ced
...
...
@@ -2,7 +2,7 @@
* http.c : http mini-server ;)
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: http.c,v 1.3
0 2003/11/09 03:41:50
garf Exp $
* $Id: http.c,v 1.3
1 2003/11/09 05:22:56
garf Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Laurent Aimar <fenrir@via.ecp.fr>
...
...
@@ -1696,51 +1696,47 @@ static void MacroDo( httpd_file_callback_args_t *p_args,
audio_volume_t
i_volume
;
int
i_value
;
if
(
p_sys
->
p_input
)
{
uri_extract_value
(
p_request
,
"value"
,
vol
,
8
);
aout_VolumeGet
(
p_intf
,
&
i_volume
);
uri_decode_url_encoded
(
vol
);
uri_extract_value
(
p_request
,
"value"
,
vol
,
8
);
aout_VolumeGet
(
p_intf
,
&
i_volume
);
uri_decode_url_encoded
(
vol
);
if
(
vol
[
0
]
==
'+'
)
if
(
vol
[
0
]
==
'+'
)
{
i_value
=
atoi
(
vol
+
1
);
if
(
(
i_volume
+
i_value
)
>
AOUT_VOLUME_MAX
)
{
i_value
=
atoi
(
vol
+
1
);
if
(
(
i_volume
+
i_value
)
>
AOUT_VOLUME_MAX
)
{
aout_VolumeSet
(
p_intf
,
AOUT_VOLUME_MAX
);
msg_Dbg
(
p_intf
,
"requested volume set: max"
);
}
else
{
aout_VolumeSet
(
p_intf
,
(
i_volume
+
i_value
)
);
msg_Dbg
(
p_intf
,
"requested volume set: +%i"
,
(
i_volume
+
i_value
)
);
}
aout_VolumeSet
(
p_intf
,
AOUT_VOLUME_MAX
);
msg_Dbg
(
p_intf
,
"requested volume set: max"
);
}
else
if
(
vol
[
0
]
==
'-'
)
{
i_value
=
atoi
(
vol
+
1
);
if
(
(
i_volume
-
i_value
)
<
AOUT_VOLUME_MIN
)
{
aout_VolumeSet
(
p_intf
,
AOUT_VOLUME_MIN
);
msg_Dbg
(
p_intf
,
"requested volume set: min"
);
}
else
{
aout_VolumeSet
(
p_intf
,
(
i_volume
-
i_value
)
);
msg_Dbg
(
p_intf
,
"requested volume set: -%i"
,
(
i_volume
-
i_value
)
);
}
aout_VolumeSet
(
p_intf
,
(
i_volume
+
i_value
)
);
msg_Dbg
(
p_intf
,
"requested volume set: +%i"
,
(
i_volume
+
i_value
)
);
}
}
else
if
(
vol
[
0
]
==
'-'
)
{
i_value
=
atoi
(
vol
+
1
);
if
(
(
i_volume
-
i_value
)
<
AOUT_VOLUME_MIN
)
{
aout_VolumeSet
(
p_intf
,
AOUT_VOLUME_MIN
);
msg_Dbg
(
p_intf
,
"requested volume set: min"
);
}
else
{
i_value
=
atoi
(
vol
);
if
(
(
i_value
<=
AOUT_VOLUME_MAX
)
&&
(
i_value
>=
AOUT_VOLUME_MIN
)
)
{
aout_VolumeSet
(
p_intf
,
atoi
(
vol
)
);
msg_Dbg
(
p_intf
,
"requested volume set: %i"
,
atoi
(
vol
)
);
}
aout_VolumeSet
(
p_intf
,
(
i_volume
-
i_value
)
);
msg_Dbg
(
p_intf
,
"requested volume set: -%i"
,
(
i_volume
-
i_value
)
);
}
}
else
{
i_value
=
atoi
(
vol
);
if
(
(
i_value
<=
AOUT_VOLUME_MAX
)
&&
(
i_value
>=
AOUT_VOLUME_MIN
)
)
{
aout_VolumeSet
(
p_intf
,
atoi
(
vol
)
);
msg_Dbg
(
p_intf
,
"requested volume set: %i"
,
atoi
(
vol
)
);
}
}
break
;
}
/* playlist management */
case
MVLC_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