コード例 #1
0
  @Override
  public String toString() {
    StringBuilder colorStr = new StringBuilder("\ncolors:\n");
    for (int i = 0; i < colors.size(); i++) {
      colorStr.append(colors.get(i));
      if (i != colors.size() - 1) colorStr.append(", \n");
    }

    StringBuilder plStr = new StringBuilder("\nprofiles:\n");
    ProfileLevel[] profiles = getProfileLevels();
    for (int i = 0; i < profiles.length; i++) {
      plStr.append(profiles[i].toString());
      if (i != profiles.length - 1) plStr.append(", \n");
    }

    return codecInfo.getName() + "(" + getLibjitsiEncoding() + ")" + colorStr + plStr;
  }
コード例 #2
0
  /**
   * Creates new instance of <tt>CodecInfo</tt> that will encapsulate given <tt>codecInfo</tt>.
   *
   * @param codecInfo the codec info object to encapsulate.
   * @param mediaType media type of the codec
   */
  public CodecInfo(MediaCodecInfo codecInfo, String mediaType) {
    this.codecInfo = codecInfo;
    this.mediaType = mediaType;
    this.caps = codecInfo.getCapabilitiesForType(mediaType);

    this.colors = new ArrayList<CodecColorFormat>();
    int[] colorFormats = caps.colorFormats;
    for (int colorFormat : colorFormats) {
      colors.add(CodecColorFormat.fromInt(colorFormat));
    }
  }