diff options
author | Chocobozzz <me@florianbigard.com> | 2018-10-17 13:10:58 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-10-17 13:10:58 +0200 |
commit | 0229b014e0101844df028342b8d4dd9ae4e887a4 (patch) | |
tree | 5c42c40499e4298ee241203c8e055dbbd9438739 /shared/models/videos | |
parent | f365e978ed08e8fc7adf0607271c4071915629ee (diff) | |
download | PeerTube-0229b014e0101844df028342b8d4dd9ae4e887a4.tar.gz PeerTube-0229b014e0101844df028342b8d4dd9ae4e887a4.tar.zst PeerTube-0229b014e0101844df028342b8d4dd9ae4e887a4.zip |
Fix tests
Diffstat (limited to 'shared/models/videos')
-rw-r--r-- | shared/models/videos/video-resolution.enum.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/shared/models/videos/video-resolution.enum.ts b/shared/models/videos/video-resolution.enum.ts index 2eee03843..7da5e7100 100644 --- a/shared/models/videos/video-resolution.enum.ts +++ b/shared/models/videos/video-resolution.enum.ts | |||
@@ -50,8 +50,7 @@ function getBaseBitrate (resolution: VideoResolution) { | |||
50 | * getBaseBitrate() * 1.4. All other values are calculated linearly | 50 | * getBaseBitrate() * 1.4. All other values are calculated linearly |
51 | * between these two points. | 51 | * between these two points. |
52 | */ | 52 | */ |
53 | export function getTargetBitrate (resolution: VideoResolution, fps: number, | 53 | export function getTargetBitrate (resolution: VideoResolution, fps: number, fpsTranscodingConstants: VideoTranscodingFPS) { |
54 | fpsTranscodingConstants: VideoTranscodingFPS) { | ||
55 | const baseBitrate = getBaseBitrate(resolution) | 54 | const baseBitrate = getBaseBitrate(resolution) |
56 | // The maximum bitrate, used when fps === VideoTranscodingFPS.MAX | 55 | // The maximum bitrate, used when fps === VideoTranscodingFPS.MAX |
57 | // Based on numbers from Youtube, 60 fps bitrate divided by 30 fps bitrate: | 56 | // Based on numbers from Youtube, 60 fps bitrate divided by 30 fps bitrate: |
@@ -71,7 +70,6 @@ export function getTargetBitrate (resolution: VideoResolution, fps: number, | |||
71 | /** | 70 | /** |
72 | * The maximum bitrate we expect to see on a transcoded video in bytes per second. | 71 | * The maximum bitrate we expect to see on a transcoded video in bytes per second. |
73 | */ | 72 | */ |
74 | export function getMaxBitrate (resolution: VideoResolution, fps: number, | 73 | export function getMaxBitrate (resolution: VideoResolution, fps: number, fpsTranscodingConstants: VideoTranscodingFPS) { |
75 | fpsTranscodingConstants: VideoTranscodingFPS) { | ||
76 | return getTargetBitrate(resolution, fps, fpsTranscodingConstants) * 2 | 74 | return getTargetBitrate(resolution, fps, fpsTranscodingConstants) * 2 |
77 | } | 75 | } |