diff --git a/libraries/decoder_ffmpeg/src/main/java/androidx/media3/decoder/ffmpeg/FfmpegLibrary.java b/libraries/decoder_ffmpeg/src/main/java/androidx/media3/decoder/ffmpeg/FfmpegLibrary.java index bc86776cac..19155d8b76 100644 --- a/libraries/decoder_ffmpeg/src/main/java/androidx/media3/decoder/ffmpeg/FfmpegLibrary.java +++ b/libraries/decoder_ffmpeg/src/main/java/androidx/media3/decoder/ffmpeg/FfmpegLibrary.java @@ -50,7 +50,7 @@ public final class FfmpegLibrary { /** * Override the names of the FFmpeg native libraries. If an application wishes to call this * method, it must do so before calling any other method defined by this class, and before - * instantiating a {@link FfmpegAudioRenderer} or {@link FfmpegVideoRenderer} instance. + * instantiating a {@link FfmpegAudioRenderer} instance. * * @param libraries The names of the FFmpeg native libraries. */ @@ -148,10 +148,6 @@ public final class FfmpegLibrary { return "pcm_mulaw"; case MimeTypes.AUDIO_ALAW: return "pcm_alaw"; - case MimeTypes.VIDEO_H264: - return "h264"; - case MimeTypes.VIDEO_H265: - return "hevc"; default: return null; } diff --git a/libraries/decoder_ffmpeg/src/main/java/androidx/media3/decoder/ffmpeg/FfmpegVideoRenderer.java b/libraries/decoder_ffmpeg/src/main/java/androidx/media3/decoder/ffmpeg/FfmpegVideoRenderer.java deleted file mode 100644 index 395b21b33f..0000000000 --- a/libraries/decoder_ffmpeg/src/main/java/androidx/media3/decoder/ffmpeg/FfmpegVideoRenderer.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package androidx.media3.decoder.ffmpeg; - -import static androidx.media3.exoplayer.DecoderReuseEvaluation.DISCARD_REASON_MIME_TYPE_CHANGED; -import static androidx.media3.exoplayer.DecoderReuseEvaluation.REUSE_RESULT_NO; -import static androidx.media3.exoplayer.DecoderReuseEvaluation.REUSE_RESULT_YES_WITHOUT_RECONFIGURATION; - -import android.os.Handler; -import android.view.Surface; -import androidx.annotation.Nullable; -import androidx.media3.common.C; -import androidx.media3.common.Format; -import androidx.media3.common.util.TraceUtil; -import androidx.media3.common.util.UnstableApi; -import androidx.media3.common.util.Util; -import androidx.media3.decoder.CryptoConfig; -import androidx.media3.decoder.Decoder; -import androidx.media3.decoder.DecoderInputBuffer; -import androidx.media3.decoder.VideoDecoderOutputBuffer; -import androidx.media3.exoplayer.DecoderReuseEvaluation; -import androidx.media3.exoplayer.RendererCapabilities; -import androidx.media3.exoplayer.video.DecoderVideoRenderer; -import androidx.media3.exoplayer.video.VideoRendererEventListener; - -// TODO: Remove the NOTE below. -/** - * NOTE: This class if under development and is not yet functional. - * - *
Decodes and renders video using FFmpeg.
- */
-@UnstableApi
-public final class FfmpegVideoRenderer extends DecoderVideoRenderer {
-
- private static final String TAG = "FfmpegVideoRenderer";
-
- /**
- * Creates a new instance.
- *
- * @param allowedJoiningTimeMs The maximum duration in milliseconds for which this video renderer
- * can attempt to seamlessly join an ongoing playback.
- * @param eventHandler A handler to use when delivering events to {@code eventListener}. May be
- * null if delivery of events is not required.
- * @param eventListener A listener of events. May be null if delivery of events is not required.
- * @param maxDroppedFramesToNotify The maximum number of frames that can be dropped between
- * invocations of {@link VideoRendererEventListener#onDroppedFrames(int, long)}.
- */
- public FfmpegVideoRenderer(
- long allowedJoiningTimeMs,
- @Nullable Handler eventHandler,
- @Nullable VideoRendererEventListener eventListener,
- int maxDroppedFramesToNotify) {
- super(allowedJoiningTimeMs, eventHandler, eventListener, maxDroppedFramesToNotify);
- // TODO: Implement.
- }
-
- @Override
- public String getName() {
- return TAG;
- }
-
- @Override
- public final @RendererCapabilities.Capabilities int supportsFormat(Format format) {
- // TODO: Remove this line and uncomment the implementation below.
- return C.FORMAT_UNSUPPORTED_TYPE;
- /*
- String mimeType = Assertions.checkNotNull(format.sampleMimeType);
- if (!FfmpegLibrary.isAvailable() || !MimeTypes.isVideo(mimeType)) {
- return FORMAT_UNSUPPORTED_TYPE;
- } else if (!FfmpegLibrary.supportsFormat(format.sampleMimeType)) {
- return RendererCapabilities.create(FORMAT_UNSUPPORTED_SUBTYPE);
- } else if (format.exoMediaCryptoType != null) {
- return RendererCapabilities.create(FORMAT_UNSUPPORTED_DRM);
- } else {
- return RendererCapabilities.create(
- FORMAT_HANDLED,
- ADAPTIVE_SEAMLESS,
- TUNNELING_NOT_SUPPORTED);
- }
- */
- }
-
- @SuppressWarnings("nullness:return")
- @Override
- protected Decoder