|
Revision 4208, 1.0 KB
(checked in by andoma, 7 months ago)
|
|
Add displaying of some stats when playing video
|
| Line | |
|---|
| 1 | #include "theme://include/plates.view" |
|---|
| 2 | |
|---|
| 3 | // If playstatus is set to stop, close the page |
|---|
| 4 | $self.close = $self.media.playstatus == "stop"; |
|---|
| 5 | |
|---|
| 6 | widget(container_z, { |
|---|
| 7 | widget(video, { |
|---|
| 8 | .source = $self.url; |
|---|
| 9 | }); |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | /** |
|---|
| 13 | * |
|---|
| 14 | */ |
|---|
| 15 | widget(container_y, { |
|---|
| 16 | |
|---|
| 17 | widget(container_x, { |
|---|
| 18 | .align = left; |
|---|
| 19 | |
|---|
| 20 | widget(backdrop, { |
|---|
| 21 | PLATE_PROPS(); |
|---|
| 22 | |
|---|
| 23 | .alpha = iir(changed($self.media.seektime, 2, true), 7); |
|---|
| 24 | .color = [0.3, 0.7, 0.45]; |
|---|
| 25 | |
|---|
| 26 | widget(label, { |
|---|
| 27 | .caption = "Seeking to " + value2duration($self.media.seektime); |
|---|
| 28 | }); |
|---|
| 29 | }); |
|---|
| 30 | }); |
|---|
| 31 | |
|---|
| 32 | widget(label, { |
|---|
| 33 | .alpha = $self.media.stats; |
|---|
| 34 | .caption = "Video queue len: " + int2str($self.media.video.dqlen); |
|---|
| 35 | }); |
|---|
| 36 | |
|---|
| 37 | widget(label, { |
|---|
| 38 | .alpha = $self.media.stats; |
|---|
| 39 | .caption = "Audio queue len: " + int2str($self.media.audio.dqlen); |
|---|
| 40 | }); |
|---|
| 41 | |
|---|
| 42 | widget(label, { |
|---|
| 43 | .alpha = $self.media.stats; |
|---|
| 44 | .caption = "Video decode time: " + |
|---|
| 45 | int2str($self.media.video.decodetime_avg) + " ms"; |
|---|
| 46 | }); |
|---|
| 47 | }); |
|---|
| 48 | }); |
|---|