Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
528
Issue boards
Milestones
Wiki
Code
Merge requests
14
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
e31382ce
Commit
e31382ce
authored
4 years ago
by
Nicolas Pomepuy
Browse files
Options
Downloads
Patches
Plain Diff
Prevent video tracks being redrawn too frequently
parent
9190ecd9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!623
Improve video stats
Pipeline
#18249
passed with stage
in 2 minutes and 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
application/vlc-android/src/org/videolan/vlc/gui/video/VideoStatsDelegate.kt
+7
-3
7 additions, 3 deletions
...roid/src/org/videolan/vlc/gui/video/VideoStatsDelegate.kt
with
7 additions
and
3 deletions
application/vlc-android/src/org/videolan/vlc/gui/video/VideoStatsDelegate.kt
+
7
−
3
View file @
e31382ce
...
...
@@ -25,6 +25,7 @@
package
org.videolan.vlc.gui.video
import
android.annotation.SuppressLint
import
android.net.Uri
import
android.os.Handler
import
android.util.Log
import
android.view.MotionEvent
...
...
@@ -92,6 +93,8 @@ class VideoStatsDelegate(private val player: VideoPlayerActivity, val scrolling:
setupLayout
()
}
var
lastMediaUri
:
Uri
?=
null
@SuppressLint
(
"SetTextI18n"
)
private
val
runnable
=
Runnable
{
val
media
=
player
.
service
?.
mediaplayer
?.
media
as
?
Media
?:
return
@Runnable
...
...
@@ -105,13 +108,14 @@ class VideoStatsDelegate(private val player: VideoPlayerActivity, val scrolling:
binding
.
plotView
.
addData
(
StatIndex
.
INPUT_BITRATE
.
ordinal
,
Pair
(
now
,
it
*
8
*
1024
))
}
media
.
let
{
if
(
lastMediaUri
!=
media
.
uri
)
{
lastMediaUri
=
media
.
uri
binding
.
infoGrids
.
removeAllViews
()
for
(
i
in
0
until
it
.
trackCount
)
{
for
(
i
in
0
until
media
.
trackCount
)
{
val
grid
=
GridLayout
(
player
)
grid
.
columnCount
=
2
val
track
=
it
.
getTrack
(
i
)
val
track
=
media
.
getTrack
(
i
)
if
(
track
.
bitrate
>
0
)
addStreamGridView
(
grid
,
player
.
getString
(
R
.
string
.
bitrate
),
player
.
getString
(
R
.
string
.
bitrate_value
,
track
.
bitrate
.
toLong
().
readableSize
()))
addStreamGridView
(
grid
,
player
.
getString
(
R
.
string
.
codec
),
track
.
codec
)
if
(
track
.
language
!=
null
&&
!
track
.
language
.
equals
(
"und"
,
ignoreCase
=
true
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment