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
1c4cfed3
authored
May 05, 2023
by
sheenachhabra
Committed by
Tofunmi Adigun-Hameed
May 08, 2023
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Improve documentation for metadataSampleEntry method
PiperOrigin-RevId: 529693415
parent
fa669d80
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
9 deletions
library/muxer/src/main/java/androidx/media3/muxer/Boxes.java
library/muxer/src/main/java/androidx/media3/muxer/Mp4MoovStructure.java
library/muxer/src/main/java/androidx/media3/muxer/Boxes.java
View file @
1c4cfed3
...
@@ -226,20 +226,18 @@ import java.util.Locale;
...
@@ -226,20 +226,18 @@ import java.util.Locale;
}
}
/**
/**
* Returns a
metadata sample entry box
.
* Returns a
text metadata sample entry box as per ISO/IEC 14496-12: 8.5.2.2
.
*
*
* <p>This contains the sample entry (to be placed within the sample description box) for metadata
* <p>This contains the sample entry (to be placed within the sample description box) for the text
* tracks.
* metadata tracks.
*
* <p>The mett box corresponds to text metadata sample entry.
*/
*/
public
static
ByteBuffer
metad
ataSampleEntry
(
Format
format
)
{
public
static
ByteBuffer
textMetaD
ataSampleEntry
(
Format
format
)
{
ByteBuffer
contents
=
ByteBuffer
.
allocate
(
Mp4Utils
.
MAX_FIXED_LEAF_BOX_SIZE
);
ByteBuffer
contents
=
ByteBuffer
.
allocate
(
Mp4Utils
.
MAX_FIXED_LEAF_BOX_SIZE
);
String
mimeType
=
checkNotNull
(
format
.
sampleMimeType
);
String
mimeType
=
checkNotNull
(
format
.
sampleMimeType
);
byte
[]
mimeBytes
=
Util
.
getUtf8Bytes
(
mimeType
);
byte
[]
mimeBytes
=
Util
.
getUtf8Bytes
(
mimeType
);
contents
.
put
(
mimeBytes
);
contents
.
put
(
mimeBytes
);
// content_encoding
contents
.
put
((
byte
)
0x00
);
contents
.
put
((
byte
)
0x00
);
contents
.
put
(
mimeBytes
);
contents
.
put
(
mimeBytes
);
// mime_format
contents
.
put
((
byte
)
0x00
);
contents
.
put
((
byte
)
0x00
);
contents
.
flip
();
contents
.
flip
();
...
...
library/muxer/src/main/java/androidx/media3/muxer/Mp4MoovStructure.java
View file @
1c4cfed3
...
@@ -99,7 +99,7 @@ import org.checkerframework.checker.nullness.qual.PolyNull;
...
@@ -99,7 +99,7 @@ import org.checkerframework.checker.nullness.qual.PolyNull;
?
Boxes
.
videoSampleEntry
(
format
)
?
Boxes
.
videoSampleEntry
(
format
)
:
(
isAudio
:
(
isAudio
?
Boxes
.
audioSampleEntry
(
format
)
?
Boxes
.
audioSampleEntry
(
format
)
:
Boxes
.
metad
ataSampleEntry
(
format
)));
:
Boxes
.
textMetaD
ataSampleEntry
(
format
)));
ByteBuffer
stts
=
Boxes
.
stts
(
sampleDurationsVu
);
ByteBuffer
stts
=
Boxes
.
stts
(
sampleDurationsVu
);
ByteBuffer
stsz
=
Boxes
.
stsz
(
track
.
writtenSamples
());
ByteBuffer
stsz
=
Boxes
.
stsz
(
track
.
writtenSamples
());
ByteBuffer
stsc
=
Boxes
.
stsc
(
track
.
writtenChunkSampleCounts
());
ByteBuffer
stsc
=
Boxes
.
stsc
(
track
.
writtenChunkSampleCounts
());
...
...
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