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
a704b3d3
authored
Sep 01, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Tweak video renderer.
parent
39babb77
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
library/src/main/java/com/google/android/exoplayer/MediaCodecVideoTrackRenderer.java
library/src/main/java/com/google/android/exoplayer/MediaCodecVideoTrackRenderer.java
View file @
a704b3d3
...
...
@@ -441,6 +441,19 @@ public class MediaCodecVideoTrackRenderer extends MediaCodecTrackRenderer {
return
true
;
}
if
(!
renderedFirstFrame
)
{
if
(
Util
.
SDK_INT
>=
21
)
{
renderOutputBufferV21
(
codec
,
bufferIndex
,
System
.
nanoTime
());
}
else
{
renderOutputBuffer
(
codec
,
bufferIndex
);
}
return
true
;
}
if
(
getState
()
!=
TrackRenderer
.
STATE_STARTED
)
{
return
false
;
}
// Compute how many microseconds it is until the buffer's presentation time.
long
elapsedSinceStartOfLoopUs
=
(
SystemClock
.
elapsedRealtime
()
*
1000
)
-
elapsedRealtimeUs
;
long
earlyUs
=
bufferInfo
.
presentationTimeUs
-
positionUs
-
elapsedSinceStartOfLoopUs
;
...
...
@@ -465,19 +478,6 @@ public class MediaCodecVideoTrackRenderer extends MediaCodecTrackRenderer {
return
true
;
}
if
(!
renderedFirstFrame
)
{
if
(
Util
.
SDK_INT
>=
21
)
{
renderOutputBufferV21
(
codec
,
bufferIndex
,
System
.
nanoTime
());
}
else
{
renderOutputBuffer
(
codec
,
bufferIndex
);
}
return
true
;
}
if
(
getState
()
!=
TrackRenderer
.
STATE_STARTED
)
{
return
false
;
}
if
(
Util
.
SDK_INT
>=
21
)
{
// Let the underlying framework time the release.
if
(
earlyUs
<
50000
)
{
...
...
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