mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-10-05 15:23:29 +01:00
Improve byteCountEstimate calculation for videos.
This commit is contained in:
1 parent
03614b32e4
commit
de54ff304d
1 file changed
+1
-1
@@ -31,7 +31,7 @@ class TranscodingQuality private constructor(@VideoCodec val codec: String, val
|
||||
}
|
||||
|
||||
val targetTotalBitRate = targetVideoBitRate + targetAudioBitRate
|
||||
val byteCountEstimate = (targetTotalBitRate / 8) * (durationMs / 1000)
|
||||
val byteCountEstimate = ((targetTotalBitRate / 8f) * (durationMs / 1000f)).toInt()
|
||||
|
||||
override fun toString(): String {
|
||||
return "Quality{codec=$codec, targetVideoBitRate=$targetVideoBitRate, targetAudioBitRate=$targetAudioBitRate, duration=$durationMs, filesize=$byteCountEstimate}"
|
||||
|
||||
Reference in new issue
Block a user