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
40d3e128
authored
Apr 14, 2021
by
krocard
Committed by
Andrew Lewis
Apr 15, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Move MetadataComponent from Player to ExoPlayer
PiperOrigin-RevId: 368418142
parent
f4f31273
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
31 deletions
extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/CastPlayer.java
library/common/src/main/java/com/google/android/exoplayer2/Player.java
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java
library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java
extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/CastPlayer.java
View file @
40d3e128
...
@@ -288,12 +288,6 @@ public final class CastPlayer extends BasePlayer {
...
@@ -288,12 +288,6 @@ public final class CastPlayer extends BasePlayer {
@Override
@Override
@Nullable
@Nullable
public
MetadataComponent
getMetadataComponent
()
{
return
null
;
}
@Override
@Nullable
public
DeviceComponent
getDeviceComponent
()
{
public
DeviceComponent
getDeviceComponent
()
{
// TODO(b/151792305): Implement the component.
// TODO(b/151792305): Implement the component.
return
null
;
return
null
;
...
...
library/common/src/main/java/com/google/android/exoplayer2/Player.java
View file @
40d3e128
...
@@ -227,24 +227,6 @@ public interface Player {
...
@@ -227,24 +227,6 @@ public interface Player {
List
<
Cue
>
getCurrentCues
();
List
<
Cue
>
getCurrentCues
();
}
}
/** The metadata component of a {@link Player}. */
interface
MetadataComponent
{
/**
* Adds a {@link MetadataOutput} to receive metadata.
*
* @param output The output to register.
*/
void
addMetadataOutput
(
MetadataOutput
output
);
/**
* Removes a {@link MetadataOutput}.
*
* @param output The output to remove.
*/
void
removeMetadataOutput
(
MetadataOutput
output
);
}
/** The device component of a {@link Player}. */
/** The device component of a {@link Player}. */
interface
DeviceComponent
{
interface
DeviceComponent
{
...
@@ -1173,12 +1155,6 @@ public interface Player {
...
@@ -1173,12 +1155,6 @@ public interface Player {
@Nullable
@Nullable
TextComponent
getTextComponent
();
TextComponent
getTextComponent
();
/**
* Returns the component of this player for metadata output, or null if metadata is not supported.
*/
@Nullable
MetadataComponent
getMetadataComponent
();
/** Returns the component of this player for playback device, or null if it's not supported. */
/** Returns the component of this player for playback device, or null if it's not supported. */
@Nullable
@Nullable
DeviceComponent
getDeviceComponent
();
DeviceComponent
getDeviceComponent
();
...
...
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java
View file @
40d3e128
...
@@ -28,6 +28,7 @@ import com.google.android.exoplayer2.audio.AudioSink;
...
@@ -28,6 +28,7 @@ import com.google.android.exoplayer2.audio.AudioSink;
import
com.google.android.exoplayer2.audio.AuxEffectInfo
;
import
com.google.android.exoplayer2.audio.AuxEffectInfo
;
import
com.google.android.exoplayer2.audio.DefaultAudioSink
;
import
com.google.android.exoplayer2.audio.DefaultAudioSink
;
import
com.google.android.exoplayer2.audio.MediaCodecAudioRenderer
;
import
com.google.android.exoplayer2.audio.MediaCodecAudioRenderer
;
import
com.google.android.exoplayer2.metadata.MetadataOutput
;
import
com.google.android.exoplayer2.metadata.MetadataRenderer
;
import
com.google.android.exoplayer2.metadata.MetadataRenderer
;
import
com.google.android.exoplayer2.source.DefaultMediaSourceFactory
;
import
com.google.android.exoplayer2.source.DefaultMediaSourceFactory
;
import
com.google.android.exoplayer2.source.MediaSource
;
import
com.google.android.exoplayer2.source.MediaSource
;
...
@@ -218,6 +219,24 @@ public interface ExoPlayer extends Player {
...
@@ -218,6 +219,24 @@ public interface ExoPlayer extends Player {
boolean
getSkipSilenceEnabled
();
boolean
getSkipSilenceEnabled
();
}
}
/** The metadata component of an {@link ExoPlayer}. */
interface
MetadataComponent
{
/**
* Adds a {@link MetadataOutput} to receive metadata.
*
* @param output The output to register.
*/
void
addMetadataOutput
(
MetadataOutput
output
);
/**
* Removes a {@link MetadataOutput}.
*
* @param output The output to remove.
*/
void
removeMetadataOutput
(
MetadataOutput
output
);
}
/**
/**
* The default timeout for calls to {@link #release} and {@link #setForegroundMode}, in
* The default timeout for calls to {@link #release} and {@link #setForegroundMode}, in
* milliseconds.
* milliseconds.
...
@@ -562,6 +581,12 @@ public interface ExoPlayer extends Player {
...
@@ -562,6 +581,12 @@ public interface ExoPlayer extends Player {
AudioComponent
getAudioComponent
();
AudioComponent
getAudioComponent
();
/**
/**
* Returns the component of this player for metadata output, or null if metadata is not supported.
*/
@Nullable
MetadataComponent
getMetadataComponent
();
/**
* Adds a listener to receive audio offload events.
* Adds a listener to receive audio offload events.
*
*
* @param listener The listener to register.
* @param listener The listener to register.
...
...
library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java
View file @
40d3e128
...
@@ -81,7 +81,7 @@ public class SimpleExoPlayer extends BasePlayer
...
@@ -81,7 +81,7 @@ public class SimpleExoPlayer extends BasePlayer
ExoPlayer
.
AudioComponent
,
ExoPlayer
.
AudioComponent
,
Player
.
VideoComponent
,
Player
.
VideoComponent
,
Player
.
TextComponent
,
Player
.
TextComponent
,
Player
.
MetadataComponent
,
Exo
Player
.
MetadataComponent
,
Player
.
DeviceComponent
{
Player
.
DeviceComponent
{
/** The default timeout for detaching a surface from the player, in milliseconds. */
/** The default timeout for detaching a surface from the player, in milliseconds. */
...
...
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