mirror of https://github.com/androidx/media
Rename FfmpegVideoRenderer to ExperimentalFfmpegVideoRenderer
This makes it clearer that this class can't be used yet. PiperOrigin-RevId: 571267898
This commit is contained in:
parent
002ee0555d
commit
f8d2e362a5
|
@ -36,16 +36,16 @@ import androidx.media3.exoplayer.RendererCapabilities;
|
|||
import androidx.media3.exoplayer.video.DecoderVideoRenderer;
|
||||
import androidx.media3.exoplayer.video.VideoRendererEventListener;
|
||||
|
||||
// TODO: Remove the NOTE below.
|
||||
// TODO: Merge actual implementation in https://github.com/google/ExoPlayer/pull/7132.
|
||||
/**
|
||||
* <b>NOTE: This class if under development and is not yet functional.</b>
|
||||
*
|
||||
* <p>Decodes and renders video using FFmpeg.
|
||||
*/
|
||||
@UnstableApi
|
||||
public final class FfmpegVideoRenderer extends DecoderVideoRenderer {
|
||||
public final class ExperimentalFfmpegVideoRenderer extends DecoderVideoRenderer {
|
||||
|
||||
private static final String TAG = "FfmpegVideoRenderer";
|
||||
private static final String TAG = "ExperimentalFfmpegVideoRenderer";
|
||||
|
||||
/**
|
||||
* Creates a new instance.
|
||||
|
@ -58,7 +58,7 @@ public final class FfmpegVideoRenderer extends DecoderVideoRenderer {
|
|||
* @param maxDroppedFramesToNotify The maximum number of frames that can be dropped between
|
||||
* invocations of {@link VideoRendererEventListener#onDroppedFrames(int, long)}.
|
||||
*/
|
||||
public FfmpegVideoRenderer(
|
||||
public ExperimentalFfmpegVideoRenderer(
|
||||
long allowedJoiningTimeMs,
|
||||
@Nullable Handler eventHandler,
|
||||
@Nullable VideoRendererEventListener eventListener,
|
||||
|
@ -75,7 +75,7 @@ public final class FfmpegVideoRenderer extends DecoderVideoRenderer {
|
|||
@Override
|
||||
public final @RendererCapabilities.Capabilities int supportsFormat(Format format) {
|
||||
// TODO: Remove this line and uncomment the implementation below.
|
||||
return C.FORMAT_UNSUPPORTED_TYPE;
|
||||
return RendererCapabilities.create(C.FORMAT_UNSUPPORTED_TYPE);
|
||||
/*
|
||||
String mimeType = Assertions.checkNotNull(format.sampleMimeType);
|
||||
if (!FfmpegLibrary.isAvailable() || !MimeTypes.isVideo(mimeType)) {
|
|
@ -50,7 +50,8 @@ 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} or {@link ExperimentalFfmpegVideoRenderer}
|
||||
* instance.
|
||||
*
|
||||
* @param libraries The names of the FFmpeg native libraries.
|
||||
*/
|
||||
|
|
|
@ -23,7 +23,7 @@ import org.junit.runner.RunWith;
|
|||
|
||||
/**
|
||||
* Unit test for {@link DefaultRenderersFactoryTest} with {@link FfmpegAudioRenderer} and {@link
|
||||
* FfmpegVideoRenderer}.
|
||||
* ExperimentalFfmpegVideoRenderer}.
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public final class DefaultRenderersFactoryTest {
|
||||
|
@ -37,6 +37,6 @@ public final class DefaultRenderersFactoryTest {
|
|||
@Test
|
||||
public void createRenderers_instantiatesFfmpegVideoRenderer() {
|
||||
DefaultRenderersFactoryAsserts.assertExtensionRendererCreated(
|
||||
FfmpegVideoRenderer.class, C.TRACK_TYPE_VIDEO);
|
||||
ExperimentalFfmpegVideoRenderer.class, C.TRACK_TYPE_VIDEO);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
-keepclassmembers class androidx.media3.decoder.av1.Libgav1VideoRenderer {
|
||||
<init>(long, android.os.Handler, androidx.media3.exoplayer.video.VideoRendererEventListener, int);
|
||||
}
|
||||
-dontnote androidx.media3.decoder.ffmpeg.FfmpegVideoRenderer
|
||||
-keepclassmembers class androidx.media3.decoder.ffmpeg.FfmpegVideoRenderer {
|
||||
-dontnote androidx.media3.decoder.ffmpeg.ExperimentalFfmpegVideoRenderer
|
||||
-keepclassmembers class androidx.media3.decoder.ffmpeg.ExperimentalFfmpegVideoRenderer {
|
||||
<init>(long, android.os.Handler, androidx.media3.exoplayer.video.VideoRendererEventListener, int);
|
||||
}
|
||||
-dontnote androidx.media3.decoder.opus.LibopusAudioRenderer
|
||||
|
|
|
@ -407,7 +407,8 @@ public class DefaultRenderersFactory implements RenderersFactory {
|
|||
|
||||
try {
|
||||
// Full class names used for constructor args so the LINT rule triggers if any of them move.
|
||||
Class<?> clazz = Class.forName("androidx.media3.decoder.ffmpeg.FfmpegVideoRenderer");
|
||||
Class<?> clazz =
|
||||
Class.forName("androidx.media3.decoder.ffmpeg.ExperimentalFfmpegVideoRenderer");
|
||||
Constructor<?> constructor =
|
||||
clazz.getConstructor(
|
||||
long.class,
|
||||
|
|
Loading…
Reference in New Issue