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
94784249
authored
Jun 28, 2018
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Cleanup
parent
b06a38b6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
10 deletions
RELEASENOTES.md
library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java
library/ui/src/main/java/com/google/android/exoplayer2/ui/SubtitlePainter.java
library/ui/src/main/java/com/google/android/exoplayer2/ui/SubtitleView.java
RELEASENOTES.md
View file @
94784249
...
...
@@ -53,6 +53,7 @@
*
Add uri field to
`LoadEventInfo`
in
`MediaSourceEventListener`
or
`AnalyticsListener`
callbacks. This uri is the redirected uri if redirection
occurred (
[
#2054
](
https://github.com/google/ExoPlayer/issues/2054
)
).
*
Improved compatibility with FireOS devices.
### 2.8.2 ###
...
...
library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java
View file @
94784249
...
...
@@ -829,7 +829,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
&&
!
codecNeedsSetOutputSurfaceWorkaround
(
codecInfo
.
name
)
&&
(!
codecInfo
.
secure
||
DummySurface
.
isSecureSupported
(
context
));
}
private
void
setJoiningDeadlineMs
()
{
joiningDeadlineMs
=
allowedJoiningTimeMs
>
0
?
(
SystemClock
.
elapsedRealtime
()
+
allowedJoiningTimeMs
)
:
C
.
TIME_UNSET
;
...
...
@@ -1172,12 +1172,17 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
return
Util
.
SDK_INT
<=
22
&&
"foster"
.
equals
(
Util
.
DEVICE
)
&&
"NVIDIA"
.
equals
(
Util
.
MANUFACTURER
);
}
/**
* Returns whether the device is known to handle {@link DummySurface} incorrectly.
*
* <p>If true is returned then use of {@link DummySurface} is disabled.
*/
private
static
boolean
codecNeedsDummySurfaceWorkaround
(
String
name
)
{
// Work around https://github.com/google/ExoPlayer/issues/4419.
return
(
(
"needle"
.
equals
(
Util
.
DEVICE
))
// FireTV 4K
&&
"OMX.amlogic.avc.decoder.awesome"
.
equals
(
name
)
);
return
(
"Amazon"
.
equals
(
Util
.
MANUFACTURER
)
&&
"AFTN"
.
equals
(
Util
.
MODEL
))
// FireTV 4K
&&
"OMX.amlogic.avc.decoder.awesome"
.
equals
(
name
);
}
/**
* Returns whether the device is known to implement {@link MediaCodec#setOutputSurface(Surface)}
* incorrectly.
...
...
library/ui/src/main/java/com/google/android/exoplayer2/ui/SubtitlePainter.java
View file @
94784249
...
...
@@ -36,7 +36,6 @@ import android.text.style.BackgroundColorSpan;
import
android.text.style.RelativeSizeSpan
;
import
android.util.DisplayMetrics
;
import
android.util.Log
;
import
com.google.android.exoplayer2.text.CaptionStyleCompat
;
import
com.google.android.exoplayer2.text.Cue
;
import
com.google.android.exoplayer2.util.Util
;
...
...
@@ -257,8 +256,8 @@ import com.google.android.exoplayer2.util.Util;
if
(
Color
.
alpha
(
backgroundColor
)
>
0
)
{
SpannableStringBuilder
newCueText
=
new
SpannableStringBuilder
(
cueText
);
newCueText
.
setSpan
(
new
BackgroundColorSpan
(
backgroundColor
),
0
,
newCueText
.
length
(),
Spanned
.
SPAN_PRIORITY
);
newCueText
.
setSpan
(
new
BackgroundColorSpan
(
backgroundColor
),
0
,
newCueText
.
length
(),
Spanned
.
SPAN_PRIORITY
);
cueText
=
newCueText
;
}
...
...
library/ui/src/main/java/com/google/android/exoplayer2/ui/SubtitleView.java
View file @
94784249
...
...
@@ -206,8 +206,10 @@ public final class SubtitleView extends View implements TextOutput {
* {@link CaptioningManager#getUserStyle()}, or to a default style before API level 19.
*/
public
void
setUserDefaultStyle
()
{
setStyle
(
Util
.
SDK_INT
>=
19
&&
isCaptionManagerEnabled
()
&&!
isInEditMode
()
?
getUserCaptionStyleV19
()
:
CaptionStyleCompat
.
DEFAULT
);
setStyle
(
Util
.
SDK_INT
>=
19
&&
isCaptionManagerEnabled
()
&&
!
isInEditMode
()
?
getUserCaptionStyleV19
()
:
CaptionStyleCompat
.
DEFAULT
);
}
/**
...
...
@@ -318,7 +320,7 @@ public final class SubtitleView extends View implements TextOutput {
@TargetApi
(
19
)
private
boolean
isCaptionManagerEnabled
()
{
CaptioningManager
captioningManager
=
(
CaptioningManager
)
getContext
().
getSystemService
(
Context
.
CAPTIONING_SERVICE
);
(
CaptioningManager
)
getContext
().
getSystemService
(
Context
.
CAPTIONING_SERVICE
);
return
captioningManager
.
isEnabled
();
}
...
...
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