mirror of
https://github.com/androidx/media.git
synced 2025-05-09 16:40:55 +08:00
Cleanup for merged pull requests
This commit is contained in:
parent
b127e162b6
commit
757999758b
@ -59,7 +59,7 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const int kBytesPerSample = 2; // opus fixed point uses 16 bit samples.
|
static const int kBytesPerSample = 2; // opus fixed point uses 16 bit samples.
|
||||||
static const int kMaxOpusOutputPacketSizeSamples = 960 * 6;// Maximum packet size used in Xiph's opusdec.
|
static const int kMaxOpusOutputPacketSizeSamples = 960 * 6;
|
||||||
static int channelCount;
|
static int channelCount;
|
||||||
static int errorCode;
|
static int errorCode;
|
||||||
|
|
||||||
|
@ -339,7 +339,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String codecName = decoderInfo.name;
|
String codecName = decoderInfo.name;
|
||||||
codecIsAdaptive = decoderInfo.adaptive && (codecNeedsDisableAdaptationWorkaround(codecName)==false);
|
codecIsAdaptive = decoderInfo.adaptive && !codecNeedsDisableAdaptationWorkaround(codecName);
|
||||||
codecNeedsDiscardToSpsWorkaround = codecNeedsDiscardToSpsWorkaround(codecName, format);
|
codecNeedsDiscardToSpsWorkaround = codecNeedsDiscardToSpsWorkaround(codecName, format);
|
||||||
codecNeedsFlushWorkaround = codecNeedsFlushWorkaround(codecName);
|
codecNeedsFlushWorkaround = codecNeedsFlushWorkaround(codecName);
|
||||||
codecNeedsAdaptationWorkaround = codecNeedsAdaptationWorkaround(codecName);
|
codecNeedsAdaptationWorkaround = codecNeedsAdaptationWorkaround(codecName);
|
||||||
@ -1179,7 +1179,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
|
|||||||
*
|
*
|
||||||
* @param name The decoder name.
|
* @param name The decoder name.
|
||||||
* @param format The input format.
|
* @param format The input format.
|
||||||
* @return True if the device is known to set the number of audio channels in the output format
|
* @return True if the decoder is known to set the number of audio channels in the output format
|
||||||
* to 2 for the given input format, whilst only actually outputting a single channel. False
|
* to 2 for the given input format, whilst only actually outputting a single channel. False
|
||||||
* otherwise.
|
* otherwise.
|
||||||
*/
|
*/
|
||||||
@ -1187,17 +1187,19 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
|
|||||||
return Util.SDK_INT <= 18 && format.channelCount == 1
|
return Util.SDK_INT <= 18 && format.channelCount == 1
|
||||||
&& "OMX.MTK.AUDIO.DECODER.MP3".equals(name);
|
&& "OMX.MTK.AUDIO.DECODER.MP3".equals(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether the decoder is needs Apaptive workaround disabled
|
* Returns whether the decoder is known to fail when adapting, despite advertising itself as an
|
||||||
|
* adaptive decoder.
|
||||||
* <p>
|
* <p>
|
||||||
* If TRUE is returned then we explicitly override codecIsAdaptive,
|
* If true is returned then we explicitly disable adaptation for the decoder.
|
||||||
* setting it to false.
|
*
|
||||||
* @param name The decoder name.
|
* @param name The decoder name.
|
||||||
* @return TRUE if the device needs Adaptive workaround disabled
|
* @return True if the decoder is known to fail when adapting.
|
||||||
*/
|
*/
|
||||||
private static boolean codecNeedsDisableAdaptationWorkaround(String name) {
|
private static boolean codecNeedsDisableAdaptationWorkaround(String name) {
|
||||||
return (
|
return Util.SDK_INT <= 19 && Util.MODEL.equals("ODROID-XU3")
|
||||||
(Util.SDK_INT <= 19 && Util.MODEL.equals("ODROID-XU3")
|
&& ("OMX.Exynos.AVC.Decoder".equals(name) || "OMX.Exynos.AVC.Decoder.secure".equals(name));
|
||||||
&& ("OMX.Exynos.AVC.Decoder".equals(name) || "OMX.Exynos.AVC.Decoder.secure".equals(name))));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user