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
6960dde8
authored
Aug 21, 2020
by
kimvde
Committed by
kim-vde
Aug 26, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add nullness annotations to FragmentedMp4Extractor
PiperOrigin-RevId: 327797428
parent
d881a675
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
5 deletions
library/common/src/main/java/com/google/android/exoplayer2/util/NalUnitUtil.java
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ExtractorOutput.java
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java
library/common/src/main/java/com/google/android/exoplayer2/util/NalUnitUtil.java
View file @
6960dde8
...
...
@@ -15,6 +15,7 @@
*/
package
com
.
google
.
android
.
exoplayer2
.
util
;
import
androidx.annotation.Nullable
;
import
java.nio.ByteBuffer
;
import
java.util.Arrays
;
...
...
@@ -219,11 +220,12 @@ public final class NalUnitUtil {
* Returns whether the NAL unit with the specified header contains supplemental enhancement
* information.
*
* @param mimeType The sample MIME type.
* @param mimeType The sample MIME type
, or {@code null} if unknown
.
* @param nalUnitHeaderFirstByte The first byte of nal_unit().
* @return Whether the NAL unit with the specified header is an SEI NAL unit.
* @return Whether the NAL unit with the specified header is an SEI NAL unit. False is returned if
* the {@code MimeType} is {@code null}.
*/
public
static
boolean
isNalUnitSei
(
String
mimeType
,
byte
nalUnitHeaderFirstByte
)
{
public
static
boolean
isNalUnitSei
(
@Nullable
String
mimeType
,
byte
nalUnitHeaderFirstByte
)
{
return
(
MimeTypes
.
VIDEO_H264
.
equals
(
mimeType
)
&&
(
nalUnitHeaderFirstByte
&
0x1F
)
==
H264_NAL_UNIT_TYPE_SEI
)
||
(
MimeTypes
.
VIDEO_H265
.
equals
(
mimeType
)
...
...
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ExtractorOutput.java
View file @
6960dde8
...
...
@@ -21,9 +21,33 @@ package com.google.android.exoplayer2.extractor;
public
interface
ExtractorOutput
{
/**
* Placeholder {@link ExtractorOutput} implementation throwing an {@link
* UnsupportedOperationException} in each method.
*/
ExtractorOutput
PLACEHOLDER
=
new
ExtractorOutput
()
{
@Override
public
TrackOutput
track
(
int
id
,
int
type
)
{
throw
new
UnsupportedOperationException
();
}
@Override
public
void
endTracks
()
{
throw
new
UnsupportedOperationException
();
}
@Override
public
void
seekMap
(
SeekMap
seekMap
)
{
throw
new
UnsupportedOperationException
();
}
};
/**
* Called by the {@link Extractor} to get the {@link TrackOutput} for a specific track.
* <p>
* The same {@link TrackOutput} is returned if multiple calls are made with the same {@code id}.
*
* <p>The same {@link TrackOutput} is returned if multiple calls are made with the same {@code
* id}.
*
* @param id A track identifier.
* @param type The type of the track. Typically one of the {@link com.google.android.exoplayer2.C}
...
...
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java
View file @
6960dde8
This diff is collapsed.
Click to expand it.
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