Skip to content

Commit 580a18a

Browse files
committed
Add supported channels data to AudioCodec
The vorbis codec only supports stereo with ffmpeg.
1 parent 5186027 commit 580a18a

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

app/src/main/java/protect/videotranscoder/media/AudioCodec.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,27 @@
22

33
import android.support.annotation.Nullable;
44

5+
import java.util.Arrays;
6+
import java.util.Collections;
7+
import java.util.List;
8+
59
/**
610
* List of audio codecs which the application may support
711
*/
812
public enum AudioCodec
913
{
10-
AAC("aac"),
11-
MP3("mp3"),
12-
VORBIS("vorbis"),
14+
AAC("aac", Arrays.asList("1", "2")),
15+
MP3("mp3", Arrays.asList("1", "2")),
16+
VORBIS("vorbis", Collections.singletonList("2")),
1317
;
1418

1519
public final String ffmpegName;
20+
public final List<String> supportedChannels;
1621

17-
AudioCodec(String ffmpegName)
22+
AudioCodec(String ffmpegName, List<String> supportedChannels)
1823
{
1924
this.ffmpegName = ffmpegName;
25+
this.supportedChannels = Collections.unmodifiableList(supportedChannels);
2026
}
2127

2228
@Nullable

0 commit comments

Comments
 (0)