Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a727acd2
authored
May 21, 2019
by
olly
Committed by
Toni
May 23, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Remove nullness test blacklist for RTMP extension
PiperOrigin-RevId: 249274122
parent
37fc1d87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
extensions/rtmp/src/main/java/com/google/android/exoplayer2/ext/rtmp/RtmpDataSource.java
extensions/rtmp/src/main/java/com/google/android/exoplayer2/ext/rtmp/RtmpDataSource.java
View file @
a727acd2
...
@@ -15,6 +15,8 @@
...
@@ -15,6 +15,8 @@
*/
*/
package
com
.
google
.
android
.
exoplayer2
.
ext
.
rtmp
;
package
com
.
google
.
android
.
exoplayer2
.
ext
.
rtmp
;
import
static
com
.
google
.
android
.
exoplayer2
.
util
.
Util
.
castNonNull
;
import
android.net.Uri
;
import
android.net.Uri
;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
com.google.android.exoplayer2.C
;
import
com.google.android.exoplayer2.C
;
...
@@ -34,8 +36,8 @@ public final class RtmpDataSource extends BaseDataSource {
...
@@ -34,8 +36,8 @@ public final class RtmpDataSource extends BaseDataSource {
ExoPlayerLibraryInfo
.
registerModule
(
"goog.exo.rtmp"
);
ExoPlayerLibraryInfo
.
registerModule
(
"goog.exo.rtmp"
);
}
}
private
RtmpClient
rtmpClient
;
@Nullable
private
RtmpClient
rtmpClient
;
private
Uri
uri
;
@Nullable
private
Uri
uri
;
public
RtmpDataSource
()
{
public
RtmpDataSource
()
{
super
(
/* isNetwork= */
true
);
super
(
/* isNetwork= */
true
);
...
@@ -66,7 +68,7 @@ public final class RtmpDataSource extends BaseDataSource {
...
@@ -66,7 +68,7 @@ public final class RtmpDataSource extends BaseDataSource {
@Override
@Override
public
int
read
(
byte
[]
buffer
,
int
offset
,
int
readLength
)
throws
IOException
{
public
int
read
(
byte
[]
buffer
,
int
offset
,
int
readLength
)
throws
IOException
{
int
bytesRead
=
rtmpClient
.
read
(
buffer
,
offset
,
readLength
);
int
bytesRead
=
castNonNull
(
rtmpClient
)
.
read
(
buffer
,
offset
,
readLength
);
if
(
bytesRead
==
-
1
)
{
if
(
bytesRead
==
-
1
)
{
return
C
.
RESULT_END_OF_INPUT
;
return
C
.
RESULT_END_OF_INPUT
;
}
}
...
@@ -87,6 +89,7 @@ public final class RtmpDataSource extends BaseDataSource {
...
@@ -87,6 +89,7 @@ public final class RtmpDataSource extends BaseDataSource {
}
}
@Override
@Override
@Nullable
public
Uri
getUri
()
{
public
Uri
getUri
()
{
return
uri
;
return
uri
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment