mirror of
https://github.com/samsonjs/media.git
synced 2026-04-05 11:15:46 +00:00
Only allow HEVC output MIME selection in demo for API>=24.
The muxer doesn't support HEVC below API 24. The is documented in the TransformationRequest javadoc and the Transformer.Builder will throw if HEVC is requested below API 24 so the option should not be part of the demo for those devices. #mse-bug-week PiperOrigin-RevId: 429343805
This commit is contained in:
parent
a55219fbf1
commit
4760a03444
1 changed files with 5 additions and 5 deletions
|
|
@ -33,6 +33,7 @@ import androidx.annotation.Nullable;
|
|||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import com.google.android.exoplayer2.util.MimeTypes;
|
||||
import com.google.android.exoplayer2.util.Util;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
|
|
@ -122,11 +123,10 @@ public final class ConfigurationActivity extends AppCompatActivity {
|
|||
videoMimeSpinner = findViewById(R.id.video_mime_spinner);
|
||||
videoMimeSpinner.setAdapter(videoMimeAdapter);
|
||||
videoMimeAdapter.addAll(
|
||||
SAME_AS_INPUT_OPTION,
|
||||
MimeTypes.VIDEO_H263,
|
||||
MimeTypes.VIDEO_H264,
|
||||
MimeTypes.VIDEO_H265,
|
||||
MimeTypes.VIDEO_MP4V);
|
||||
SAME_AS_INPUT_OPTION, MimeTypes.VIDEO_H263, MimeTypes.VIDEO_H264, MimeTypes.VIDEO_MP4V);
|
||||
if (Util.SDK_INT >= 24) {
|
||||
videoMimeAdapter.add(MimeTypes.VIDEO_H265);
|
||||
}
|
||||
|
||||
ArrayAdapter<String> resolutionHeightAdapter =
|
||||
new ArrayAdapter<>(/* context= */ this, R.layout.spinner_item);
|
||||
|
|
|
|||
Loading…
Reference in a new issue