Java Code Examples for android.media.MediaCodecInfo.CodecProfileLevel#AVCLevel32

The following examples show how to use android.media.MediaCodecInfo.CodecProfileLevel#AVCLevel32 . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MediaCodecUtil.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Conversion values taken from ISO 14496-10 Table A-1.
 *
 * @param avcLevel one of CodecProfileLevel.AVCLevel* constants.
 * @return maximum frame size that can be decoded by a decoder with the specified avc level
 *     (or {@code -1} if the level is not recognized)
 */
private static int avcLevelToMaxFrameSize(int avcLevel) {
  switch (avcLevel) {
    case CodecProfileLevel.AVCLevel1: return 99 * 16 * 16;
    case CodecProfileLevel.AVCLevel1b: return 99 * 16 * 16;
    case CodecProfileLevel.AVCLevel12: return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel13: return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel2: return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel21: return 792 * 16 * 16;
    case CodecProfileLevel.AVCLevel22: return 1620 * 16 * 16;
    case CodecProfileLevel.AVCLevel3: return 1620 * 16 * 16;
    case CodecProfileLevel.AVCLevel31: return 3600 * 16 * 16;
    case CodecProfileLevel.AVCLevel32: return 5120 * 16 * 16;
    case CodecProfileLevel.AVCLevel4: return 8192 * 16 * 16;
    case CodecProfileLevel.AVCLevel41: return 8192 * 16 * 16;
    case CodecProfileLevel.AVCLevel42: return 8704 * 16 * 16;
    case CodecProfileLevel.AVCLevel5: return 22080 * 16 * 16;
    case CodecProfileLevel.AVCLevel51: return 36864 * 16 * 16;
    case CodecProfileLevel.AVCLevel52: return 36864 * 16 * 16;
    default: return -1;
  }
}
 
Example 2
Source File: MediaCodecUtil.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Conversion values taken from ISO 14496-10 Table A-1.
 *
 * @param avcLevel one of CodecProfileLevel.AVCLevel* constants.
 * @return maximum frame size that can be decoded by a decoder with the specified avc level
 *     (or {@code -1} if the level is not recognized)
 */
private static int avcLevelToMaxFrameSize(int avcLevel) {
  switch (avcLevel) {
    case CodecProfileLevel.AVCLevel1: return 99 * 16 * 16;
    case CodecProfileLevel.AVCLevel1b: return 99 * 16 * 16;
    case CodecProfileLevel.AVCLevel12: return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel13: return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel2: return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel21: return 792 * 16 * 16;
    case CodecProfileLevel.AVCLevel22: return 1620 * 16 * 16;
    case CodecProfileLevel.AVCLevel3: return 1620 * 16 * 16;
    case CodecProfileLevel.AVCLevel31: return 3600 * 16 * 16;
    case CodecProfileLevel.AVCLevel32: return 5120 * 16 * 16;
    case CodecProfileLevel.AVCLevel4: return 8192 * 16 * 16;
    case CodecProfileLevel.AVCLevel41: return 8192 * 16 * 16;
    case CodecProfileLevel.AVCLevel42: return 8704 * 16 * 16;
    case CodecProfileLevel.AVCLevel5: return 22080 * 16 * 16;
    case CodecProfileLevel.AVCLevel51: return 36864 * 16 * 16;
    case CodecProfileLevel.AVCLevel52: return 36864 * 16 * 16;
    default: return -1;
  }
}
 
Example 3
Source File: MediaCodecUtil.java    From Exoplayer_VLC with Apache License 2.0 6 votes vote down vote up
/**
 * Conversion values taken from: https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC.
 *
 * @param avcLevel one of CodecProfileLevel.AVCLevel* constants.
 * @return maximum frame size that can be decoded by a decoder with the specified avc level
 *      (or {@code -1} if the level is not recognized)
 */
