mirror of
https://github.com/samsonjs/media.git
synced 2026-04-06 11:25:46 +00:00
Fix method name to return all encode-able MIME types
PiperOrigin-RevId: 495093939
This commit is contained in:
parent
7de47fe2a1
commit
42f0850fa5
2 changed files with 7 additions and 3 deletions
|
|
@ -31,9 +31,11 @@ import androidx.test.core.app.ApplicationProvider;
|
|||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import com.google.android.exoplayer2.transformer.AndroidTestUtil;
|
||||
import com.google.android.exoplayer2.transformer.EncoderUtil;
|
||||
import com.google.android.exoplayer2.util.MimeTypes;
|
||||
import com.google.android.exoplayer2.util.Util;
|
||||
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<>();
|
||||
|
|
|
|||
|
|
@ -64,8 +64,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…
Reference in a new issue