Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />

<application
android:name=".ScreenStreamApp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ internal class RtspStreamingService(

private var currentError: RtspError? = null
private var previousError: RtspError? = null
private var onvifServerMessagesCount: Int = 0
private var audioCaptureDisabled: Boolean = false
private var audioIssueToastShown: Boolean = false
private var resizeActor: ResizeConflateActor? = null
Expand Down Expand Up @@ -344,6 +345,7 @@ internal class RtspStreamingService(
}

server = RtspServer(
context = service,
appVersion = appVersion,
generation = ++generation,
onEvent = {
Expand Down Expand Up @@ -391,6 +393,9 @@ internal class RtspStreamingService(

is InternalEvent.RtspServer.OnStop -> server = null
is InternalEvent.RtspServer.OnClientStats -> Unit // Intentional to trigger serverClientStats update
is InternalEvent.RtspServer.OnOnvifMessageReceived -> {
this@RtspStreamingService.onvifServerMessagesCount++
}
}
}

Expand Down Expand Up @@ -546,6 +551,7 @@ internal class RtspStreamingService(
data class OnStart(override val generation: Long) : RtspServer(Priority.RECOVER_IGNORE)
data class OnStop(override val generation: Long) : RtspServer(Priority.DESTROY_IGNORE)
data class OnClientStats(override val generation: Long) : RtspServer(Priority.DESTROY_IGNORE)
data class OnOnvifMessageReceived(override val generation: Long) : RtspServer(Priority.DESTROY_IGNORE)
}

data class OnVideoFps(val fps: Int) : InternalEvent(Priority.DESTROY_IGNORE)
Expand Down Expand Up @@ -743,6 +749,7 @@ internal class RtspStreamingService(
selectedVideoEncoder = selectedVideoEncoderInfo,
selectedAudioEncoder = selectedAudioEncoderInfo,
serverClientStats = serverController?.statsSnapshot.orEmpty(),
onvifServerMessagesCount = onvifServerMessagesCount,
error = currentError
)
}
Expand Down
Loading