Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
4784f3f0
Commit
4784f3f0
authored
Aug 04, 2011
by
Akash Mehrotra
Committed by
Jean-Baptiste Kempf
Aug 30, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LUA: Display list of active audio filters
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
89032298
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
1 deletion
+36
-1
share/lua/intf/modules/httprequests.lua
share/lua/intf/modules/httprequests.lua
+36
-1
No files found.
share/lua/intf/modules/httprequests.lua
View file @
4784f3f0
...
...
@@ -31,6 +31,31 @@ local function stripslashes(s)
return
string.gsub
(
s
,
"
\\
(.)"
,
"%1"
)
end
function
strsplit
(
text
,
delimiter
)
local
strfind
=
string.find
local
strsub
=
string.sub
local
tinsert
=
table.insert
local
list
=
{}
local
pos
=
1
if
strfind
(
""
,
delimiter
,
1
)
then
-- this would result in endless loops
error
(
"delimiter matches empty string!"
)
end
local
i
=
1
while
1
do
i
=
i
+
1
local
first
,
last
=
strfind
(
text
,
delimiter
,
pos
)
if
first
then
-- found?
tinsert
(
list
,
i
,
strsub
(
text
,
pos
,
first
-
1
))
pos
=
last
+
1
else
tinsert
(
list
,
i
,
strsub
(
text
,
pos
))
break
end
end
return
list
end
--main function to process commands sent with the request
processcommands
=
function
()
...
...
@@ -307,6 +332,7 @@ local input = vlc.object.input()
local
item
=
vlc
.
input
.
item
()
local
playlist
=
vlc
.
object
.
playlist
()
local
vout
=
vlc
.
object
.
vout
()
local
aout
=
vlc
.
object
.
aout
()
local
s
=
{}
...
...
@@ -336,7 +362,16 @@ local vout = vlc.object.vout()
else
s
.
fullscreen
=
0
end
if
aout
then
local
filters
=
vlc
.
var
.
get
(
aout
,
"audio-filter"
)
local
temp
=
strsplit
(
filters
,
":"
)
s
.
audiofilters
=
{}
local
id
=
0
for
i
,
j
in
pairs
(
temp
)
do
s
.
audiofilters
[
'filter_'
..
id
]
=
j
id
=
id
+
1
end
end
s
.
state
=
vlc
.
playlist
.
status
()
s
.
random
=
vlc
.
var
.
get
(
playlist
,
"random"
)
s
.
loop
=
vlc
.
var
.
get
(
playlist
,
"loop"
)
...
...
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