private static int avcLevelToMaxFrameSize(int avcLevel) {
  switch (avcLevel) {
    case CodecProfileLevel.AVCLevel1: return 25344;
    case CodecProfileLevel.AVCLevel1b: return 25344;
    case CodecProfileLevel.AVCLevel12: return 101376;
    case CodecProfileLevel.AVCLevel13: return 101376;
    case CodecProfileLevel.AVCLevel2: return 101376;
    case CodecProfileLevel.AVCLevel21: return 202752;
    case CodecProfileLevel.AVCLevel22: return 414720;
    case CodecProfileLevel.AVCLevel3: return 414720;
    case CodecProfileLevel.AVCLevel31: return 921600;
    case CodecProfileLevel.AVCLevel32: return 1310720;
    case CodecProfileLevel.AVCLevel4: return 2097152;
    case CodecProfileLevel.AVCLevel41: return 2097152;
    case CodecProfileLevel.AVCLevel42: return 2228224;
    case CodecProfileLevel.AVCLevel5: return 5652480;
    case CodecProfileLevel.AVCLevel51: return 9437184;
    default: return -1;
  }
}
 
Example 4
Source File: MediaCodecUtil.java    From K-Sonic with MIT License 6 votes vote down vote up
/**
 * Conversion values taken from ISO 14496-10 Table A-1.
 *
 * @param avcLevel one of CodecProfileLevel.AVCLevel* constants.
 * @return maximum frame size that can be decoded by a decoder with the specified avc level
 *     (or {@code -1} if the level is not recognized)
 */
private static int avcLevelToMaxFrameSize(int avcLevel) {
  switch (avcLevel) {
    case CodecProfileLevel.AVCLevel1: return 99 * 16 * 16;
    case CodecProfileLevel.AVCLevel1b: return 99 * 16 * 16;
    case CodecProfileLevel.AVCLevel12: return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel13: return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel2: return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel21: return 792 * 16 * 16;
    case CodecProfileLevel.AVCLevel22: return 1620 * 16 * 16;
    case CodecProfileLevel.AVCLevel3: return 1620 * 16 * 16;
    case CodecProfileLevel.AVCLevel31: return 3600 * 16 * 16;
    case CodecProfileLevel.AVCLevel32: return 5120 * 16 * 16;
    case CodecProfileLevel.AVCLevel4: return 8192 * 16 * 16;
    case CodecProfileLevel.AVCLevel41: return 8192 * 16 * 16;
    case CodecProfileLevel.AVCLevel42: return 8704 * 16 * 16;
    case CodecProfileLevel.AVCLevel5: return 22080 * 16 * 16;
    case CodecProfileLevel.AVCLevel51: return 36864 * 16 * 16;
    default: return -1;
  }
}
 
Example 5
Source File: IjkMediaCodecInfo.java    From talk-android with MIT License 5 votes vote down vote up
public static String getLevelName(int level) {
    switch (level) {
    case CodecProfileLevel.AVCLevel1:
        return "1";
    case CodecProfileLevel.AVCLevel1b:
        return "1b";
    case CodecProfileLevel.AVCLevel11:
        return "11";
    case CodecProfileLevel.AVCLevel12:
        return "12";
    case CodecProfileLevel.AVCLevel13:
        return "13";
    case CodecProfileLevel.AVCLevel2:
        return "2";
    case CodecProfileLevel.AVCLevel21:
        return "21";
    case CodecProfileLevel.AVCLevel22:
        return "22";
    case CodecProfileLevel.AVCLevel3:
        return "3";
    case CodecProfileLevel.AVCLevel31:
        return "31";
    case CodecProfileLevel.AVCLevel32:
        return "32";
    case CodecProfileLevel.AVCLevel4:
        return "4";
    case CodecProfileLevel.AVCLevel41:
        return "41";
    case CodecProfileLevel.AVCLevel42:
        return "42";
    case CodecProfileLevel.AVCLevel5:
        return "5";
    case CodecProfileLevel.AVCLevel51:
        return "51";
    case 65536: // CodecProfileLevel.AVCLevel52:
        return "52";
    default:
        return "0";
    }
}
 
Example 6
Source File: MediaCodecUtil.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Conversion values taken from ISO 14496-10 Table A-1.
 *
 * @param avcLevel one of CodecProfileLevel.AVCLevel* constants.
 * @return maximum frame size that can be decoded by a decoder with the specified avc level
 *     (or {@code -1} if the level is not recognized)
 */
private static int avcLevelToMaxFrameSize(int avcLevel) {
  switch (avcLevel) {
    case CodecProfileLevel.AVCLevel1:
    case CodecProfileLevel.AVCLevel1b:
      return 99 * 16 * 16;
    case CodecProfileLevel.AVCLevel12:
    case CodecProfileLevel.AVCLevel13:
    case CodecProfileLevel.AVCLevel2:
      return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel21:
      return 792 * 16 * 16;
    case CodecProfileLevel.AVCLevel22:
    case CodecProfileLevel.AVCLevel3:
      return 1620 * 16 * 16;
    case CodecProfileLevel.AVCLevel31:
      return 3600 * 16 * 16;
    case CodecProfileLevel.AVCLevel32:
      return 5120 * 16 * 16;
    case CodecProfileLevel.AVCLevel4:
    case CodecProfileLevel.AVCLevel41:
      return 8192 * 16 * 16;
    case CodecProfileLevel.AVCLevel42:
      return 8704 * 16 * 16;
    case CodecProfileLevel.AVCLevel5:
      return 22080 * 16 * 16;
    case CodecProfileLevel.AVCLevel51:
    case CodecProfileLevel.AVCLevel52:
      return 36864 * 16 * 16;
    default:
      return -1;
  }
}
 
Example 7
Source File: MediaCodecUtil.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Conversion values taken from ISO 14496-10 Table A-1.
 *
 * @param avcLevel one of CodecProfileLevel.AVCLevel* constants.
 * @return maximum frame size that can be decoded by a decoder with the specified avc level
 *     (or {@code -1} if the level is not recognized)
 */
private static int avcLevelToMaxFrameSize(int avcLevel) {
  switch (avcLevel) {
    case CodecProfileLevel.AVCLevel1:
    case CodecProfileLevel.AVCLevel1b:
      return 99 * 16 * 16;
    case CodecProfileLevel.AVCLevel12:
    case CodecProfileLevel.AVCLevel13:
    case CodecProfileLevel.AVCLevel2:
      return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel21:
      return 792 * 16 * 16;
    case CodecProfileLevel.AVCLevel22:
    case CodecProfileLevel.AVCLevel3:
      return 1620 * 16 * 16;
    case CodecProfileLevel.AVCLevel31:
      return 3600 * 16 * 16;
    case CodecProfileLevel.AVCLevel32:
      return 5120 * 16 * 16;
    case CodecProfileLevel.AVCLevel4:
    case CodecProfileLevel.AVCLevel41:
      return 8192 * 16 * 16;
    case CodecProfileLevel.AVCLevel42:
      return 8704 * 16 * 16;
    case CodecProfileLevel.AVCLevel5:
      return 22080 * 16 * 16;
    case CodecProfileLevel.AVCLevel51:
    case CodecProfileLevel.AVCLevel52:
      return 36864 * 16 * 16;
    default:
      return -1;
  }
}
 
Example 8
Source File: IjkMediaCodecInfo.java    From GiraffePlayer with Apache License 2.0 5 votes vote down vote up
public static String getLevelName(int level) {
    switch (level) {
    case CodecProfileLevel.AVCLevel1:
        return "1";
    case CodecProfileLevel.AVCLevel1b:
        return "1b";
    case CodecProfileLevel.AVCLevel11:
        return "11";
    case CodecProfileLevel.AVCLevel12:
        return "12";
    case CodecProfileLevel.AVCLevel13:
        return "13";
    case CodecProfileLevel.AVCLevel2:
        return "2";
    case CodecProfileLevel.AVCLevel21:
        return "21";
    case CodecProfileLevel.AVCLevel22:
        return "22";
    case CodecProfileLevel.AVCLevel3:
        return "3";
    case CodecProfileLevel.AVCLevel31:
        return "31";
    case CodecProfileLevel.AVCLevel32:
        return "32";
    case CodecProfileLevel.AVCLevel4:
        return "4";
    case CodecProfileLevel.AVCLevel41:
        return "41";
    case CodecProfileLevel.AVCLevel42:
        return "42";
    case CodecProfileLevel.AVCLevel5:
        return "5";
    case CodecProfileLevel.AVCLevel51:
        return "51";
    case 65536: // CodecProfileLevel.AVCLevel52:
        return "52";
    default:
        return "0";
    }
}
 
