Move MetadataComponent from Player to ExoPlayer
PiperOrigin-RevId: 368418142
This commit is contained in:
parent
f4f312738b
commit
40d3e12853
@ -286,12 +286,6 @@ public final class CastPlayer extends BasePlayer {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Nullable
|
|
||||||
public MetadataComponent getMetadataComponent() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public DeviceComponent getDeviceComponent() {
|
public DeviceComponent getDeviceComponent() {
|
||||||
|
@ -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 {
|
|||||||
@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();
|
||||||
|
@ -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 {
|
|||||||
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.
|
||||||
@ -561,6 +580,12 @@ public interface ExoPlayer extends Player {
|
|||||||
@Nullable
|
@Nullable
|
||||||
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.
|
||||||
*
|
*
|
||||||
|
@ -81,7 +81,7 @@ public class SimpleExoPlayer extends BasePlayer
|
|||||||
ExoPlayer.AudioComponent,
|
ExoPlayer.AudioComponent,
|
||||||
Player.VideoComponent,
|
Player.VideoComponent,
|
||||||
Player.TextComponent,
|
Player.TextComponent,
|
||||||
Player.MetadataComponent,
|
ExoPlayer.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. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user