diff --git a/example/build.gradle b/example/build.gradle index ca16dc00..b50bd2ad 100644 --- a/example/build.gradle +++ b/example/build.gradle @@ -1,13 +1,16 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 19 - buildToolsVersion "19.1.0" + compileSdkVersion 27 + buildToolsVersion "29.0.0" + aaptOptions { + cruncherEnabled = false + } defaultConfig { applicationId "net.ypresto.androidtranscoder.example" - minSdkVersion 18 - targetSdkVersion 19 + minSdkVersion 19 + targetSdkVersion 29 versionCode 1 versionName "1.0" } diff --git a/lib/build.gradle b/lib/build.gradle index 6f6f393f..24b0527e 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -11,12 +11,12 @@ apply plugin: 'com.android.library' apply plugin: 'bintray-release' android { - compileSdkVersion 21 - buildToolsVersion "21.1.2" + compileSdkVersion 27 + buildToolsVersion "29.0.0" defaultConfig { - minSdkVersion 18 - targetSdkVersion 21 + minSdkVersion 19 + targetSdkVersion 29 } buildTypes { diff --git a/lib/src/main/java/net/ypresto/androidtranscoder/engine/MediaFormatValidator.java b/lib/src/main/java/net/ypresto/androidtranscoder/engine/MediaFormatValidator.java index 67ea5ba8..ebb1120c 100644 --- a/lib/src/main/java/net/ypresto/androidtranscoder/engine/MediaFormatValidator.java +++ b/lib/src/main/java/net/ypresto/androidtranscoder/engine/MediaFormatValidator.java @@ -26,6 +26,7 @@ class MediaFormatValidator { // Refer: http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Profiles private static final byte PROFILE_IDC_BASELINE = 66; + private static final byte PROFILE_IDC_HI = 100; public static void validateVideoOutputFormat(MediaFormat format) { String mime = format.getString(MediaFormat.KEY_MIME); @@ -36,7 +37,7 @@ public static void validateVideoOutputFormat(MediaFormat format) { } ByteBuffer spsBuffer = AvcCsdUtils.getSpsBuffer(format); byte profileIdc = AvcSpsUtils.getProfileIdc(spsBuffer); - if (profileIdc != PROFILE_IDC_BASELINE) { + if (profileIdc != PROFILE_IDC_BASELINE && profileIdc != PROFILE_IDC_HI) { throw new InvalidOutputFormatException("Non-baseline AVC video profile is not supported by Android OS, actual profile_idc: " + profileIdc); } }