Example 9
Source File: CodecSpecificDataUtil.java    From Exoplayer_VLC with Apache License 2.0 5 votes vote down vote up
@SuppressLint("InlinedApi")
private static int parseAvcLevel(byte[] data) {
  int levelIdc = data[8] & 0xFF;
  switch (levelIdc) {
    case 9:
      return CodecProfileLevel.AVCLevel1b;
    case 10:
      return CodecProfileLevel.AVCLevel1;
    case 11:
      return CodecProfileLevel.AVCLevel11;
    case 12:
      return CodecProfileLevel.AVCLevel12;
    case 13:
      return CodecProfileLevel.AVCLevel13;
    case 20:
      return CodecProfileLevel.AVCLevel2;
    case 21:
      return CodecProfileLevel.AVCLevel21;
    case 22:
      return CodecProfileLevel.AVCLevel22;
    case 30:
      return CodecProfileLevel.AVCLevel3;
    case 31:
      return CodecProfileLevel.AVCLevel31;
    case 32:
      return CodecProfileLevel.AVCLevel32;
    case 40:
      return CodecProfileLevel.AVCLevel4;
    case 41:
      return CodecProfileLevel.AVCLevel41;
    case 42:
      return CodecProfileLevel.AVCLevel42;
    case 50:
      return CodecProfileLevel.AVCLevel5;
    case 51:
      return CodecProfileLevel.AVCLevel51;
    default:
      return 0;
  }
}
 
Example 10
Source File: IjkMediaCodecInfo.java    From WliveTV with Apache License 2.0 5 votes vote down vote up
public static String getLevelName(int level) {
    switch (level) {
    case CodecProfileLevel.AVCLevel1:
        return "1";
    case CodecProfileLevel.AVCLevel1b:
        return "1b";
    case CodecProfileLevel.AVCLevel11:
        return "11";
    case CodecProfileLevel.AVCLevel12:
        return "12";
    case CodecProfileLevel.AVCLevel13:
        return "13";
    case CodecProfileLevel.AVCLevel2:
        return "2";
    case CodecProfileLevel.AVCLevel21:
        return "21";
    case CodecProfileLevel.AVCLevel22:
        return "22";
    case CodecProfileLevel.AVCLevel3:
        return "3";
    case CodecProfileLevel.AVCLevel31:
        return "31";
    case CodecProfileLevel.AVCLevel32:
        return "32";
    case CodecProfileLevel.AVCLevel4:
        return "4";
    case CodecProfileLevel.AVCLevel41:
        return "41";
    case CodecProfileLevel.AVCLevel42:
        return "42";
    case CodecProfileLevel.AVCLevel5:
        return "5";
    case CodecProfileLevel.AVCLevel51:
        return "51";
    case 65536: // CodecProfileLevel.AVCLevel52:
        return "52";
    default:
        return "0";
    }
}
 
Example 11
Source File: IjkMediaCodecInfo.java    From IjkPlayerDemo with Apache License 2.0 5 votes vote down vote up
public static String getLevelName(int level) {
    switch (level) {
    case CodecProfileLevel.AVCLevel1:
        return "1";
    case CodecProfileLevel.AVCLevel1b:
        return "1b";
    case CodecProfileLevel.AVCLevel11:
        return "11";
    case CodecProfileLevel.AVCLevel12:
        return "12";
    case CodecProfileLevel.AVCLevel13:
        return "13";
    case CodecProfileLevel.AVCLevel2:
        return "2";
    case CodecProfileLevel.AVCLevel21:
        return "21";
    case CodecProfileLevel.AVCLevel22:
        return "22";
    case CodecProfileLevel.AVCLevel3:
        return "3";
    case CodecProfileLevel.AVCLevel31:
        return "31";
    case CodecProfileLevel.AVCLevel32:
        return "32";
    case CodecProfileLevel.AVCLevel4:
        return "4";
    case CodecProfileLevel.AVCLevel41:
        return "41";
    case CodecProfileLevel.AVCLevel42:
        return "42";
    case CodecProfileLevel.AVCLevel5:
        return "5";
    case CodecProfileLevel.AVCLevel51:
        return "51";
    case 65536: // CodecProfileLevel.AVCLevel52:
        return "52";
    default:
        return "0";
    }
}
 
