Skip to content

Commit 3a16a5d

Browse files
committed
WIP
1 parent ee2df68 commit 3a16a5d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/src/main/java/io/github/thibaultbee/streampack/core/elements/sources/video/camera/controllers/CameraSessionController.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ internal class CameraSessionController private constructor(
5353
private val captureSessionMutex = Mutex()
5454

5555
val isClosed: Boolean
56-
get() = isClosedFlow.value
56+
get() = isClosedFlow.value || cameraIsClosedFlow.value
5757

5858
private val requestTargetMutex = Mutex()
5959

@@ -233,7 +233,7 @@ internal class CameraSessionController private constructor(
233233
suspend fun close() {
234234
withContext(coroutineScope.coroutineContext) {
235235
captureSessionMutex.withLock {
236-
if (isClosed || cameraIsClosedFlow.value) {
236+
if (isClosed) {
237237
Logger.w(TAG, "Session already closed")
238238
return@withContext
239239
}
@@ -423,7 +423,7 @@ internal class CameraSessionController private constructor(
423423
newCaptureSession,
424424
outputs,
425425
dynamicRange,
426-
cameraIsClosedFlow,
426+
cameraDeviceController.isClosedFlow,
427427
isClosedFlow.asStateFlow()
428428
)
429429

ui/src/main/java/io/github/thibaultbee/streampack/ui/views/PreviewView.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ class PreviewView @JvmOverloads constructor(
376376
if (videoSource is IPreviewableSource) {
377377
requestSurface(size, videoSource)
378378
} else {
379-
Logger.w(TAG, "Video source is not previewable")
379+
Logger.w(TAG, "Video source is not previewable: $videoSource")
380380
}
381381
}
382382

0 commit comments

Comments
 (0)