Skip to content

Commit

Permalink
- Fixed #8
Browse files Browse the repository at this point in the history
- Structure redesign.
  • Loading branch information
alexeyvasilyev committed Apr 3, 2021
1 parent 55c0464 commit cd938c0
Show file tree
Hide file tree
Showing 15 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ dependencies {
implementation "androidx.navigation:navigation-fragment-ktx:${androidXNavigationVersion}"
implementation "androidx.navigation:navigation-ui-ktx:${androidXNavigationVersion}"
implementation 'com.github.AppDevNext.Logcat:LogcatCore:2.5.0'
implementation project(':library-rtsp')
implementation project(':library-client-rtsp')
}
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.4.31'
ext.kotlin_version = '1.4.32'
repositories {
jcenter()
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
Expand Down
8 changes: 4 additions & 4 deletions constants.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ project.ext {
buildToolsVersion = '30.0.3'
minSdkVersion = 21 // 5.0
targetSdkVersion = 30 // 11.0
releaseVersion = "1.3.0"
releaseVersionCode = 130
releaseVersion = "1.3.1"
releaseVersionCode = 131

androidXAnnotationVersion = '1.1.0'
androidXAppcompatVersion = '1.1.0'
androidXAnnotationVersion = '1.2.0'
androidXAppcompatVersion = '1.2.0'
androidXNavigationVersion = '2.3.4'
exoplayerVersion = '2.13.2'
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ private static void readRtpData(
int keepAliveTimeout,
@NonNull RtspClientKeepAliveListener keepAliveListener)
throws IOException {
byte[] data = new byte[15000]; // Usually not bigger than MTU
byte[] data = new byte[0]; // Usually not bigger than MTU = 15KB

final VideoRtpParser videoParser = new VideoRtpParser();
final AacParser audioParser = (sdpInfo.audioTrack != null && sdpInfo.audioTrack.audioCodec == AUDIO_CODEC_AAC ?
Expand All @@ -585,6 +585,9 @@ private static void readRtpData(
// throw new IOException("No RTP frames found");
}
// header.dumpHeader();
if (header.payloadSize > data.length)
data = new byte[header.payloadSize];

NetUtils.readData(inputStream, data, 0, header.payloadSize);

// Check if keep-alive should be sent
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include ':library-rtsp'
include ':library-client-rtsp'
include ':app'

0 comments on commit cd938c0

Please sign in to comment.