mirror of
https://github.com/androidx/media.git
synced 2025-05-06 23:20:42 +08:00
Fix method name to return all encode-able MIME types
PiperOrigin-RevId: 495093939
This commit is contained in:
parent
395cf4debc
commit
b1425aa6f4
@ -27,6 +27,7 @@ import android.util.Pair;
|
||||
import android.util.Range;
|
||||
import android.util.Size;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.media3.common.MimeTypes;
|
||||
import androidx.media3.common.util.Util;
|
||||
import androidx.media3.transformer.AndroidTestUtil;
|
||||
import androidx.media3.transformer.EncoderUtil;
|
||||
@ -34,6 +35,7 @@ import androidx.test.core.app.ApplicationProvider;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Iterables;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@ -86,7 +88,9 @@ public class EncoderCapabilityAnalysisTest {
|
||||
|
||||
@Test
|
||||
public void logEncoderCapabilities() throws Exception {
|
||||
ImmutableSet<String> supportedVideoMimeTypes = EncoderUtil.getSupportedVideoMimeTypes();
|
||||
ImmutableSet<String> supportedVideoMimeTypes =
|
||||
ImmutableSet.copyOf(
|
||||
Iterables.filter(EncoderUtil.getSupportedMimeTypes(), MimeTypes::isVideo));
|
||||
|
||||
// Map from MIME type to a list of maps from capability name to value.
|
||||
LinkedHashMap<String, List<Map<String, Object>>> mimeTypeToEncoderInfo = new LinkedHashMap<>();
|
||||
|
@ -66,8 +66,8 @@ public final class EncoderUtil {
|
||||
return ImmutableList.copyOf(mimeTypeToEncoders.get(Ascii.toLowerCase(mimeType)));
|
||||
}
|
||||
|
||||
/** Returns a list of video {@linkplain MimeTypes MIME types} that can be encoded. */
|
||||
public static synchronized ImmutableSet<String> getSupportedVideoMimeTypes() {
|
||||
/** Returns a list of {@linkplain MimeTypes MIME types} that can be encoded. */
|
||||
public static synchronized ImmutableSet<String> getSupportedMimeTypes() {
|
||||
maybePopulateEncoderInfo();
|
||||
return ImmutableSet.copyOf(mimeTypeToEncoders.keySet());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user