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
c3fa6d89
authored
Mar 31, 2017
by
ojw28
Committed by
GitHub
Mar 31, 2017
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge pull request #2612 from dessatel/dev-v2
Disables codecIsAdaptive for Odroid-XU4
parents
9a06b77b
d84733c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java
View file @
c3fa6d89
...
...
@@ -339,7 +339,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
}
String
codecName
=
decoderInfo
.
name
;
codecIsAdaptive
=
decoderInfo
.
adaptive
;
codecIsAdaptive
=
decoderInfo
.
adaptive
&&
(
codecNeedsDisableAdaptationWorkaround
(
codecName
)==
false
)
;
codecNeedsDiscardToSpsWorkaround
=
codecNeedsDiscardToSpsWorkaround
(
codecName
,
format
);
codecNeedsFlushWorkaround
=
codecNeedsFlushWorkaround
(
codecName
);
codecNeedsAdaptationWorkaround
=
codecNeedsAdaptationWorkaround
(
codecName
);
...
...
@@ -1187,5 +1187,17 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
return
Util
.
SDK_INT
<=
18
&&
format
.
channelCount
==
1
&&
"OMX.MTK.AUDIO.DECODER.MP3"
.
equals
(
name
);
}
/**
* Returns whether the decoder is needs Apaptive workaround disabled
* <p>
* If TRUE is returned then we explicitly override codecIsAdaptive,
* setting it to false.
* @param name The decoder name.
* @return TRUE if the device needs Adaptive workaround disabled
*/
private
static
boolean
codecNeedsDisableAdaptationWorkaround
(
String
name
)
{
return
(
(
Util
.
SDK_INT
<=
19
&&
Util
.
MODEL
.
equals
(
"ODROID-XU3"
)
&&
(
"OMX.Exynos.AVC.Decoder"
.
equals
(
name
)
||
"OMX.Exynos.AVC.Decoder.secure"
.
equals
(
name
))));
}
}
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