public class DefaultAudioStrategy extends java.lang.Object implements TrackStrategy
TrackStrategy for audio that converts it to AAC with the given number
of channels.| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultAudioStrategy.Builder |
static class |
DefaultAudioStrategy.Options
Holds configuration values.
|
| Modifier and Type | Field and Description |
|---|---|
static long |
BITRATE_UNKNOWN |
static int |
CHANNELS_AS_INPUT |
static int |
SAMPLE_RATE_AS_INPUT |
| Constructor and Description |
|---|
DefaultAudioStrategy(DefaultAudioStrategy.Options options) |
| Modifier and Type | Method and Description |
|---|---|
static DefaultAudioStrategy.Builder |
builder()
Creates a new
DefaultAudioStrategy.Builder. |
TrackStatus |
createOutputFormat(java.util.List<android.media.MediaFormat> inputFormats,
android.media.MediaFormat outputFormat)
Create the output format for this track (either audio or video).
|
public static final int CHANNELS_AS_INPUT
public static final int SAMPLE_RATE_AS_INPUT
public static final long BITRATE_UNKNOWN
public DefaultAudioStrategy(@NonNull
DefaultAudioStrategy.Options options)
@NonNull public static DefaultAudioStrategy.Builder builder()
DefaultAudioStrategy.Builder.@NonNull public TrackStatus createOutputFormat(@NonNull java.util.List<android.media.MediaFormat> inputFormats, @NonNull android.media.MediaFormat outputFormat)
TrackStrategyTrackStatus:
- TrackStatus.COMPRESSING: we want to compress this track. Output format will be used
- TrackStatus.PASS_THROUGH: we want to use the input format. Output format will be ignored
- TrackStatus.REMOVING: we want to remove this track. Output format will be ignored
Subclasses can also throw to abort the whole transcoding operation.createOutputFormat in interface TrackStrategyinputFormats - the input formatsoutputFormat - the output format to be filled