Skip to content

Commit

Permalink
Deprecate exoplayer2 - all users should migrate to androidx.media3
Browse files Browse the repository at this point in the history
More info, including a script to help with the migration:
https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide

PiperOrigin-RevId: 540345728
(cherry picked from commit af1b9f6)
  • Loading branch information
icbaker committed Jun 15, 2023
1 parent 233655a commit 5b4839a
Show file tree
Hide file tree
Showing 965 changed files with 7,419 additions and 570 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,13 @@

// Note: Multidex is enabled in code not AndroidManifest.xml because the internal build system
// doesn't dejetify MultiDexApplication in AndroidManifest.xml.
/** Application for multidex support. */
/**
* Application for multidex support.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
public final class DemoApplication extends MultiDexApplication {}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@
import java.util.Collections;
import java.util.List;

/** Utility methods and constants for the Cast demo application. */
/**
* Utility methods and constants for the Cast demo application.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
/* package */ final class DemoUtil {

public static final String MIME_TYPE_DASH = MimeTypes.APPLICATION_MPD;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@
/**
* An activity that plays video using {@link ExoPlayer} and supports casting using ExoPlayer's Cast
* extension.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
public class MainActivity extends AppCompatActivity
implements OnClickListener, PlayerManager.Listener {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,15 @@
import com.google.android.gms.cast.framework.CastContext;
import java.util.ArrayList;

/** Manages players and an internal media queue for the demo app. */
/**
* Manages players and an internal media queue for the demo app.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
/* package */ class PlayerManager implements Player.Listener, SessionAvailabilityListener {

/** Listener for events. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@
/**
* Video processor that demonstrates how to overlay a bitmap on video output using a GL shader. The
* bitmap is drawn using an Android {@link Canvas}.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
/* package */ final class BitmapOverlayVideoProcessor
implements VideoProcessingGLSurfaceView.VideoProcessor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@
/**
* Activity that demonstrates playback of video to an {@link android.opengl.GLSurfaceView} with
* postprocessing of the video content using GL.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
public final class MainActivity extends Activity {

private static final String TAG = "MainActivity";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@
*
* <p>This view must be created programmatically, as it is necessary to specify whether a context
* supporting protected content should be created at construction time.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
public final class VideoProcessingGLSurfaceView extends GLSurfaceView {

/** Processes video frames, provided via a GL texture. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@
import com.google.android.exoplayer2.util.Util;
import java.util.List;

/** A service for downloading media. */
/**
* A service for downloading media.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
public class DemoDownloadService extends DownloadService {

private static final int JOB_ID = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,15 @@
import org.checkerframework.checker.nullness.qual.Nullable;
import org.chromium.net.CronetEngine;

/** Utility methods for the demo app. */
/**
* Utility methods for the demo app.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
public final class DemoUtil {

public static final String DOWNLOAD_NOTIFICATION_CHANNEL_ID = "download_channel";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,15 @@
import java.util.HashMap;
import java.util.concurrent.CopyOnWriteArraySet;

/** Tracks media that has been downloaded. */
/**
* Tracks media that has been downloaded.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
public class DownloadTracker {

/** Listens for changes in the tracked downloads. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,15 @@
import java.util.Map;
import java.util.UUID;

/** Util to read from and populate an intent. */
/**
* Util to read from and populate an intent.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
public class IntentUtil {

// Actions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,15 @@
import java.util.List;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;

/** An activity that plays media using {@link ExoPlayer}. */
/**
* An activity that plays media using {@link ExoPlayer}.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
public class PlayerActivity extends AppCompatActivity
implements OnClickListener, StyledPlayerView.ControllerVisibilityListener {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,15 @@
import java.util.Map;
import java.util.UUID;

/** An activity for selecting from a list of media samples. */
/**
* An activity for selecting from a list of media samples.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
public class SampleChooserActivity extends AppCompatActivity
implements DownloadTracker.Listener, OnChildClickListener {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,15 @@
import java.util.List;
import java.util.Map;

/** Dialog to select tracks. */
/**
* Dialog to select tracks.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
public final class TrackSelectionDialog extends DialogFragment {

/** Called when tracks are selected. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,15 @@
import com.google.android.exoplayer2.util.Util;
import java.util.UUID;

/** Activity that demonstrates use of {@link SurfaceControl} with ExoPlayer. */
/**
* Activity that demonstrates use of {@link SurfaceControl} with ExoPlayer.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
public final class MainActivity extends Activity {

private static final String DEFAULT_MEDIA_URI =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@
/**
* An {@link Activity} that sets the configuration to use for exporting and playing media, using
* {@link TransformerActivity}.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
public final class ConfigurationActivity extends AppCompatActivity {
public static final String SHOULD_REMOVE_AUDIO = "should_remove_audio";
public static final String SHOULD_REMOVE_VIDEO = "should_remove_video";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@
* Factory for {@link GlMatrixTransformation GlMatrixTransformations} and {@link
* MatrixTransformation MatrixTransformations} that create video effects by applying transformation
* matrices to the individual video frames.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
/* package */ final class MatrixTransformationFactory {
/**
* Returns a {@link MatrixTransformation} that rescales the frames over the first {@link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@
/**
* A {@link SingleFrameGlShaderProgram} that periodically dims the frames such that pixels are
* darker the further they are away from the frame center.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
/* package */ final class PeriodicVignetteShaderProgram extends SingleFrameGlShaderProgram {

private static final String VERTEX_SHADER_PATH = "vertex_shader_copy_es2.glsl";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@
/**
* A {@link TextureOverlay} that displays a "time elapsed" timer in the bottom left corner of the
* frame.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
/* package */ final class TimerOverlay extends TextOverlay {

private final OverlaySettings overlaySettings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,15 @@
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
import org.checkerframework.checker.nullness.qual.RequiresNonNull;

/** An {@link Activity} that exports and plays media using {@link Transformer}. */
/**
* An {@link Activity} that exports and plays media using {@link Transformer}.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
public final class TransformerActivity extends AppCompatActivity {
private static final String TAG = "TransformerActivity";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,15 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;

/** Runs a MediaPipe graph on input frames. */
/**
* Runs a MediaPipe graph on input frames.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
/* package */ final class MediaPipeShaderProgram implements GlShaderProgram {

private static final String THREAD_NAME = "Demo:MediaPipeShaderProgram";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,16 @@
import com.google.android.exoplayer2.util.Util;
import java.nio.ByteBuffer;

/** Gav1 decoder. */
/**
* Gav1 decoder.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@VisibleForTesting(otherwise = PACKAGE_PRIVATE)
@Deprecated
public final class Gav1Decoder
extends SimpleDecoder<DecoderInputBuffer, VideoDecoderOutputBuffer, Gav1DecoderException> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@

import com.google.android.exoplayer2.decoder.DecoderException;

/** Thrown when a libgav1 decoder error occurs. */
/**
* Thrown when a libgav1 decoder error occurs.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
public final class Gav1DecoderException extends DecoderException {

/* package */ Gav1DecoderException(String message) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@
import com.google.android.exoplayer2.ExoPlayerLibraryInfo;
import com.google.android.exoplayer2.util.LibraryLoader;

/** Configures and queries the underlying native library. */
/**
* Configures and queries the underlying native library.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
public final class Gav1Library {

static {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@
import com.google.android.exoplayer2.video.DecoderVideoRenderer;
import com.google.android.exoplayer2.video.VideoRendererEventListener;

/** Decodes and renders video using libgav1 decoder. */
/**
* Decodes and renders video using libgav1 decoder.
*
* @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which
* contains the same ExoPlayer code). See <a
* href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the
* migration guide</a> for more details, including a script to help with the migration.
*/
@Deprecated
public class Libgav1VideoRenderer extends DecoderVideoRenderer {

/**
Expand Down
Loading

0 comments on commit 5b4839a

Please sign in to comment.