From 32e281392cd0cd2bd3503dd696b44b1218ecb54f Mon Sep 17 00:00:00 2001 From: pedro Date: Wed, 21 Jul 2021 09:54:14 +0200 Subject: [PATCH] update library --- README.md | 4 ++-- app/build.gradle | 6 +++--- app/src/main/java/com/pedro/sample/CameraDemoActivity.kt | 3 +++ build.gradle | 4 ++-- rtspserver/build.gradle | 6 +++--- .../src/main/java/com/pedro/rtspserver/RtspServerCamera1.kt | 6 +++--- .../src/main/java/com/pedro/rtspserver/RtspServerCamera2.kt | 6 +++--- .../src/main/java/com/pedro/rtspserver/RtspServerDisplay.kt | 6 +++--- .../main/java/com/pedro/rtspserver/RtspServerFromFile.kt | 6 +++--- .../main/java/com/pedro/rtspserver/RtspServerOnlyAudio.kt | 6 +++--- 10 files changed, 28 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 5cf7fb5..d2831fc 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ allprojects { } } dependencies { - implementation 'com.github.pedroSG94:RTSP-Server:1.0.8' - implementation 'com.github.pedroSG94.rtmp-rtsp-stream-client-java:rtplibrary:2.0.2' + implementation 'com.github.pedroSG94:RTSP-Server:1.0.9' + implementation 'com.github.pedroSG94.rtmp-rtsp-stream-client-java:rtplibrary:2.0.5' } ``` diff --git a/app/build.gradle b/app/build.gradle index 7637ede..6cd2259 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "com.pedro.sample" minSdkVersion 16 targetSdkVersion 30 - versionCode 108 - versionName "1.0.8" + versionCode 109 + versionName "1.0.9" } buildTypes { release { @@ -22,7 +22,7 @@ android { dependencies { implementation project(':rtspserver') - implementation 'com.github.pedroSG94.rtmp-rtsp-stream-client-java:rtplibrary:2.0.2' + implementation 'com.github.pedroSG94.rtmp-rtsp-stream-client-java:rtplibrary:2.0.5' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'androidx.appcompat:appcompat:1.3.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' diff --git a/app/src/main/java/com/pedro/sample/CameraDemoActivity.kt b/app/src/main/java/com/pedro/sample/CameraDemoActivity.kt index 240725b..1f9c74d 100644 --- a/app/src/main/java/com/pedro/sample/CameraDemoActivity.kt +++ b/app/src/main/java/com/pedro/sample/CameraDemoActivity.kt @@ -60,6 +60,9 @@ class CameraDemoActivity : AppCompatActivity(), ConnectCheckerRtsp, View.OnClick } } + override fun onConnectionStartedRtsp(rtspUrl: String) { + } + override fun onDisconnectRtsp() { runOnUiThread { Toast.makeText(this@CameraDemoActivity, "Disconnected", Toast.LENGTH_SHORT).show() diff --git a/build.gradle b/build.gradle index 29b1f61..9471138 100644 --- a/build.gradle +++ b/build.gradle @@ -1,14 +1,14 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.5.0' + ext.kotlin_version = '1.5.20' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.2.1' + classpath 'com.android.tools.build:gradle:4.2.2' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong diff --git a/rtspserver/build.gradle b/rtspserver/build.gradle index 555d75d..6db39e8 100644 --- a/rtspserver/build.gradle +++ b/rtspserver/build.gradle @@ -9,8 +9,8 @@ android { defaultConfig { minSdkVersion 16 targetSdkVersion 30 - versionCode 108 - versionName "1.0.8" + versionCode 109 + versionName "1.0.9" } buildTypes { @@ -24,5 +24,5 @@ android { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'com.github.pedroSG94.rtmp-rtsp-stream-client-java:rtplibrary:2.0.2' + implementation 'com.github.pedroSG94.rtmp-rtsp-stream-client-java:rtplibrary:2.0.5' } diff --git a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerCamera1.kt b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerCamera1.kt index e05ba85..3d2a78a 100644 --- a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerCamera1.kt +++ b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerCamera1.kt @@ -107,14 +107,14 @@ class RtspServerCamera1 : Camera1Base { override fun shouldRetry(reason: String?): Boolean = false - override fun reConnect(delay: Long) { - } - override fun hasCongestion(): Boolean = rtspServer.hasCongestion() override fun setReTries(reTries: Int) { } + override fun reConnect(delay: Long, backupUrl: String?) { + } + override fun getCacheSize(): Int = 0 override fun getSentAudioFrames(): Long = 0 diff --git a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerCamera2.kt b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerCamera2.kt index 1917d55..96965f0 100644 --- a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerCamera2.kt +++ b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerCamera2.kt @@ -90,14 +90,14 @@ class RtspServerCamera2 : Camera2Base { override fun shouldRetry(reason: String?): Boolean = false - override fun reConnect(delay: Long) { - } - override fun hasCongestion(): Boolean = rtspServer.hasCongestion() override fun setReTries(reTries: Int) { } + override fun reConnect(delay: Long, backupUrl: String?) { + } + override fun getCacheSize(): Int = 0 override fun getSentAudioFrames(): Long = 0 diff --git a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerDisplay.kt b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerDisplay.kt index 10aa2a4..58432c3 100644 --- a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerDisplay.kt +++ b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerDisplay.kt @@ -75,14 +75,14 @@ class RtspServerDisplay(context: Context, useOpengl: Boolean, override fun shouldRetry(reason: String?): Boolean = false - override fun reConnect(delay: Long) { - } - override fun hasCongestion(): Boolean = rtspServer.hasCongestion() override fun setReTries(reTries: Int) { } + override fun reConnect(delay: Long, backupUrl: String?) { + } + override fun getCacheSize(): Int = 0 override fun getSentAudioFrames(): Long = 0 diff --git a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerFromFile.kt b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerFromFile.kt index 7f87bd2..2d3dbb0 100644 --- a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerFromFile.kt +++ b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerFromFile.kt @@ -98,14 +98,14 @@ class RtspServerFromFile : FromFileBase { override fun shouldRetry(reason: String?): Boolean = false - override fun reConnect(delay: Long) { - } - override fun hasCongestion(): Boolean = rtspServer.hasCongestion() override fun setReTries(reTries: Int) { } + override fun reConnect(delay: Long, backupUrl: String?) { + } + override fun getCacheSize(): Int = 0 override fun getSentAudioFrames(): Long = 0 diff --git a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerOnlyAudio.kt b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerOnlyAudio.kt index fca88ee..cec77c6 100644 --- a/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerOnlyAudio.kt +++ b/rtspserver/src/main/java/com/pedro/rtspserver/RtspServerOnlyAudio.kt @@ -58,14 +58,14 @@ class RtspServerOnlyAudio(connectCheckerRtsp: ConnectCheckerRtsp, port: Int) : O override fun shouldRetry(reason: String?): Boolean = false - override fun reConnect(delay: Long) { - } - override fun hasCongestion(): Boolean = rtspServer.hasCongestion() override fun setReTries(reTries: Int) { } + override fun reConnect(delay: Long, backupUrl: String?) { + } + override fun getCacheSize(): Int = 0 override fun getSentAudioFrames(): Long = 0