32
32
import java .util .Set ;
33
33
import org .chromium .base .annotations .CalledByNative ;
34
34
import org .chromium .base .annotations .JNINamespace ;
35
- import org .chromium .base .annotations .NativeMethods ;
36
35
37
36
/** Utility functions for dealing with MediaCodec related things. */
38
37
@ JNINamespace ("starboard::android::shared" )
@@ -551,8 +550,7 @@ public static boolean isSoftwareDecoder(MediaCodecInfo codecInfo) {
551
550
}
552
551
553
552
/**
554
- * The same as hasVideoDecoderFor, returns the name of the video decoder if it is found, or ""
555
- * otherwise.
553
+ * Returns the name of the video decoder if it is found, or "" otherwise.
556
554
*
557
555
* <p>NOTE: This code path is called repeatedly by the player to determine the decoding
558
556
* capabilities of the device. To ensure speedy playback the code below should be kept performant.
@@ -736,10 +734,7 @@ public static String findVideoDecoder(
736
734
return "" ;
737
735
}
738
736
739
- /**
740
- * The same as hasAudioDecoderFor, only return the name of the audio decoder if it is found, and
741
- * "" otherwise.
742
- */
737
+ /** Return the name of the audio decoder if it is found, and "" otherwise. */
743
738
@ CalledByNative
744
739
public static String findAudioDecoder (String mimeType , int bitrate ) {
745
740
// Note: MediaCodecList is sorted by the framework such that the best decoders come first.
@@ -752,8 +747,10 @@ public static String findAudioDecoder(String mimeType, int bitrate) {
752
747
continue ;
753
748
}
754
749
String name = info .getName ();
755
- MediaCodecInfo .CodecCapabilities codecCapabilities = info .getCapabilitiesForType (supportedType );
756
- MediaCodecInfo .AudioCapabilities audioCapabilities = codecCapabilities .getAudioCapabilities ();
750
+ MediaCodecInfo .CodecCapabilities codecCapabilities =
751
+ info .getCapabilitiesForType (supportedType );
752
+ MediaCodecInfo .AudioCapabilities audioCapabilities =
753
+ codecCapabilities .getAudioCapabilities ();
757
754
Range <Integer > bitrateRange =
758
755
Range .create (0 , audioCapabilities .getBitrateRange ().getUpper ());
759
756
if (!bitrateRange .contains (bitrate )) {
0 commit comments