aboutsummaryrefslogtreecommitdiffstats
path: root/libs/android-transcoder
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-12-14 22:03:33 +0100
committerChristian Schneppe <christian@pix-art.de>2018-12-14 22:04:42 +0100
commit155332f65b5fc5baaaff845f2c288056d7ae12ec (patch)
treef2d55cb9fe796c6dee67c02355706ddc7738df1f /libs/android-transcoder
parent7df333bf2a8aad44f082ac6a6a9ee49948ce36d7 (diff)
limit video transcoding to api >= 18 and other api 16 fixes
Diffstat (limited to 'libs/android-transcoder')
-rw-r--r--libs/android-transcoder/build.gradle8
-rw-r--r--libs/android-transcoder/src/main/java/net/ypresto/androidtranscoder/format/AndroidStandardFormatStrategy.java3
2 files changed, 9 insertions, 2 deletions
diff --git a/libs/android-transcoder/build.gradle b/libs/android-transcoder/build.gradle
index 62936b5d9..6b1f1086d 100644
--- a/libs/android-transcoder/build.gradle
+++ b/libs/android-transcoder/build.gradle
@@ -6,13 +6,17 @@ buildscript {
apply plugin: 'com.android.library'
+dependencies {
+ implementation 'com.android.support:support-v13:28.0.0'
+}
+
android {
- compileSdkVersion 27
+ compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
minSdkVersion 18
- targetSdkVersion 26
+ targetSdkVersion 28
}
buildTypes {
diff --git a/libs/android-transcoder/src/main/java/net/ypresto/androidtranscoder/format/AndroidStandardFormatStrategy.java b/libs/android-transcoder/src/main/java/net/ypresto/androidtranscoder/format/AndroidStandardFormatStrategy.java
index a6bf40b9c..7783f731a 100644
--- a/libs/android-transcoder/src/main/java/net/ypresto/androidtranscoder/format/AndroidStandardFormatStrategy.java
+++ b/libs/android-transcoder/src/main/java/net/ypresto/androidtranscoder/format/AndroidStandardFormatStrategy.java
@@ -17,6 +17,8 @@ package net.ypresto.androidtranscoder.format;
import android.media.MediaCodecInfo;
import android.media.MediaFormat;
+import android.os.Build;
+import android.support.annotation.RequiresApi;
import android.util.Log;
class AndroidStandardFormatStrategy implements MediaFormatStrategy {
@@ -47,6 +49,7 @@ class AndroidStandardFormatStrategy implements MediaFormatStrategy {
mAudioChannels = audioChannels;
}
+ @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2)
@Override
public MediaFormat createVideoOutputFormat(MediaFormat inputFormat) {
int width = inputFormat.getInteger(MediaFormat.KEY_WIDTH);