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
09485cbe
authored
Jan 23, 2022
by
Dustin
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Passed along suggestedBufferSize to ExoPlayer
parent
43b8a9b3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletions
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/avi/AviExtractor.java
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/avi/StreamHeaderBox.java
library/extractor/src/test/java/com/google/android/exoplayer2/extractor/avi/StreamHeaderBoxTest.java
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/avi/AviExtractor.java
View file @
09485cbe
...
@@ -231,6 +231,10 @@ public class AviExtractor implements Extractor {
...
@@ -231,6 +231,10 @@ public class AviExtractor implements Extractor {
}
}
final
Format
.
Builder
builder
=
new
Format
.
Builder
();
final
Format
.
Builder
builder
=
new
Format
.
Builder
();
builder
.
setId
(
streamId
);
builder
.
setId
(
streamId
);
final
int
suggestedBufferSize
=
streamHeader
.
getSuggestedBufferSize
();
if
(
suggestedBufferSize
!=
0
)
{
builder
.
setMaxInputSize
(
suggestedBufferSize
);
}
final
StreamNameBox
streamName
=
streamList
.
getChild
(
StreamNameBox
.
class
);
final
StreamNameBox
streamName
=
streamList
.
getChild
(
StreamNameBox
.
class
);
if
(
streamName
!=
null
)
{
if
(
streamName
!=
null
)
{
builder
.
setLabel
(
streamName
.
getName
());
builder
.
setLabel
(
streamName
.
getName
());
...
...
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/avi/StreamHeaderBox.java
View file @
09485cbe
...
@@ -97,7 +97,10 @@ public class StreamHeaderBox extends ResidentBox {
...
@@ -97,7 +97,10 @@ public class StreamHeaderBox extends ResidentBox {
public
long
getLength
()
{
public
long
getLength
()
{
return
byteBuffer
.
getInt
(
32
)
&
AviExtractor
.
UINT_MASK
;
return
byteBuffer
.
getInt
(
32
)
&
AviExtractor
.
UINT_MASK
;
}
}
//36 - dwSuggestedBufferSize
public
int
getSuggestedBufferSize
()
{
return
byteBuffer
.
getInt
(
36
);
}
//40 - dwQuality
//40 - dwQuality
//44 - dwSampleSize
//44 - dwSampleSize
// public int getSampleSize() {
// public int getSampleSize() {
...
...
library/extractor/src/test/java/com/google/android/exoplayer2/extractor/avi/StreamHeaderBoxTest.java
View file @
09485cbe
...
@@ -25,5 +25,6 @@ public class StreamHeaderBoxTest {
...
@@ -25,5 +25,6 @@ public class StreamHeaderBoxTest {
Assert
.
assertEquals
(
US_SAMPLE24FPS
,
streamHeaderBox
.
getUsPerSample
());
Assert
.
assertEquals
(
US_SAMPLE24FPS
,
streamHeaderBox
.
getUsPerSample
());
Assert
.
assertEquals
(
MimeTypes
.
VIDEO_MP4V
,
streamHeaderBox
.
getMimeType
());
Assert
.
assertEquals
(
MimeTypes
.
VIDEO_MP4V
,
streamHeaderBox
.
getMimeType
());
Assert
.
assertEquals
(
11805L
,
streamHeaderBox
.
getLength
());
Assert
.
assertEquals
(
11805L
,
streamHeaderBox
.
getLength
());
Assert
.
assertEquals
(
0
,
streamHeaderBox
.
getSuggestedBufferSize
());
}
}
}
}
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