diff --git a/README.md b/README.md index 115d32b..64bdd86 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ allprojects { } } dependencies { - implementation 'com.github.pedroSG94:RTSP-Server:1.3.0' - implementation 'com.github.pedroSG94.RootEncoder:library:2.4.6' + implementation 'com.github.pedroSG94:RTSP-Server:1.3.1' + implementation 'com.github.pedroSG94.RootEncoder:library:2.5.0' } ``` diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 282b49b..f6e85ef 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,11 +1,11 @@ [versions] libraryGroup = "com.github.pedroSG94" -versionCode = "130" -versionName = "1.3.0" +versionCode = "131" +versionName = "1.3.1" #plugins versions -agp = "8.5.0" -kotlin = "2.0.0" +agp = "8.5.2" +kotlin = "2.0.20" dokka = "1.9.20" #dependencies versions @@ -13,7 +13,7 @@ dokka = "1.9.20" appcompat = "1.6.1" constraintlayout = "2.1.4" coroutines = "1.8.1" -rootencoder = "2.4.6" +rootencoder = "2.5.0" [libraries] androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" } diff --git a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerCamera1.kt b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerCamera1.kt index b483aff..02b6005 100644 --- a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerCamera1.kt +++ b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerCamera1.kt @@ -45,30 +45,30 @@ class RtspServerCamera1: Camera1Base { rtspServer.startServer() } - override fun prepareAudioRtp(isStereo: Boolean, sampleRate: Int) { + override fun onAudioInfoImp(isStereo: Boolean, sampleRate: Int) { rtspServer.setAudioInfo(sampleRate, isStereo) } - override fun startStreamRtp(url: String) { //unused + override fun startStreamImp(url: String?) { //unused } - override fun stopStreamRtp() { + override fun stopStreamImp() { rtspServer.stopServer() } - override fun getAacDataRtp(aacBuffer: ByteBuffer, info: MediaCodec.BufferInfo) { - rtspServer.sendAudio(aacBuffer, info) + override fun getAudioDataImp(audioBuffer: ByteBuffer, info: MediaCodec.BufferInfo) { + rtspServer.sendAudio(audioBuffer, info) } - override fun onSpsPpsVpsRtp(sps: ByteBuffer, pps: ByteBuffer?, vps: ByteBuffer?) { + override fun onVideoInfoImp(sps: ByteBuffer, pps: ByteBuffer?, vps: ByteBuffer?) { val newSps = sps.duplicate() val newPps = pps?.duplicate() val newVps = vps?.duplicate() rtspServer.setVideoInfo(newSps, newPps, newVps) } - override fun getH264DataRtp(h264Buffer: ByteBuffer, info: MediaCodec.BufferInfo) { - rtspServer.sendVideo(h264Buffer, info) + override fun getVideoDataImp(videoBuffer: ByteBuffer, info: MediaCodec.BufferInfo) { + rtspServer.sendVideo(videoBuffer, info) } override fun getStreamClient(): RtspServerStreamClient = RtspServerStreamClient(rtspServer) diff --git a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerCamera2.kt b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerCamera2.kt index 37750b4..495389f 100644 --- a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerCamera2.kt +++ b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerCamera2.kt @@ -22,7 +22,7 @@ class RtspServerCamera2: Camera2Base { rtspServer = RtspServer(connectChecker, port) } - constructor(context: Context, useOpengl: Boolean, connectCheckerRtsp: ConnectChecker, port: Int): super(context, useOpengl) { + constructor(context: Context, connectCheckerRtsp: ConnectChecker, port: Int): super(context) { rtspServer = RtspServer(connectCheckerRtsp, port) } @@ -31,30 +31,30 @@ class RtspServerCamera2: Camera2Base { rtspServer.startServer() } - override fun prepareAudioRtp(isStereo: Boolean, sampleRate: Int) { + override fun onAudioInfoImp(isStereo: Boolean, sampleRate: Int) { rtspServer.setAudioInfo(sampleRate, isStereo) } - override fun startStreamRtp(url: String) { //unused + override fun startStreamImp(url: String?) { //unused } - override fun stopStreamRtp() { + override fun stopStreamImp() { rtspServer.stopServer() } - override fun getAacDataRtp(aacBuffer: ByteBuffer, info: MediaCodec.BufferInfo) { - rtspServer.sendAudio(aacBuffer, info) + override fun getAudioDataImp(audioBuffer: ByteBuffer, info: MediaCodec.BufferInfo) { + rtspServer.sendAudio(audioBuffer, info) } - override fun onSpsPpsVpsRtp(sps: ByteBuffer, pps: ByteBuffer?, vps: ByteBuffer?) { + override fun onVideoInfoImp(sps: ByteBuffer, pps: ByteBuffer?, vps: ByteBuffer?) { val newSps = sps.duplicate() val newPps = pps?.duplicate() val newVps = vps?.duplicate() rtspServer.setVideoInfo(newSps, newPps, newVps) } - override fun getH264DataRtp(h264Buffer: ByteBuffer, info: MediaCodec.BufferInfo) { - rtspServer.sendVideo(h264Buffer, info) + override fun getVideoDataImp(videoBuffer: ByteBuffer, info: MediaCodec.BufferInfo) { + rtspServer.sendVideo(videoBuffer, info) } override fun getStreamClient(): RtspServerStreamClient = RtspServerStreamClient(rtspServer) diff --git a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerDisplay.kt b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerDisplay.kt index 33cec3c..af2a857 100644 --- a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerDisplay.kt +++ b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerDisplay.kt @@ -25,30 +25,30 @@ class RtspServerDisplay( rtspServer.startServer() } - override fun prepareAudioRtp(isStereo: Boolean, sampleRate: Int) { + override fun onAudioInfoImp(isStereo: Boolean, sampleRate: Int) { rtspServer.setAudioInfo(sampleRate, isStereo) } - override fun startStreamRtp(url: String) { //unused + override fun startStreamImp(url: String?) { //unused } - override fun stopStreamRtp() { + override fun stopStreamImp() { rtspServer.stopServer() } - override fun getAacDataRtp(aacBuffer: ByteBuffer, info: MediaCodec.BufferInfo) { - rtspServer.sendAudio(aacBuffer, info) + override fun getAudioDataImp(audioBuffer: ByteBuffer, info: MediaCodec.BufferInfo) { + rtspServer.sendAudio(audioBuffer, info) } - override fun onSpsPpsVpsRtp(sps: ByteBuffer, pps: ByteBuffer?, vps: ByteBuffer?) { + override fun onVideoInfoImp(sps: ByteBuffer, pps: ByteBuffer?, vps: ByteBuffer?) { val newSps = sps.duplicate() val newPps = pps?.duplicate() val newVps = vps?.duplicate() rtspServer.setVideoInfo(newSps, newPps, newVps) } - override fun getH264DataRtp(h264Buffer: ByteBuffer, info: MediaCodec.BufferInfo) { - rtspServer.sendVideo(h264Buffer, info) + override fun getVideoDataImp(videoBuffer: ByteBuffer, info: MediaCodec.BufferInfo) { + rtspServer.sendVideo(videoBuffer, info) } override fun getStreamClient(): RtspServerStreamClient = RtspServerStreamClient(rtspServer) diff --git a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerFromFile.kt b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerFromFile.kt index 458187b..c143afd 100644 --- a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerFromFile.kt +++ b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerFromFile.kt @@ -39,30 +39,30 @@ class RtspServerFromFile: FromFileBase { rtspServer.startServer() } - override fun prepareAudioRtp(isStereo: Boolean, sampleRate: Int) { + override fun onAudioInfoImp(isStereo: Boolean, sampleRate: Int) { rtspServer.setAudioInfo(sampleRate, isStereo) } - override fun startStreamRtp(url: String) { //unused + override fun startStreamImp(url: String?) { //unused } - override fun stopStreamRtp() { + override fun stopStreamImp() { rtspServer.stopServer() } - override fun getAacDataRtp(aacBuffer: ByteBuffer, info: MediaCodec.BufferInfo) { - rtspServer.sendAudio(aacBuffer, info) + override fun getAudioDataImp(audioBuffer: ByteBuffer, info: MediaCodec.BufferInfo) { + rtspServer.sendAudio(audioBuffer, info) } - override fun onSpsPpsVpsRtp(sps: ByteBuffer, pps: ByteBuffer?, vps: ByteBuffer?) { + override fun onVideoInfoImp(sps: ByteBuffer, pps: ByteBuffer?, vps: ByteBuffer?) { val newSps = sps.duplicate() val newPps = pps?.duplicate() val newVps = vps?.duplicate() rtspServer.setVideoInfo(newSps, newPps, newVps) } - override fun getH264DataRtp(h264Buffer: ByteBuffer, info: MediaCodec.BufferInfo) { - rtspServer.sendVideo(h264Buffer, info) + override fun getVideoDataImp(videoBuffer: ByteBuffer, info: MediaCodec.BufferInfo) { + rtspServer.sendVideo(videoBuffer, info) } override fun getStreamClient(): RtspServerStreamClient = RtspServerStreamClient(rtspServer) diff --git a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerOnlyAudio.kt b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerOnlyAudio.kt index 8432ca7..df74123 100644 --- a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerOnlyAudio.kt +++ b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerOnlyAudio.kt @@ -24,19 +24,19 @@ class RtspServerOnlyAudio( rtspServer.startServer() } - override fun prepareAudioRtp(isStereo: Boolean, sampleRate: Int) { + override fun onAudioInfoImp(isStereo: Boolean, sampleRate: Int) { rtspServer.setAudioInfo(sampleRate, isStereo) } - override fun startStreamRtp(url: String) { //unused + override fun startStreamImp(url: String?) { //unused } - override fun stopStreamRtp() { + override fun stopStreamImp() { rtspServer.stopServer() } - override fun getAacDataRtp(aacBuffer: ByteBuffer, info: MediaCodec.BufferInfo) { - rtspServer.sendAudio(aacBuffer, info) + override fun getAudioDataImp(audioBuffer: ByteBuffer, info: MediaCodec.BufferInfo) { + rtspServer.sendAudio(audioBuffer, info) } override fun getStreamClient(): RtspServerStreamClient = RtspServerStreamClient(rtspServer) diff --git a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerStream.kt b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerStream.kt index 9bd0c88..90ecf98 100644 --- a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerStream.kt +++ b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerStream.kt @@ -35,30 +35,30 @@ class RtspServerStream( rtspServer.startServer() } - override fun audioInfo(sampleRate: Int, isStereo: Boolean) { + override fun onAudioInfoImp(sampleRate: Int, isStereo: Boolean) { rtspServer.setAudioInfo(sampleRate, isStereo) } - override fun rtpStartStream(endPoint: String) { //unused + override fun startStreamImp(endPoint: String) { //unused } - override fun rtpStopStream() { + override fun stopStreamImp() { rtspServer.stopServer() } - override fun getAacDataRtp(aacBuffer: ByteBuffer, info: MediaCodec.BufferInfo) { - rtspServer.sendAudio(aacBuffer, info) + override fun getAudioDataImp(audioBuffer: ByteBuffer, info: MediaCodec.BufferInfo) { + rtspServer.sendAudio(audioBuffer, info) } - override fun onSpsPpsVpsRtp(sps: ByteBuffer, pps: ByteBuffer?, vps: ByteBuffer?) { + override fun onVideoInfoImp(sps: ByteBuffer, pps: ByteBuffer?, vps: ByteBuffer?) { val newSps = sps.duplicate() val newPps = pps?.duplicate() val newVps = vps?.duplicate() rtspServer.setVideoInfo(newSps, newPps, newVps) } - override fun getH264DataRtp(h264Buffer: ByteBuffer, info: MediaCodec.BufferInfo) { - rtspServer.sendVideo(h264Buffer, info) + override fun getVideoDataImp(videoBuffer: ByteBuffer, info: MediaCodec.BufferInfo) { + rtspServer.sendVideo(videoBuffer, info) } override fun getStreamClient(): RtspServerStreamClient = RtspServerStreamClient(rtspServer)