Example 12
Source File: IjkMediaCodecInfo.java    From LivePlayback with Apache License 2.0 5 votes vote down vote up
public static String getLevelName(int level) {
    switch (level) {
    case CodecProfileLevel.AVCLevel1:
        return "1";
    case CodecProfileLevel.AVCLevel1b:
        return "1b";
    case CodecProfileLevel.AVCLevel11:
        return "11";
    case CodecProfileLevel.AVCLevel12:
        return "12";
    case CodecProfileLevel.AVCLevel13:
        return "13";
    case CodecProfileLevel.AVCLevel2:
        return "2";
    case CodecProfileLevel.AVCLevel21:
        return "21";
    case CodecProfileLevel.AVCLevel22:
        return "22";
    case CodecProfileLevel.AVCLevel3:
        return "3";
    case CodecProfileLevel.AVCLevel31:
        return "31";
    case CodecProfileLevel.AVCLevel32:
        return "32";
    case CodecProfileLevel.AVCLevel4:
        return "4";
    case CodecProfileLevel.AVCLevel41:
        return "41";
    case CodecProfileLevel.AVCLevel42:
        return "42";
    case CodecProfileLevel.AVCLevel5:
        return "5";
    case CodecProfileLevel.AVCLevel51:
        return "51";
    case 65536: // CodecProfileLevel.AVCLevel52:
        return "52";
    default:
        return "0";
    }
}
 
Example 13
Source File: IjkMediaCodecInfo.java    From MediaSDK with Apache License 2.0 5 votes vote down vote up
public static String getLevelName(int level) {
    switch (level) {
    case CodecProfileLevel.AVCLevel1:
        return "1";
    case CodecProfileLevel.AVCLevel1b:
        return "1b";
    case CodecProfileLevel.AVCLevel11:
        return "11";
    case CodecProfileLevel.AVCLevel12:
        return "12";
    case CodecProfileLevel.AVCLevel13:
        return "13";
    case CodecProfileLevel.AVCLevel2:
        return "2";
    case CodecProfileLevel.AVCLevel21:
        return "21";
    case CodecProfileLevel.AVCLevel22:
        return "22";
    case CodecProfileLevel.AVCLevel3:
        return "3";
    case CodecProfileLevel.AVCLevel31:
        return "31";
    case CodecProfileLevel.AVCLevel32:
        return "32";
    case CodecProfileLevel.AVCLevel4:
        return "4";
    case CodecProfileLevel.AVCLevel41:
        return "41";
    case CodecProfileLevel.AVCLevel42:
        return "42";
    case CodecProfileLevel.AVCLevel5:
        return "5";
    case CodecProfileLevel.AVCLevel51:
        return "51";
    case 65536: // CodecProfileLevel.AVCLevel52:
        return "52";
    default:
        return "0";
    }
}
 
Example 14
Source File: IjkMediaCodecInfo.java    From TvPlayer with Apache License 2.0 5 votes vote down vote up
public static String getLevelName(int level) {
    switch (level) {
    case CodecProfileLevel.AVCLevel1:
        return "1";
    case CodecProfileLevel.AVCLevel1b:
        return "1b";
    case CodecProfileLevel.AVCLevel11:
        return "11";
    case CodecProfileLevel.AVCLevel12:
        return "12";
    case CodecProfileLevel.AVCLevel13:
        return "13";
    case CodecProfileLevel.AVCLevel2:
        return "2";
    case CodecProfileLevel.AVCLevel21:
        return "21";
    case CodecProfileLevel.AVCLevel22:
        return "22";
    case CodecProfileLevel.AVCLevel3:
        return "3";
    case CodecProfileLevel.AVCLevel31:
        return "31";
    case CodecProfileLevel.AVCLevel32:
        return "32";
    case CodecProfileLevel.AVCLevel4:
        return "4";
    case CodecProfileLevel.AVCLevel41:
        return "41";
    case CodecProfileLevel.AVCLevel42:
        return "42";
    case CodecProfileLevel.AVCLevel5:
        return "5";
    case CodecProfileLevel.AVCLevel51:
        return "51";
    case 65536: // CodecProfileLevel.AVCLevel52:
        return "52";
    default:
        return "0";
    }
}
 
