diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-12-14 22:03:33 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-12-14 22:04:42 +0100 |
commit | 155332f65b5fc5baaaff845f2c288056d7ae12ec (patch) | |
tree | f2d55cb9fe796c6dee67c02355706ddc7738df1f /libs/android-transcoder/src/main/java/net/ypresto | |
parent | 7df333bf2a8aad44f082ac6a6a9ee49948ce36d7 (diff) |
limit video transcoding to api >= 18 and other api 16 fixes
Diffstat (limited to 'libs/android-transcoder/src/main/java/net/ypresto')
-rw-r--r-- | libs/android-transcoder/src/main/java/net/ypresto/androidtranscoder/format/AndroidStandardFormatStrategy.java | 3 |
1 files changed, 3 insertions, 0 deletions
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); |