mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Pass codec names of input media items to MediaItemInfo
PiperOrigin-RevId: 720579315
This commit is contained in:
parent
8d22482f79
commit
bb9b3bd660
@ -262,6 +262,9 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
if (videoFormat.sampleMimeType != null) {
|
||||
mediaItemInfoBuilder.addSampleMimeType(videoFormat.sampleMimeType);
|
||||
}
|
||||
if (videoFormat.codecs != null) {
|
||||
mediaItemInfoBuilder.addCodecName(videoFormat.codecs);
|
||||
}
|
||||
if (videoFormat.frameRate != Format.NO_VALUE) {
|
||||
mediaItemInfoBuilder.setVideoFrameRate(videoFormat.frameRate);
|
||||
}
|
||||
@ -294,6 +297,9 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
if (audioFormat.sampleMimeType != null) {
|
||||
mediaItemInfoBuilder.addSampleMimeType(audioFormat.sampleMimeType);
|
||||
}
|
||||
if (audioFormat.codecs != null) {
|
||||
mediaItemInfoBuilder.addCodecName(audioFormat.codecs);
|
||||
}
|
||||
if (audioFormat.channelCount != Format.NO_VALUE) {
|
||||
mediaItemInfoBuilder.setAudioChannelCount(audioFormat.channelCount);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user