-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
1,676 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...x-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/ui/player/metrics/BitRates.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright (c) SRG SSR. All rights reserved. | ||
* License information is available from the LICENSE file. | ||
*/ | ||
package ch.srgssr.pillarbox.demo.shared.ui.player.metrics | ||
|
||
/** | ||
* Information about bit rates. | ||
* | ||
* @property data The list of recorded bit rates. | ||
*/ | ||
data class BitRates( | ||
val data: List<Float>, | ||
) { | ||
/** | ||
* The unit in which the bit rates are expressed. | ||
*/ | ||
val unit = "Mbps" | ||
|
||
/** | ||
* The current bit rate. | ||
*/ | ||
val current: Float | ||
get() = data.last() | ||
|
||
/** | ||
* The biggest recorded bit rate. | ||
*/ | ||
val max: Float | ||
get() = data.max() | ||
|
||
/** | ||
* The smallest recorded bit rate. | ||
*/ | ||
val min: Float | ||
get() = data.min() | ||
|
||
companion object { | ||
/** | ||
* Empty [BitRates]. | ||
*/ | ||
val Empty = BitRates( | ||
data = emptyList(), | ||
) | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...emo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/ui/player/metrics/DataVolumes.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright (c) SRG SSR. All rights reserved. | ||
* License information is available from the LICENSE file. | ||
*/ | ||
package ch.srgssr.pillarbox.demo.shared.ui.player.metrics | ||
|
||
/** | ||
* Information about data volumes. | ||
* | ||
* @property data The list of recorded data volumes. | ||
* @property total The formatted total volume. | ||
*/ | ||
data class DataVolumes( | ||
val data: List<Float>, | ||
val total: String, | ||
) { | ||
/** | ||
* The unit in which the volumes are expressed. | ||
*/ | ||
val unit = "MByte" | ||
|
||
companion object { | ||
/** | ||
* Empty [DataVolumes]. | ||
*/ | ||
val Empty = DataVolumes( | ||
data = emptyList(), | ||
total = "", | ||
) | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...box-demo-shared/src/main/java/ch/srgssr/pillarbox/demo/shared/ui/player/metrics/Stalls.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright (c) SRG SSR. All rights reserved. | ||
* License information is available from the LICENSE file. | ||
*/ | ||
package ch.srgssr.pillarbox.demo.shared.ui.player.metrics | ||
|
||
/** | ||
* Information about stalls. | ||
* | ||
* @property data The list of recorded stalls. | ||
* @property total The formatted total of stalls. | ||
*/ | ||
data class Stalls( | ||
val data: List<Float>, | ||
val total: String, | ||
) { | ||
companion object { | ||
/** | ||
* Empty [Stalls]. | ||
*/ | ||
val Empty = Stalls( | ||
data = emptyList(), | ||
total = "", | ||
) | ||
} | ||
} |
Oops, something went wrong.