aboutsummaryrefslogtreecommitdiffstats
path: root/libs/android-transcoder/src/main/java/net/ypresto/androidtranscoder
diff options
context:
space:
mode:
authorChristian Schneppe <christian.schneppe@pix-art.de>2020-01-31 14:28:27 +0100
committerChristian Schneppe <christian.schneppe@pix-art.de>2020-01-31 14:28:27 +0100
commit83c976f2d7cf35d27e040281eab4a2fd40c6d08b (patch)
treeda62e26fff1f42267be0103eeb8ae2a264d425eb /libs/android-transcoder/src/main/java/net/ypresto/androidtranscoder
parent6bb9db368638dbd129ac49db15c8308deaf1a5a7 (diff)
use ExoPlayer for video playback
Diffstat (limited to 'libs/android-transcoder/src/main/java/net/ypresto/androidtranscoder')
-rw-r--r--libs/android-transcoder/src/main/java/net/ypresto/androidtranscoder/engine/MediaTranscoderEngine.java14
-rw-r--r--libs/android-transcoder/src/main/java/net/ypresto/androidtranscoder/format/AndroidStandardFormatStrategy.java3
2 files changed, 2 insertions, 15 deletions
diff --git a/libs/android-transcoder/src/main/java/net/ypresto/androidtranscoder/engine/MediaTranscoderEngine.java b/libs/android-transcoder/src/main/java/net/ypresto/androidtranscoder/engine/MediaTranscoderEngine.java
index 274d91cac..86637fd0e 100644
--- a/libs/android-transcoder/src/main/java/net/ypresto/androidtranscoder/engine/MediaTranscoderEngine.java
+++ b/libs/android-transcoder/src/main/java/net/ypresto/androidtranscoder/engine/MediaTranscoderEngine.java
@@ -19,11 +19,9 @@ import android.media.MediaExtractor;
import android.media.MediaFormat;
import android.media.MediaMetadataRetriever;
import android.media.MediaMuxer;
-import android.os.Build;
import android.util.Log;
import net.ypresto.androidtranscoder.format.MediaFormatStrategy;
-import net.ypresto.androidtranscoder.utils.ISO6709LocationParser;
import net.ypresto.androidtranscoder.utils.MediaExtractorUtils;
import java.io.FileDescriptor;
@@ -139,18 +137,6 @@ public class MediaTranscoderEngine {
// skip
}
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
- String locationString = mediaMetadataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_LOCATION);
- if (locationString != null) {
- float[] location = new ISO6709LocationParser().parse(locationString);
- if (location != null) {
- mMuxer.setLocation(location[0], location[1]);
- } else {
- Log.d(TAG, "Failed to parse the location metadata: " + locationString);
- }
- }
- }
-
try {
mDurationUs = Long.parseLong(mediaMetadataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION)) * 1000;
} catch (NumberFormatException e) {
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 822c45fbd..6b1990e69 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
@@ -18,9 +18,10 @@ package net.ypresto.androidtranscoder.format;
import android.media.MediaCodecInfo;
import android.media.MediaFormat;
import android.os.Build;
-import androidx.annotation.RequiresApi;
import android.util.Log;
+import androidx.annotation.RequiresApi;
+
class AndroidStandardFormatStrategy implements MediaFormatStrategy {
public static final int AUDIO_BITRATE_AS_IS = -1;
public static final int AUDIO_CHANNELS_AS_IS = -1;