Example 15
Source File: IjkMediaCodecInfo.java    From MKVideoPlayer with MIT License 5 votes vote down vote up
public static String getLevelName(int level) {
    switch (level) {
    case CodecProfileLevel.AVCLevel1:
        return "1";
    case CodecProfileLevel.AVCLevel1b:
        return "1b";
    case CodecProfileLevel.AVCLevel11:
        return "11";
    case CodecProfileLevel.AVCLevel12:
        return "12";
    case CodecProfileLevel.AVCLevel13:
        return "13";
    case CodecProfileLevel.AVCLevel2:
        return "2";
    case CodecProfileLevel.AVCLevel21:
        return "21";
    case CodecProfileLevel.AVCLevel22:
        return "22";
    case CodecProfileLevel.AVCLevel3:
        return "3";
    case CodecProfileLevel.AVCLevel31:
        return "31";
    case CodecProfileLevel.AVCLevel32:
        return "32";
    case CodecProfileLevel.AVCLevel4:
        return "4";
    case CodecProfileLevel.AVCLevel41:
        return "41";
    case CodecProfileLevel.AVCLevel42:
        return "42";
    case CodecProfileLevel.AVCLevel5:
        return "5";
    case CodecProfileLevel.AVCLevel51:
        return "51";
    case 65536: // CodecProfileLevel.AVCLevel52:
        return "52";
    default:
        return "0";
    }
}
 
Example 16
Source File: IjkMediaCodecInfo.java    From ShareBox with Apache License 2.0 5 votes vote down vote up
public static String getLevelName(int level) {
    switch (level) {
    case CodecProfileLevel.AVCLevel1:
        return "1";
    case CodecProfileLevel.AVCLevel1b:
        return "1b";
    case CodecProfileLevel.AVCLevel11:
        return "11";
    case CodecProfileLevel.AVCLevel12:
        return "12";
    case CodecProfileLevel.AVCLevel13:
        return "13";
    case CodecProfileLevel.AVCLevel2:
        return "2";
    case CodecProfileLevel.AVCLevel21:
        return "21";
    case CodecProfileLevel.AVCLevel22:
        return "22";
    case CodecProfileLevel.AVCLevel3:
        return "3";
    case CodecProfileLevel.AVCLevel31:
        return "31";
    case CodecProfileLevel.AVCLevel32:
        return "32";
    case CodecProfileLevel.AVCLevel4:
        return "4";
    case CodecProfileLevel.AVCLevel41:
        return "41";
    case CodecProfileLevel.AVCLevel42:
        return "42";
    case CodecProfileLevel.AVCLevel5:
        return "5";
    case CodecProfileLevel.AVCLevel51:
        return "51";
    case 65536: // CodecProfileLevel.AVCLevel52:
        return "52";
    default:
        return "0";
    }
}
 
Example 17
Source File: IjkMediaCodecInfo.java    From AndroidTvDemo with Apache License 2.0 5 votes vote down vote up
public static String getLevelName(int level) {
    switch (level) {
    case CodecProfileLevel.AVCLevel1:
        return "1";
    case CodecProfileLevel.AVCLevel1b:
        return "1b";
    case CodecProfileLevel.AVCLevel11:
        return "11";
    case CodecProfileLevel.AVCLevel12:
        return "12";
    case CodecProfileLevel.AVCLevel13:
        return "13";
    case CodecProfileLevel.AVCLevel2:
        return "2";
    case CodecProfileLevel.AVCLevel21:
        return "21";
    case CodecProfileLevel.AVCLevel22:
        return "22";
    case CodecProfileLevel.AVCLevel3:
        return "3";
    case CodecProfileLevel.AVCLevel31:
        return "31";
    case CodecProfileLevel.AVCLevel32:
        return "32";
    case CodecProfileLevel.AVCLevel4:
        return "4";
    case CodecProfileLevel.AVCLevel41:
        return "41";
    case CodecProfileLevel.AVCLevel42:
        return "42";
    case CodecProfileLevel.AVCLevel5:
        return "5";
    case CodecProfileLevel.AVCLevel51:
        return "51";
    case 65536: // CodecProfileLevel.AVCLevel52:
        return "52";
    default:
        return "0";
    }
}
 
