Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
62001b25
Commit
62001b25
authored
Feb 13, 2010
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use vlc.input.item() where appropriate
parent
90583f82
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
12 deletions
+18
-12
share/lua/extensions/imdb.lua
share/lua/extensions/imdb.lua
+4
-2
share/lua/http/requests/status.xml
share/lua/http/requests/status.xml
+7
-6
share/lua/intf/http.lua
share/lua/intf/http.lua
+2
-1
share/lua/intf/rc.lua
share/lua/intf/rc.lua
+5
-3
No files found.
share/lua/extensions/imdb.lua
View file @
62001b25
...
...
@@ -37,7 +37,8 @@ end
-- Update title text field. Removes file extensions.
function
update_title
()
local
title
=
vlc
.
input
.
get_title
()
local
item
=
vlc
.
item
()
local
title
=
item
and
item
:
name
()
if
title
~=
nil
then
title
=
string.gsub
(
title
,
"(.*)(%.%w+)$"
,
"%1"
)
end
...
...
@@ -50,7 +51,8 @@ function create_dialog()
dlg
=
vlc
.
dialog
(
"IMDb Search"
)
dlg
:
add_label
(
"The Internet Movie Database"
,
1
,
1
,
4
,
1
)
dlg
:
add_label
(
"<b>Movie Title</b>"
,
1
,
2
,
1
,
1
)
txt
=
dlg
:
add_text_input
(
vlc
.
input
.
get_title
(),
2
,
2
,
1
,
1
)
local
item
=
vlc
.
item
()
txt
=
dlg
:
add_text_input
(
item
and
item
:
name
()
or
""
,
2
,
2
,
1
,
1
)
dlg
:
add_button
(
"Okay"
,
"click_okay"
,
3
,
2
,
1
,
1
)
dlg
:
add_button
(
"*"
,
"update_title"
,
4
,
2
,
1
,
1
)
dlg
:
show
()
-- Show, if not already visible
...
...
share/lua/http/requests/status.xml
View file @
62001b25
...
...
@@ -102,6 +102,7 @@ local id = nil
local val = nil
local input = vlc.object.input()
local item = vlc.input.item()
local playlist = vlc.object.playlist()
local vout = input and vlc.object.find(input,'vout','child')
?>
...
...
@@ -118,8 +119,8 @@ local vout = input and vlc.object.find(input,'vout','child')
<information>
<category
name=
"meta"
>
<
?vlc
if i
nput
then
local metas =
vlc.input.
metas()
if i
tem
then
local metas =
item:
metas()
for k,v in pairs(metas) do
print("
<info
name=
'"..k.."'
>
"..vlc.strings.convert_xml_special_chars(v).."
</info>
")
end
...
...
@@ -127,8 +128,8 @@ local vout = input and vlc.object.find(input,'vout','child')
?>
</category>
<
?vlc
if i
nput
then
local info =
vlc.input.
info()
if i
tem
then
local info =
item:
info()
for k, v in pairs(info) do
print("
<category
name=
'"..k.."'
>
")
for k2, v2 in pairs(v) do
...
...
@@ -141,8 +142,8 @@ local vout = input and vlc.object.find(input,'vout','child')
</information>
<stats>
<
?vlc
if i
nput
then
local stats =
vlc.input.
stats()
if i
tem
then
local stats =
item:
stats()
for k,v in pairs(stats) do
local tag = string.gsub(k,"_","")
print("
<
"..tag..">"..tostring(v).."
<
/"..tag..">\n")
...
...
share/lua/intf/http.lua
View file @
62001b25
...
...
@@ -140,7 +140,8 @@ end
-- FIXME: Experimental art support. Needs some cleaning up.
function
callback_art
(
data
,
request
)
local
art
=
function
(
data
,
request
)
local
metas
=
vlc
.
input
.
metas
()
local
item
=
vlc
.
item
()
local
metas
=
item
:
metas
()
local
filename
=
vlc
.
strings
.
decode_uri
(
string.gsub
(
metas
[
"artwork_url"
],
"file://"
,
""
))
local
size
=
vlc
.
net
.
stat
(
filename
).
size
local
ext
=
string.match
(
filename
,
"%.([^%.]-)$"
)
...
...
share/lua/intf/rc.lua
View file @
62001b25
...
...
@@ -313,7 +313,8 @@ function help(name,client,arg)
end
function
input_info
(
name
,
client
)
local
categories
=
vlc
.
input
.
info
()
local
item
=
vlc
.
item
()
local
categories
=
item
:
info
()
for
cat
,
infos
in
pairs
(
categories
)
do
client
:
append
(
"+----[ "
..
cat
..
" ]"
)
client
:
append
(
"|"
)
...
...
@@ -326,7 +327,8 @@ function input_info(name,client)
end
function
stats
(
name
,
client
)
local
stats_tab
=
vlc
.
input
.
stats
()
local
item
=
vlc
.
item
()
local
stats_tab
=
item
:
stats
()
client
:
append
(
"+----[ begin of statistical info"
)
client
:
append
(
"+-[Incoming]"
)
...
...
@@ -506,7 +508,7 @@ commands_ordered = {
{
"stats"
;
{
func
=
stats
;
help
=
"show statistical information"
}
};
{
"get_time"
;
{
func
=
get_time
(
"time"
);
help
=
"seconds elapsed since stream's beginning"
}
};
{
"is_playing"
;
{
func
=
is_playing
;
help
=
"1 if a stream plays, 0 otherwise"
}
};
{
"get_title"
;
{
func
=
ret_print
(
vlc
.
i
nput
.
get_title
);
help
=
"the title of the current stream"
}
};
{
"get_title"
;
{
func
=
ret_print
(
vlc
.
i
tem
():
name
()
);
help
=
"the title of the current stream"
}
};
{
"get_length"
;
{
func
=
get_time
(
"length"
);
help
=
"the length of the current stream"
}
};
{
""
};
{
"volume"
;
{
func
=
volume
;
args
=
"[X]"
;
help
=
"set/get audio volume"
}
};
...
...
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