Skip to content

Commit

Permalink
fix play response
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroSG94 committed Nov 7, 2021
1 parent 9b9281b commit d97b021
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ dependencies {
implementation 'com.github.pedroSG94.rtmp-rtsp-stream-client-java:rtplibrary:2.1.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
}
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
buildscript {
ext.kotlin_version = '1.5.30'
ext.library_group = "com.github.pedroSG94"
ext.version_code = 114
ext.version_name = "1.1.4"
ext.version_code = 115
ext.version_name = "1.1.5"

repositories {
google()
Expand All @@ -13,7 +13,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
classpath 'com.android.tools.build:gradle:7.0.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion rtspserver/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ android {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'com.github.pedroSG94.rtmp-rtsp-stream-client-java:rtplibrary:2.1.1'
implementation 'com.github.pedroSG94.rtmp-rtsp-stream-client-java:rtplibrary:2.1.3'
}
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,15 @@ open class ServerCommandManager(private val serverIp: String, private val server
}

private fun createPlay(cSeq: Int): String {
return "${createHeader(cSeq)}Content-Length: 0\r\nRTP-Info: url=rtsp://$serverIp:$serverPort/\r\nSession: 1185d20035702ca\r\n\r\n"
var info = ""
if (!videoDisabled) {
info += "url=rtsp://$serverIp:$serverPort/streamid=${RtpConstants.trackVideo};seq=1;rtptime=0"
}
if (!audioDisabled) {
if (!videoDisabled) info += ","
info += "url=rtsp://$serverIp:$serverPort/streamid=${RtpConstants.trackAudio};seq=1;rtptime=0"
}
return "${createHeader(cSeq)}Content-Length: 0\r\nRTP-Info: $info\r\nSession: 1185d20035702ca\r\n\r\n"
}

private fun createPause(cSeq: Int): String {
Expand Down

0 comments on commit d97b021

Please sign in to comment.