1 /* 2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 package org.webrtc; 12 13 /** BitrateAdjuster that tracks bitrate and framerate but does not adjust them. */ 14 class BaseBitrateAdjuster implements BitrateAdjuster { 15 protected int targetBitrateBps; 16 protected double targetFramerateFps; 17 18 @Override setTargets(int targetBitrateBps, double targetFramerateFps)19 public void setTargets(int targetBitrateBps, double targetFramerateFps) { 20 this.targetBitrateBps = targetBitrateBps; 21 this.targetFramerateFps = targetFramerateFps; 22 } 23 24 @Override reportEncodedFrame(int size)25 public void reportEncodedFrame(int size) { 26 // No op. 27 } 28 29 @Override getAdjustedBitrateBps()30 public int getAdjustedBitrateBps() { 31 return targetBitrateBps; 32 } 33 34 @Override getAdjustedFramerateFps()35 public double getAdjustedFramerateFps() { 36 return targetFramerateFps; 37 } 38 } 39