Merge branch 'audiorecorder-1.1.56'
This commit is contained in:
commit
1b650b5961
3 changed files with 9 additions and 5 deletions
|
|
@ -8,8 +8,8 @@ android {
|
|||
applicationId "com.github.axet.audiorecorder"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 23
|
||||
versionCode 77
|
||||
versionName "1.1.55"
|
||||
versionCode 78
|
||||
versionName "1.1.56"
|
||||
}
|
||||
signingConfigs {
|
||||
release {
|
||||
|
|
|
|||
|
|
@ -14,9 +14,7 @@ public class FormatM4A extends MuxerMP4 {
|
|||
Map<String, MediaCodecInfo> map = findEncoder("audio/mp4");
|
||||
if (map.isEmpty())
|
||||
throw new RuntimeException("mp4 not supported");
|
||||
MediaFormat format = new MediaFormat();
|
||||
format.setString(MediaFormat.KEY_MIME, prefered("audio/mp4a-latm", map));
|
||||
format.setInteger(MediaFormat.KEY_AAC_PROFILE, MediaCodecInfo.CodecProfileLevel.AACObjectHE);
|
||||
MediaFormat format = MuxerMP4.getDefault("audio/mp4a-latm", map);
|
||||
format.setInteger(MediaFormat.KEY_SAMPLE_RATE, info.sampleRate);
|
||||
format.setInteger(MediaFormat.KEY_CHANNEL_COUNT, info.channels);
|
||||
format.setInteger(MediaFormat.KEY_BIT_RATE, 64000);
|
||||
|
|
|
|||
|
|
@ -64,6 +64,12 @@ public class MuxerMP4 implements Encoder {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static MediaFormat getDefault(String pref, Map<String, MediaCodecInfo> map) {
|
||||
String p = prefered(pref, map);
|
||||
MediaFormat format = map.get(p).getCapabilitiesForType(p).getDefaultFormat();
|
||||
return format;
|
||||
}
|
||||
|
||||
public void create(EncoderInfo info, MediaFormat format, File out) {
|
||||
this.info = info;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue