Expose codec resource ownership to host fault tests
This commit is contained in:
1 parent
d9959e5176
commit
43992bb6b3
2 files changed
+8
-2
No files matched your search
@@ -7,7 +7,7 @@ kotlin {
|
||||
kotlin.srcDir("../app/src/main/java")
|
||||
kotlin.include("android/**", "com/utun/chat/data/VideoHost.kt", "com/utun/chat/data/CallVideoPlayer.kt",
|
||||
"com/utun/chat/data/CallVideoFormat.kt", "com/utun/chat/data/StreamVideoCodec.kt", "com/utun/chat/data/H264AnnexB.kt",
|
||||
"com/utun/chat/data/StreamPreview.kt")
|
||||
"com/utun/chat/data/StreamPreview.kt", "com/utun/chat/data/VideoCodecResources.kt")
|
||||
kotlin.include("com/utun/chat/VideoHostApp.kt", "com/utun/chat/data/VideoEngineHost.kt",
|
||||
"com/utun/chat/data/CallVideoEngine.kt", "com/utun/chat/data/CallVideoBitrateRange.kt",
|
||||
"com/utun/chat/data/CallVideoCadence.kt", "com/utun/chat/data/CallVideoOrientation.kt")
|
||||
|
||||
@@ -6,9 +6,15 @@ import java.util.concurrent.ConcurrentLinkedQueue
|
||||
import java.util.concurrent.CopyOnWriteArrayList
|
||||
|
||||
class Image(val timestamp: Long = System.nanoTime()) {
|
||||
var failures = emptySet<String>()
|
||||
var closeCalls = 0
|
||||
private set
|
||||
var closed = false
|
||||
private set
|
||||
fun close() { closed = true }
|
||||
fun close() {
|
||||
closeCalls++; check("close" !in failures) { "Image close failed" }; closed = true
|
||||
check("close after" !in failures) { "Image close failed after effect" }
|
||||
}
|
||||
}
|
||||
|
||||
/** Camera2 output без графических буферов; reader/Surface остаются наблюдаемыми при отказе close. */
|
||||
|
||||
Reference in new issue
Block a user