fix(ci): resolve sanity check failures
This commit is contained in:
@@ -35,8 +35,15 @@ val extractMpvLibcxx by tasks.registering {
|
||||
outDir.deleteRecursively() // drop stale ABIs from a previous AAR version
|
||||
outDir.mkdirs()
|
||||
exec {
|
||||
commandLine("unzip", "-q", "-o", aar.absolutePath,
|
||||
"jni/*/libc++_shared.so", "-d", outDir.absolutePath)
|
||||
commandLine(
|
||||
"unzip",
|
||||
"-q",
|
||||
"-o",
|
||||
aar.absolutePath,
|
||||
"jni/*/libc++_shared.so",
|
||||
"-d",
|
||||
outDir.absolutePath
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ class MainActivity : FlutterActivity() {
|
||||
// Actual process bitness: low-end TV boxes often run 32-bit userspace.
|
||||
"is64Bit" to Process.is64Bit(),
|
||||
"isLowRamDevice" to activityManager.isLowRamDevice,
|
||||
"totalMemBytes" to memoryInfo.totalMem,
|
||||
"totalMemBytes" to memoryInfo.totalMem
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+50
-17
@@ -94,7 +94,8 @@ class AudioNormalizationEffect(private val log: (String, String, String) -> Unit
|
||||
@RequiresApi(28)
|
||||
private fun tryDynamicsProcessing(sessionId: Int, channelCount: Int): Boolean = try {
|
||||
val band = DynamicsProcessing.MbcBand(
|
||||
/* inUse = */ true,
|
||||
// inUse
|
||||
true,
|
||||
MBC_CUTOFF_HZ,
|
||||
MBC_ATTACK_MS,
|
||||
MBC_RELEASE_MS,
|
||||
@@ -103,27 +104,49 @@ class AudioNormalizationEffect(private val log: (String, String, String) -> Unit
|
||||
MBC_KNEE_DB,
|
||||
MBC_NOISE_GATE_DB,
|
||||
MBC_EXPANDER_RATIO,
|
||||
/* preGain = */ 0f,
|
||||
// preGain
|
||||
0f,
|
||||
MBC_POST_GAIN_DB
|
||||
)
|
||||
val mbc = DynamicsProcessing.Mbc(/* inUse = */ true, /* enabled = */ true, /* bandCount = */ 1)
|
||||
.apply { setBand(0, band) }
|
||||
val mbc = DynamicsProcessing.Mbc(
|
||||
// inUse
|
||||
true,
|
||||
// enabled
|
||||
true,
|
||||
// bandCount
|
||||
1
|
||||
).apply { setBand(0, band) }
|
||||
val limiter = DynamicsProcessing.Limiter(
|
||||
/* inUse = */ true,
|
||||
/* enabled = */ true,
|
||||
/* linkGroup = */ 0,
|
||||
// inUse
|
||||
true,
|
||||
// enabled
|
||||
true,
|
||||
// linkGroup
|
||||
0,
|
||||
LIMITER_ATTACK_MS,
|
||||
LIMITER_RELEASE_MS,
|
||||
LIMITER_RATIO,
|
||||
LIMITER_THRESHOLD_DB,
|
||||
/* postGain = */ 0f
|
||||
// postGain
|
||||
0f
|
||||
)
|
||||
val channel = DynamicsProcessing.Channel(
|
||||
/* inputGain = */ 0f,
|
||||
/* preEqInUse = */ false, /* preEqBandCount = */ 0,
|
||||
/* mbcInUse = */ true, /* mbcBandCount = */ 1,
|
||||
/* postEqInUse = */ false, /* postEqBandCount = */ 0,
|
||||
/* limiterInUse = */ true
|
||||
// inputGain
|
||||
0f,
|
||||
// preEqInUse
|
||||
false,
|
||||
// preEqBandCount
|
||||
0,
|
||||
// mbcInUse
|
||||
true,
|
||||
// mbcBandCount
|
||||
1,
|
||||
// postEqInUse
|
||||
false,
|
||||
// postEqBandCount
|
||||
0,
|
||||
// limiterInUse
|
||||
true
|
||||
).apply {
|
||||
setMbc(mbc)
|
||||
setLimiter(limiter)
|
||||
@@ -131,10 +154,20 @@ class AudioNormalizationEffect(private val log: (String, String, String) -> Unit
|
||||
val config = DynamicsProcessing.Config.Builder(
|
||||
DynamicsProcessing.VARIANT_FAVOR_FREQUENCY_RESOLUTION,
|
||||
channelCount,
|
||||
/* preEqInUse = */ false, /* preEqBandCount = */ 0,
|
||||
/* mbcInUse = */ true, /* mbcBandCount = */ 1,
|
||||
/* postEqInUse = */ false, /* postEqBandCount = */ 0,
|
||||
/* limiterInUse = */ true
|
||||
// preEqInUse
|
||||
false,
|
||||
// preEqBandCount
|
||||
0,
|
||||
// mbcInUse
|
||||
true,
|
||||
// mbcBandCount
|
||||
1,
|
||||
// postEqInUse
|
||||
false,
|
||||
// postEqBandCount
|
||||
0,
|
||||
// limiterInUse
|
||||
true
|
||||
)
|
||||
.setPreferredFrameDuration(FRAME_DURATION_MS)
|
||||
.setAllChannelsTo(channel)
|
||||
|
||||
@@ -2140,8 +2140,7 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
}
|
||||
|
||||
/** True when [format] is an ASS/SSA subtitle track (rendered by libass). */
|
||||
private fun isAssSubtitleFormat(format: Format): Boolean =
|
||||
format.sampleMimeType == MimeTypes.TEXT_SSA || format.codecs == MimeTypes.TEXT_SSA
|
||||
private fun isAssSubtitleFormat(format: Format): Boolean = format.sampleMimeType == MimeTypes.TEXT_SSA || format.codecs == MimeTypes.TEXT_SSA
|
||||
|
||||
/** Sets the ASS-subtitles tunneling block; returns true when the flag changed. */
|
||||
private fun updateAssSubtitlesForTunneling(assActive: Boolean): Boolean {
|
||||
@@ -2150,15 +2149,19 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
emitLog(
|
||||
"info",
|
||||
"tunneling",
|
||||
if (assActive) "ASS subtitle track selected: tunneling DISABLED (frame metadata required for libass)"
|
||||
else "ASS subtitle track deselected: tunneling unblocked"
|
||||
if (assActive) {
|
||||
"ASS subtitle track selected: tunneling DISABLED (frame metadata required for libass)"
|
||||
} else {
|
||||
"ASS subtitle track deselected: tunneling unblocked"
|
||||
}
|
||||
)
|
||||
return true
|
||||
}
|
||||
|
||||
private fun evaluateAssSubtitlesForTunneling(tracks: Tracks) {
|
||||
val assSelected = tracks.groups.any { group ->
|
||||
group.type == C.TRACK_TYPE_TEXT && group.isSelected &&
|
||||
group.type == C.TRACK_TYPE_TEXT &&
|
||||
group.isSelected &&
|
||||
(0 until group.length).any { isAssSubtitleFormat(group.getTrackFormat(it)) }
|
||||
}
|
||||
updateAssSubtitlesForTunneling(assSelected)
|
||||
@@ -2212,8 +2215,12 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
private fun calculateTunnelingEnabled(): Boolean? {
|
||||
val player = exoPlayer ?: return null
|
||||
val audioDelayActive = (renderersFactory?.audioDelayUs?.get() ?: 0L) != 0L
|
||||
return tunnelingUserEnabled && (player.playbackParameters.speed == 1f) && !tunnelingDisabledForCodec &&
|
||||
!tunnelingDisabledForAssSubtitles && !audioDelayActive && !audioNormalizationEnabled
|
||||
return tunnelingUserEnabled &&
|
||||
(player.playbackParameters.speed == 1f) &&
|
||||
!tunnelingDisabledForCodec &&
|
||||
!tunnelingDisabledForAssSubtitles &&
|
||||
!audioDelayActive &&
|
||||
!audioNormalizationEnabled
|
||||
}
|
||||
|
||||
private fun updateCurrentTunnelingState(reason: String, shouldTunnel: Boolean): Boolean {
|
||||
@@ -2691,7 +2698,9 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
val tunnelingWillFlip = calculateTunnelingEnabled() != currentTunneledPlayback
|
||||
val outputEncoding = lastAudioTrackConfig?.encoding
|
||||
val selectedMime = selectedAudioFormat()?.sampleMimeType
|
||||
val needsBounce = !tunnelingWillFlip && outputEncoding != null && selectedMime != null &&
|
||||
val needsBounce = !tunnelingWillFlip &&
|
||||
outputEncoding != null &&
|
||||
selectedMime != null &&
|
||||
isEncodedAudioMimeType(selectedMime) &&
|
||||
(if (enabled) !isPcmEncoding(outputEncoding) else isPcmEncoding(outputEncoding))
|
||||
if (needsBounce) {
|
||||
|
||||
@@ -217,8 +217,8 @@ static int truncationLogCounter = 0;
|
||||
// On changed == 0, returns (0, 0, 0, changed, 0) without touching the buffers —
|
||||
// caller reuses the atlas texture already on the GPU.
|
||||
JNIEXPORT jobject JNICALL Java_com_edde746_plezy_libass_AssRender_nativeAssRenderFrameAtlas(
|
||||
JNIEnv* env, jclass clazz, jlong render, jlong track, jlong time, jobject atlasBuf, jint atlasMaxW,
|
||||
jint atlasMaxH, jobject vertexBuf) {
|
||||
JNIEnv* env, jclass clazz, jlong render, jlong track, jlong time, jobject atlasBuf, jint atlasMaxW, jint atlasMaxH,
|
||||
jobject vertexBuf) {
|
||||
if (!render || !track || !atlasBuf || !vertexBuf || atlasMaxW <= 0 || atlasMaxH <= 0) return NULL;
|
||||
|
||||
jclass atlasFrameClass = (*env)->FindClass(env, "com/edde746/plezy/libass/AssAtlasFrame");
|
||||
@@ -317,8 +317,8 @@ JNIEXPORT jobject JNICALL Java_com_edde746_plezy_libass_AssRender_nativeAssRende
|
||||
|
||||
if (truncated > 0 && (truncationLogCounter++ & 63) == 0) {
|
||||
__android_log_print(
|
||||
ANDROID_LOG_WARN, LOG_TAG, "atlas truncation: %d of %d images dropped (atlas %dx%d, %d quads max)",
|
||||
truncated, n, atlasMaxW, atlasMaxH, maxQuads);
|
||||
ANDROID_LOG_WARN, LOG_TAG, "atlas truncation: %d of %d images dropped (atlas %dx%d, %d quads max)", truncated,
|
||||
n, atlasMaxW, atlasMaxH, maxQuads);
|
||||
}
|
||||
if (accepted == 0) {
|
||||
free(items);
|
||||
|
||||
+2
-1
@@ -230,7 +230,8 @@ class SpecRenderEngineTest {
|
||||
h.script.add(changed())
|
||||
val first = h.engine.service(0, pinned = true) as SpecRenderEngine.Outcome.Post
|
||||
var pts = 0L
|
||||
repeat(4) { // build cadence; renders return changed for simplicity
|
||||
repeat(4) {
|
||||
// build cadence; renders return changed for simplicity
|
||||
pts += DELTA
|
||||
h.engine.service(pts, pinned = true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user