Example 18
Source File: IjkMediaCodecInfo.java    From DanDanPlayForAndroid with MIT License 5 votes vote down vote up
public static String getLevelName(int level) {
    switch (level) {
    case CodecProfileLevel.AVCLevel1:
        return "1";
    case CodecProfileLevel.AVCLevel1b:
        return "1b";
    case CodecProfileLevel.AVCLevel11:
        return "11";
    case CodecProfileLevel.AVCLevel12:
        return "12";
    case CodecProfileLevel.AVCLevel13:
        return "13";
    case CodecProfileLevel.AVCLevel2:
        return "2";
    case CodecProfileLevel.AVCLevel21:
        return "21";
    case CodecProfileLevel.AVCLevel22:
        return "22";
    case CodecProfileLevel.AVCLevel3:
        return "3";
    case CodecProfileLevel.AVCLevel31:
        return "31";
    case CodecProfileLevel.AVCLevel32:
        return "32";
    case CodecProfileLevel.AVCLevel4:
        return "4";
    case CodecProfileLevel.AVCLevel41:
        return "41";
    case CodecProfileLevel.AVCLevel42:
        return "42";
    case CodecProfileLevel.AVCLevel5:
        return "5";
    case CodecProfileLevel.AVCLevel51:
        return "51";
    case 65536: // CodecProfileLevel.AVCLevel52:
        return "52";
    default:
        return "0";
    }
}
 
Example 19
Source File: IjkMediaCodecInfo.java    From JZVideoDemo with MIT License 5 votes vote down vote up
public static String getLevelName(int level) {
    switch (level) {
    case CodecProfileLevel.AVCLevel1:
        return "1";
    case CodecProfileLevel.AVCLevel1b:
        return "1b";
    case CodecProfileLevel.AVCLevel11:
        return "11";
    case CodecProfileLevel.AVCLevel12:
        return "12";
    case CodecProfileLevel.AVCLevel13:
        return "13";
    case CodecProfileLevel.AVCLevel2:
        return "2";
    case CodecProfileLevel.AVCLevel21:
        return "21";
    case CodecProfileLevel.AVCLevel22:
        return "22";
    case CodecProfileLevel.AVCLevel3:
        return "3";
    case CodecProfileLevel.AVCLevel31:
        return "31";
    case CodecProfileLevel.AVCLevel32:
        return "32";
    case CodecProfileLevel.AVCLevel4:
        return "4";
    case CodecProfileLevel.AVCLevel41:
        return "41";
    case CodecProfileLevel.AVCLevel42:
        return "42";
    case CodecProfileLevel.AVCLevel5:
        return "5";
    case CodecProfileLevel.AVCLevel51:
        return "51";
    case 65536: // CodecProfileLevel.AVCLevel52:
        return "52";
    default:
        return "0";
    }
}
 
Example 20
Source File: MediaCodecUtil.java    From MediaSDK with Apache License 2.0 5 votes vote down vote up
/**
 * Conversion values taken from ISO 14496-10 Table A-1.
 *
 * @param avcLevel one of CodecProfileLevel.AVCLevel* constants.
 * @return maximum frame size that can be decoded by a decoder with the specified avc level
 *     (or {@code -1} if the level is not recognized)
 */
private static int avcLevelToMaxFrameSize(int avcLevel) {
  switch (avcLevel) {
    case CodecProfileLevel.AVCLevel1:
    case CodecProfileLevel.AVCLevel1b:
      return 99 * 16 * 16;
    case CodecProfileLevel.AVCLevel12:
    case CodecProfileLevel.AVCLevel13:
    case CodecProfileLevel.AVCLevel2:
      return 396 * 16 * 16;
    case CodecProfileLevel.AVCLevel21:
      return 792 * 16 * 16;
    case CodecProfileLevel.AVCLevel22:
    case CodecProfileLevel.AVCLevel3:
      return 1620 * 16 * 16;
    case CodecProfileLevel.AVCLevel31:
      return 3600 * 16 * 16;
    case CodecProfileLevel.AVCLevel32:
      return 5120 * 16 * 16;
    case CodecProfileLevel.AVCLevel4:
    case CodecProfileLevel.AVCLevel41:
      return 8192 * 16 * 16;
    case CodecProfileLevel.AVCLevel42:
      return 8704 * 16 * 16;
    case CodecProfileLevel.AVCLevel5:
      return 22080 * 16 * 16;
    case CodecProfileLevel.AVCLevel51:
    case CodecProfileLevel.AVCLevel52:
      return 36864 * 16 * 16;
    default:
      return -1;
  }
}