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
75799975
authored
Mar 31, 2017
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Cleanup for merged pull requests
parent
b127e162
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
extensions/opus/src/main/jni/opus_jni.cc
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java
extensions/opus/src/main/jni/opus_jni.cc
View file @
75799975
...
@@ -59,7 +59,7 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) {
...
@@ -59,7 +59,7 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) {
}
}
static
const
int
kBytesPerSample
=
2
;
// opus fixed point uses 16 bit samples.
static
const
int
kBytesPerSample
=
2
;
// opus fixed point uses 16 bit samples.
static
const
int
kMaxOpusOutputPacketSizeSamples
=
960
*
6
;
// Maximum packet size used in Xiph's opusdec.
static
const
int
kMaxOpusOutputPacketSizeSamples
=
960
*
6
;
static
int
channelCount
;
static
int
channelCount
;
static
int
errorCode
;
static
int
errorCode
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java
View file @
75799975
...
@@ -339,7 +339,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
...
@@ -339,7 +339,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
}
}
String
codecName
=
decoderInfo
.
name
;
String
codecName
=
decoderInfo
.
name
;
codecIsAdaptive
=
decoderInfo
.
adaptive
&&
(
codecNeedsDisableAdaptationWorkaround
(
codecName
)==
fals
e
);
codecIsAdaptive
=
decoderInfo
.
adaptive
&&
!
codecNeedsDisableAdaptationWorkaround
(
codecNam
e
);
codecNeedsDiscardToSpsWorkaround
=
codecNeedsDiscardToSpsWorkaround
(
codecName
,
format
);
codecNeedsDiscardToSpsWorkaround
=
codecNeedsDiscardToSpsWorkaround
(
codecName
,
format
);
codecNeedsFlushWorkaround
=
codecNeedsFlushWorkaround
(
codecName
);
codecNeedsFlushWorkaround
=
codecNeedsFlushWorkaround
(
codecName
);
codecNeedsAdaptationWorkaround
=
codecNeedsAdaptationWorkaround
(
codecName
);
codecNeedsAdaptationWorkaround
=
codecNeedsAdaptationWorkaround
(
codecName
);
...
@@ -1179,7 +1179,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
...
@@ -1179,7 +1179,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
*
*
* @param name The decoder name.
* @param name The decoder name.
* @param format The input format.
* @param format The input format.
* @return True if the de
vice
is known to set the number of audio channels in the output format
* @return True if the de
coder
is known to set the number of audio channels in the output format
* to 2 for the given input format, whilst only actually outputting a single channel. False
* to 2 for the given input format, whilst only actually outputting a single channel. False
* otherwise.
* otherwise.
*/
*/
...
@@ -1187,17 +1187,19 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
...
@@ -1187,17 +1187,19 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
return
Util
.
SDK_INT
<=
18
&&
format
.
channelCount
==
1
return
Util
.
SDK_INT
<=
18
&&
format
.
channelCount
==
1
&&
"OMX.MTK.AUDIO.DECODER.MP3"
.
equals
(
name
);
&&
"OMX.MTK.AUDIO.DECODER.MP3"
.
equals
(
name
);
}
}
/**
/**
* Returns whether the decoder is needs Apaptive workaround disabled
* Returns whether the decoder is known to fail when adapting, despite advertising itself as an
* adaptive decoder.
* <p>
* <p>
* If
TRUE is returned then we explicitly override codecIsAdaptive,
* If
true is returned then we explicitly disable adaptation for the decoder.
*
setting it to false.
*
* @param name The decoder name.
* @param name The decoder name.
* @return T
RUE if the device needs Adaptive workaround disabled
* @return T
rue if the decoder is known to fail when adapting.
*/
*/
private
static
boolean
codecNeedsDisableAdaptationWorkaround
(
String
name
)
{
private
static
boolean
codecNeedsDisableAdaptationWorkaround
(
String
name
)
{
return
(
return
Util
.
SDK_INT
<=
19
&&
Util
.
MODEL
.
equals
(
"ODROID-XU3"
)
(
Util
.
SDK_INT
<=
19
&&
Util
.
MODEL
.
equals
(
"ODROID-XU3"
)
&&
(
"OMX.Exynos.AVC.Decoder"
.
equals
(
name
)
||
"OMX.Exynos.AVC.Decoder.secure"
.
equals
(
name
));
&&
(
"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