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
323a0b21
Commit
323a0b21
authored
Nov 13, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
luarc: implement stats command.
parent
f108a5ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletion
+29
-1
share/lua/intf/rc.lua
share/lua/intf/rc.lua
+29
-1
No files found.
share/lua/intf/rc.lua
View file @
323a0b21
...
...
@@ -320,6 +320,34 @@ function input_info(name,client)
client
:
append
(
"+----[ end of stream info ]"
)
end
function
stats
(
name
,
client
)
local
stats_tab
=
vlc
.
input
.
stats
()
client
:
append
(
"bla"
..
stats_tab
[
"demux_bitrate"
])
client
:
append
(
"+----[ begin of statistical info"
)
client
:
append
(
"+-[Incoming]"
)
client
:
append
(
"| input bytes read : "
..
string.format
(
"%8.0f kB"
,
stats_tab
[
"read_bytes"
]
/
1000
))
client
:
append
(
"| input bitrate : "
..
string.format
(
"%6.0f bB/s"
,
stats_tab
[
"input_bitrate"
]
*
8000
))
client
:
append
(
"| demux bytes read : "
..
string.format
(
"%8.0f kB"
,
stats_tab
[
"demux_read_bytes"
]
/
1000
))
client
:
append
(
"| demux bitrate : "
..
string.format
(
"%6.0f kB/s"
,
stats_tab
[
"demux_bitrate"
]
*
8000
))
client
:
append
(
"|"
)
client
:
append
(
"+-[Video Decoding]"
)
client
:
append
(
"| video decoded : "
..
string.format
(
"%5i"
,
stats_tab
[
"decoded_video"
]))
client
:
append
(
"| frames displayed : "
..
string.format
(
"%5i"
,
stats_tab
[
"displayed_pictures"
]))
client
:
append
(
"| frames lost : "
..
string.format
(
"%5i"
,
stats_tab
[
"lost_pictures"
]))
client
:
append
(
"|"
)
client
:
append
(
"+-[Audio Decoding]"
)
client
:
append
(
"| audio decoded : "
..
string.format
(
"%5i"
,
stats_tab
[
"decoded_audio"
]))
client
:
append
(
"| buffers played : "
..
string.format
(
"%5i"
,
stats_tab
[
"played_abuffers"
]))
client
:
append
(
"| buffers lost : "
..
string.format
(
"%5i"
,
stats_tab
[
"lost_abuffers"
]))
client
:
append
(
"|"
)
client
:
append
(
"+-[Streaming]"
)
client
:
append
(
"| packets sent : "
..
string.format
(
"%5i"
,
stats_tab
[
"sent_packets"
]))
client
:
append
(
"| bytes sent : "
..
string.format
(
"%8.0f kB"
,
stats_tab
[
"sent_bytes"
]
/
1000
))
client
:
append
(
"| sending bitrate : "
..
string.format
(
"%6.0f kb/s"
,
stats_tab
[
"send_bitrate"
]
*
8000
))
client
:
append
(
"+----[ end of statistical info ]"
)
end
function
playlist_status
(
name
,
client
)
local
a
,
b
,
c
=
vlc
.
playlist
.
status
()
client
:
append
(
"( new input: "
..
tostring
(
a
)
..
" )"
)
...
...
@@ -450,7 +478,7 @@ commands_ordered = {
{
"frame"
;
{
func
=
frame
;
help
=
"play frame by frame"
}
};
{
"fullscreen"
;
{
func
=
skip2
(
vlc
.
video
.
fullscreen
);
args
=
"[on|off]"
;
help
=
"toggle fullscreen"
;
aliases
=
{
"f"
,
"F"
}
}
};
{
"info"
;
{
func
=
input_info
;
help
=
"information about the current stream"
}
};
{
"stat
es"
;
{
func
=
fixme
;
help
=
"show statistical information"
}
};
{
"stat
s"
;
{
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
.
input
.
get_title
);
help
=
"the title of the current stream"
}
};
...
...
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