1/* 2 * Copyright (c) 2013 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 11package org.webrtc.webrtcdemo; 12 13public class VideoCodecInst { 14 private final long nativeCodecInst; 15 16 // VideoCodecInst can only be created from the native layer. 17 private VideoCodecInst(long nativeCodecInst) { 18 this.nativeCodecInst = nativeCodecInst; 19 } 20 21 public String toString() { 22 return name() + " " + 23 "PlType: " + plType() + " " + 24 "Width: " + width() + " " + 25 "Height: " + height() + " " + 26 "StartBitRate: " + startBitRate() + " " + 27 "MaxFrameRate: " + maxFrameRate(); 28 } 29 30 // Dispose must be called before all references to VideoCodecInst are lost as 31 // it will free memory allocated in the native layer. 32 public native void dispose(); 33 public native int plType(); 34 public native String name(); 35 public native int width(); 36 public native void setWidth(int width); 37 public native int height(); 38 public native void setHeight(int height); 39 public native int startBitRate(); 40 public native void setStartBitRate(int bitrate); 41 public native int maxBitRate(); 42 public native void setMaxBitRate(int bitrate); 43 public native int maxFrameRate(); 44 public native void setMaxFrameRate(int framerate); 45}