Skip to content

Commit

Permalink
fix setlogs
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroSG94 committed Dec 17, 2021
1 parent f046e93 commit 0296571
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions rtspserver/src/main/java/com/pedro/rtspserver/RtspServer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ open class RtspServer(private val connectCheckerRtsp: ConnectCheckerRtsp,
private var thread: Thread? = null
private var user: String? = null
private var password: String? = null
private var logs = true

fun setAuth(user: String?, password: String?) {
this.user = user
Expand All @@ -60,9 +61,9 @@ open class RtspServer(private val connectCheckerRtsp: ConnectCheckerRtsp,
if (!clientSocket.isClosed) clientSocket.close()
continue
}
val client =
ServerClient(clientSocket, serverIp, port, connectCheckerRtsp, clientAddress, sps, pps, vps, sampleRate,
isStereo, videoDisabled, audioDisabled, user, password, this)
val client = ServerClient(clientSocket, serverIp, port, connectCheckerRtsp, clientAddress, sps, pps, vps,
sampleRate, isStereo, videoDisabled, audioDisabled, user, password, this)
client.rtspSender.setLogs(logs)
client.start()
synchronized(clients) {
clients.add(client)
Expand Down Expand Up @@ -117,6 +118,7 @@ open class RtspServer(private val connectCheckerRtsp: ConnectCheckerRtsp,
}

fun setLogs(enable: Boolean) {
logs = enable
synchronized(clients) {
clients.forEach { it.rtspSender.setLogs(enable) }
}
Expand Down

2 comments on commit 0296571

@ArqinT
Copy link

@ArqinT ArqinT commented on 0296571 Dec 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include this fix to new release

@pedroSG94
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will include it soon. For now, you can compile it using this gradle:

implementation 'com.github.pedroSG94:RTSP-Server:029657130d'

Please sign in to comment.