fix file list

This commit is contained in:
Alexey Kuznetsov 2017-02-14 17:26:20 +03:00
commit 475ec19d43
6 changed files with 13 additions and 7 deletions

View file

@ -43,6 +43,6 @@ dependencies {
compile 'com.android.support:design:25.1.1'
compile 'com.google.android.gms:play-services-appindexing:9.8.0'
compile 'org.apache.commons:commons-math3:3.6.1'
compile 'com.github.axet:android-library:1.8.2' // compile project(':android-library')
compile 'com.github.axet:android-library:1.9.0' // compile project(':android-library')
compile 'com.github.axet:jebml:0.0.1' // compile project(':jebml')
}

View file

@ -388,6 +388,8 @@ public class MainActivity extends AppCompatActivity implements AbsListView.OnScr
}
if (!playing) {
playerStop(); // clear player instance
updatePlayerText(v, f); // update length
return;
}

View file

@ -7,7 +7,7 @@ import android.media.AudioManager;
import android.media.AudioTrack;
import android.preference.PreferenceManager;
public class Sound extends com.github.axet.androidlibrary.app.Sound {
public class Sound extends com.github.axet.androidlibrary.sound.Sound {
public Sound(Context context) {
super(context);

View file

@ -179,7 +179,7 @@ public class Storage {
for (File f : ff) {
if (f.length() > 0) {
String[] ee = context.getResources().getStringArray(R.array.encodings_values);
String[] ee = Factory.getEncodingValues(context);
String n = f.getName().toLowerCase();
for (String e : ee) {
if (n.endsWith("." + e))

View file

@ -19,6 +19,7 @@ public class Factory {
if (Build.VERSION.SDK_INT >= 18)
ll.add(".m4a");
ll.add(".mka");
ll.add(".ogg");
return ll.toArray(new String[]{});
}
@ -28,6 +29,7 @@ public class Factory {
if (Build.VERSION.SDK_INT >= 18)
ll.add("m4a");
ll.add("mka");
ll.add("ogg");
return ll.toArray(new String[]{});
}
@ -35,12 +37,12 @@ public class Factory {
if (ext.equals("wav")) {
return new FormatWAV(info, out);
}
if (ext.equals("m4a")) {
return new FormatM4A(info, out);
}
if (ext.equals("3gp")) {
return new Format3GP(info, out);
}
if (ext.equals("m4a")) {
return new FormatM4A(info, out);
}
if (ext.equals("mka")) {
return new FormatMKA(info, out);
}

View file

@ -90,6 +90,8 @@ public class FormatMKA implements Encoder {
return clone;
}
public static final int BUFFER_FLAG_KEY_FRAME = 1; // MediaCodec.BUFFER_FLAG_KEY_FRAME
boolean encode() {
MediaCodec.BufferInfo outputInfo = new MediaCodec.BufferInfo();
int outputIndex = encoder.dequeueOutputBuffer(outputInfo, 0);
@ -125,7 +127,7 @@ public class FormatMKA implements Encoder {
encoder.releaseOutputBuffer(outputIndex, false);
} else {
MatroskaFileFrame frame = new MatroskaFileFrame();
frame.setKeyFrame((outputInfo.flags & MediaCodec.BUFFER_FLAG_KEY_FRAME) == MediaCodec.BUFFER_FLAG_KEY_FRAME);
frame.setKeyFrame((outputInfo.flags & BUFFER_FLAG_KEY_FRAME) == BUFFER_FLAG_KEY_FRAME);
frame.setTimecode(outputInfo.presentationTimeUs / 1000);
frame.setTrackNo(track.getTrackNo());
frame.setData(clone(output));