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
b9ffea68
authored
Sep 06, 2019
by
andrewlewis
Committed by
Oliver Woodman
Sep 16, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix decoder selection for E-AC3 JOC streams
Issue: #6398 PiperOrigin-RevId: 267563795
parent
72aa150f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
6 deletions
RELEASENOTES.md
library/core/src/main/java/com/google/android/exoplayer2/audio/MediaCodecAudioRenderer.java
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecSelector.java
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java
RELEASENOTES.md
View file @
b9ffea68
...
@@ -17,6 +17,8 @@
...
@@ -17,6 +17,8 @@
(
[
#6396
](
https://github.com/google/ExoPlayer/issues/6396
)
).
(
[
#6396
](
https://github.com/google/ExoPlayer/issues/6396
)
).
*
Fix audio selection issue where languages are compared by bit rate
*
Fix audio selection issue where languages are compared by bit rate
(
[
#6335
](
https://github.com/google/ExoPlayer/issues/6335
)
).
(
[
#6335
](
https://github.com/google/ExoPlayer/issues/6335
)
).
*
Fix decoder selection for E-AC3 JOC streams
(
[
#6398
](
https://github.com/google/ExoPlayer/issues/6398
)
).
*
Fix
`PlayerNotificationManager`
to show play icon rather than pause icon when
*
Fix
`PlayerNotificationManager`
to show play icon rather than pause icon when
playback is ended (
[
#6324
](
https://github.com/google/ExoPlayer/issues/6324
)
).
playback is ended (
[
#6324
](
https://github.com/google/ExoPlayer/issues/6324
)
).
*
Upgrade LibRtmp-Client-for-Android to fix RTMP playback issues
*
Upgrade LibRtmp-Client-for-Android to fix RTMP playback issues
...
...
library/core/src/main/java/com/google/android/exoplayer2/audio/MediaCodecAudioRenderer.java
View file @
b9ffea68
...
@@ -45,6 +45,7 @@ import com.google.android.exoplayer2.util.MediaClock;
...
@@ -45,6 +45,7 @@ import com.google.android.exoplayer2.util.MediaClock;
import
com.google.android.exoplayer2.util.MimeTypes
;
import
com.google.android.exoplayer2.util.MimeTypes
;
import
com.google.android.exoplayer2.util.Util
;
import
com.google.android.exoplayer2.util.Util
;
import
java.nio.ByteBuffer
;
import
java.nio.ByteBuffer
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
...
@@ -369,10 +370,11 @@ public class MediaCodecAudioRenderer extends MediaCodecRenderer implements Media
...
@@ -369,10 +370,11 @@ public class MediaCodecAudioRenderer extends MediaCodecRenderer implements Media
format
.
sampleMimeType
,
requiresSecureDecoder
,
/* requiresTunnelingDecoder= */
false
);
format
.
sampleMimeType
,
requiresSecureDecoder
,
/* requiresTunnelingDecoder= */
false
);
if
(
MimeTypes
.
AUDIO_E_AC3_JOC
.
equals
(
format
.
sampleMimeType
))
{
if
(
MimeTypes
.
AUDIO_E_AC3_JOC
.
equals
(
format
.
sampleMimeType
))
{
// E-AC3 decoders can decode JOC streams, but in 2-D rather than 3-D.
// E-AC3 decoders can decode JOC streams, but in 2-D rather than 3-D.
List
<
MediaCodecInfo
>
eac3DecoderInfos
=
List
<
MediaCodecInfo
>
decoderInfosWithEac3
=
new
ArrayList
<>(
decoderInfos
);
decoderInfosWithEac3
.
addAll
(
mediaCodecSelector
.
getDecoderInfos
(
mediaCodecSelector
.
getDecoderInfos
(
MimeTypes
.
AUDIO_E_AC3
,
requiresSecureDecoder
,
/* requiresTunnelingDecoder= */
false
);
MimeTypes
.
AUDIO_E_AC3
,
requiresSecureDecoder
,
/* requiresTunnelingDecoder= */
false
)
)
;
decoderInfos
.
addAll
(
eac3DecoderInfos
)
;
decoderInfos
=
decoderInfosWithEac3
;
}
}
return
Collections
.
unmodifiableList
(
decoderInfos
);
return
Collections
.
unmodifiableList
(
decoderInfos
);
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecSelector.java
View file @
b9ffea68
...
@@ -51,7 +51,8 @@ public interface MediaCodecSelector {
...
@@ -51,7 +51,8 @@ public interface MediaCodecSelector {
* @param mimeType The MIME type for which a decoder is required.
* @param mimeType The MIME type for which a decoder is required.
* @param requiresSecureDecoder Whether a secure decoder is required.
* @param requiresSecureDecoder Whether a secure decoder is required.
* @param requiresTunnelingDecoder Whether a tunneling decoder is required.
* @param requiresTunnelingDecoder Whether a tunneling decoder is required.
* @return A list of {@link MediaCodecInfo}s corresponding to decoders. May be empty.
* @return An unmodifiable list of {@link MediaCodecInfo}s corresponding to decoders. May be
* empty.
* @throws DecoderQueryException Thrown if there was an error querying decoders.
* @throws DecoderQueryException Thrown if there was an error querying decoders.
*/
*/
List
<
MediaCodecInfo
>
getDecoderInfos
(
List
<
MediaCodecInfo
>
getDecoderInfos
(
...
...
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java
View file @
b9ffea68
...
@@ -146,8 +146,8 @@ public final class MediaCodecUtil {
...
@@ -146,8 +146,8 @@ public final class MediaCodecUtil {
* unless secure decryption really is required.
* unless secure decryption really is required.
* @param tunneling Whether the decoder is required to support tunneling. Always pass false unless
* @param tunneling Whether the decoder is required to support tunneling. Always pass false unless
* tunneling really is required.
* tunneling really is required.
* @return A
list of all {@link MediaCodecInfo}s for the given mime type, in the order given by
* @return A
n unmodifiable list of all {@link MediaCodecInfo}s for the given mime type, in the
* {@link MediaCodecList}.
*
order given by
{@link MediaCodecList}.
* @throws DecoderQueryException If there was an error querying the available decoders.
* @throws DecoderQueryException If there was an error querying the available decoders.
*/
*/
public
static
synchronized
List
<
MediaCodecInfo
>
getDecoderInfos
(
public
static
synchronized
List
<
MediaCodecInfo
>
getDecoderInfos
(
...
...
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