public class PassThroughTrackStrategy extends java.lang.Object implements TrackStrategy
TrackStrategy that asks the encoder to keep this track as is.
Note that this is risky, as the track type might not be supported by
the mp4 container.| Constructor and Description |
|---|
PassThroughTrackStrategy() |
| Modifier and Type | Method and Description |
|---|---|
TrackStatus |
createOutputFormat(java.util.List<android.media.MediaFormat> inputFormats,
android.media.MediaFormat outputFormat)
Create the output format for this track (either audio or video).
|
@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