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
9835e914
authored
Jan 05, 2023
by
andrewlewis
Committed by
christosts
Jan 10, 2023
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix some minor issues/typos
PiperOrigin-RevId: 499808853
parent
bbe78b10
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
38 deletions
library/core/src/main/java/com/google/android/exoplayer2/Renderer.java
library/effect/src/main/java/com/google/android/exoplayer2/effect/DrawableOverlay.java
library/effect/src/main/java/com/google/android/exoplayer2/effect/TextOverlay.java
library/core/src/main/java/com/google/android/exoplayer2/Renderer.java
View file @
9835e914
...
...
@@ -208,7 +208,7 @@ public interface Renderer extends PlayerMessage.Target {
/**
* The type of a message that can be passed to a video renderer to set the desired output
* resolution. The message payload should be a {@link Size} of the desired output width and
* height. Use this method only when playing with video {@link
Effect
}.
* height. Use this method only when playing with video {@link
plain Effect effects
}.
*/
int
MSG_SET_VIDEO_OUTPUT_RESOLUTION
=
13
;
/**
...
...
library/effect/src/main/java/com/google/android/exoplayer2/effect/DrawableOverlay.java
View file @
9835e914
...
...
@@ -35,7 +35,7 @@ public abstract class DrawableOverlay extends BitmapOverlay {
/**
* Returns the overlay {@link Drawable} displayed at the specified timestamp.
*
* <p>The drawable must have it
'
s bounds set via {@link Drawable#setBounds} for drawable to be
* <p>The drawable must have its bounds set via {@link Drawable#setBounds} for drawable to be
* displayed on the frame.
*
* @param presentationTimeUs The presentation timestamp of the current frame, in microseconds.
...
...
library/effect/src/main/java/com/google/android/exoplayer2/effect/TextOverlay.java
View file @
9835e914
...
...
@@ -32,9 +32,46 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
/**
* Creates a {@link TextureOverlay} from text.
*
* <p>Uses a {@link SpannableString} store the text and support advanced per-character text styling.
* <p>Uses a {@link SpannableString} to store the text and support advanced per-character text
* styling.
*/
public
abstract
class
TextOverlay
extends
BitmapOverlay
{
/**
* Creates a {@link TextOverlay} that shows the {@code overlayText} with the same default settings
* in {@link OverlaySettings} throughout the whole video.
*/
public
static
TextOverlay
createStaticTextOverlay
(
SpannableString
overlayText
)
{
return
new
TextOverlay
()
{
@Override
public
SpannableString
getText
(
long
presentationTimeUs
)
{
return
overlayText
;
}
};
}
/**
* Creates a {@link TextOverlay} that shows the {@code overlayText} with the same {@link
* OverlaySettings} throughout the whole video.
*
* @param overlaySettings The {@link OverlaySettings} configuring how the overlay is displayed on
* the frames.
*/
public
static
TextOverlay
createStaticTextOverlay
(
SpannableString
overlayText
,
OverlaySettings
overlaySettings
)
{
return
new
TextOverlay
()
{
@Override
public
SpannableString
getText
(
long
presentationTimeUs
)
{
return
overlayText
;
}
@Override
public
OverlaySettings
getOverlaySettings
(
long
presentationTimeUs
)
{
return
overlaySettings
;
}
};
}
public
static
final
int
TEXT_SIZE_PIXELS
=
100
;
private
@MonotonicNonNull
Bitmap
lastBitmap
;
...
...
@@ -79,41 +116,6 @@ public abstract class TextOverlay extends BitmapOverlay {
return
checkNotNull
(
lastBitmap
);
}
/**
* Creates a {@link TextOverlay} that shows the {@code overlayText} with the same default settings
* in {@link OverlaySettings} throughout the whole video.
*/
public
static
TextOverlay
createStaticTextOverlay
(
SpannableString
overlayText
)
{
return
new
TextOverlay
()
{
@Override
public
SpannableString
getText
(
long
presentationTimeUs
)
{
return
overlayText
;
}
};
}
/**
* Creates a {@link TextOverlay} that shows the {@code overlayText} with the same {@link
* OverlaySettings} throughout the whole video.
*
* @param overlaySettings The {@link OverlaySettings} configuring how the overlay is displayed on
* the frames.
*/
public
static
TextOverlay
createStaticTextOverlay
(
SpannableString
overlayText
,
OverlaySettings
overlaySettings
)
{
return
new
TextOverlay
()
{
@Override
public
SpannableString
getText
(
long
presentationTimeUs
)
{
return
overlayText
;
}
@Override
public
OverlaySettings
getOverlaySettings
(
long
presentationTimeUs
)
{
return
overlaySettings
;
}
};
}
@RequiresApi
(
23
)
private
static
final
class
Api23
{
@DoNotInline
...
...
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