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 CodecInst {
14  private final long nativeCodecInst;
15
16  // CodecInst can only be created from the native layer.
17  private CodecInst(long nativeCodecInst) {
18    this.nativeCodecInst = nativeCodecInst;
19  }
20
21  public String toString() {
22    return name() + " " +
23        "PlType: " + plType() + " " +
24        "PlFreq: " + plFrequency() + " " +
25        "Size: " + pacSize() + " " +
26        "Channels: " + channels() + " " +
27        "Rate: " + rate();
28  }
29
30  // Dispose must be called before all references to CodecInst are lost as it
31  // 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 plFrequency();
36  public native int pacSize();
37  public native int channels();
38  public native int rate();
39}