Rename getVideoSurfaceSize to getSurfaceSize

This better matches the callback name (onSurfaceSizeChanged) and
probably cause less confusion with getVideoSize.

PiperOrigin-RevId: 488669786
This commit is contained in:
tonihei 2022-11-15 16:51:12 +00:00 committed by microkatz
parent 491b13622e
commit 1143edc59a
12 changed files with 17 additions and 17 deletions

View File

@ -28,7 +28,7 @@ Release notes
([#10667](https://github.com/google/ExoPlayer/issues/10667)).
* Enforce minimum `compileSdkVersion` to avoid compilation errors
([#10684](https://github.com/google/ExoPlayer/issues/10684)).
* Add `Player.getVideoSurfaceSize` that returns the size of the surface on
* Add `Player.getSurfaceSize` that returns the size of the surface on
which the video is rendered.
* Tweak the renderer's decoder ordering logic to uphold the
`MediaCodecSelector`'s preferences, even if a decoder reports it may not

View File

@ -730,7 +730,7 @@ public final class CastPlayer extends BasePlayer {
/** This method is not supported and returns {@link Size#UNKNOWN}. */
@Override
public Size getVideoSurfaceSize() {
public Size getSurfaceSize() {
return Size.UNKNOWN;
}

View File

@ -760,10 +760,10 @@ public class ForwardingPlayer implements Player {
return player.getVideoSize();
}
/** Calls {@link Player#getVideoSurfaceSize()} on the delegate and returns the result. */
/** Calls {@link Player#getSurfaceSize()} on the delegate and returns the result. */
@Override
public Size getVideoSurfaceSize() {
return player.getVideoSurfaceSize();
public Size getSurfaceSize() {
return player.getSurfaceSize();
}
/** Calls {@link Player#clearVideoSurface()} on the delegate. */

View File

@ -2519,7 +2519,7 @@ public interface Player {
* @see Listener#onSurfaceSizeChanged(int, int)
*/
@UnstableApi
Size getVideoSurfaceSize();
Size getSurfaceSize();
/** Returns the current {@link CueGroup}. */
CueGroup getCurrentCues();

View File

@ -591,7 +591,7 @@ public abstract class SimpleBasePlayer extends BasePlayer {
}
@Override
public final Size getVideoSurfaceSize() {
public final Size getSurfaceSize() {
// TODO: implement.
throw new IllegalStateException();
}

View File

@ -1231,7 +1231,7 @@ import java.util.concurrent.TimeoutException;
}
@Override
public Size getVideoSurfaceSize() {
public Size getSurfaceSize() {
verifyApplicationThread();
return surfaceSize;
}

View File

@ -530,9 +530,9 @@ public class SimpleExoPlayer extends BasePlayer
}
@Override
public Size getVideoSurfaceSize() {
public Size getSurfaceSize() {
blockUntilConstructorFinished();
return player.getVideoSurfaceSize();
return player.getSurfaceSize();
}
@Override

View File

@ -1501,9 +1501,9 @@ public class MediaController implements Player {
@UnstableApi
@Override
public Size getVideoSurfaceSize() {
public Size getSurfaceSize() {
verifyApplicationThread();
return isConnected() ? impl.getVideoSurfaceSize() : Size.UNKNOWN;
return isConnected() ? impl.getSurfaceSize() : Size.UNKNOWN;
}
@Override
@ -1976,7 +1976,7 @@ public class MediaController implements Player {
VideoSize getVideoSize();
Size getVideoSurfaceSize();
Size getSurfaceSize();
void clearVideoSurface();

View File

@ -1566,7 +1566,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
}
@Override
public Size getVideoSurfaceSize() {
public Size getSurfaceSize() {
return surfaceSize;
}

View File

@ -963,7 +963,7 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
}
@Override
public Size getVideoSurfaceSize() {
public Size getSurfaceSize() {
Log.w(TAG, "Session doesn't support getting VideoSurfaceSize");
return Size.UNKNOWN;
}

View File

@ -1138,7 +1138,7 @@ public class MockPlayer implements Player {
}
@Override
public Size getVideoSurfaceSize() {
public Size getSurfaceSize() {
return surfaceSize;
}

View File

@ -353,7 +353,7 @@ public class StubPlayer extends BasePlayer {
}
@Override
public Size getVideoSurfaceSize() {
public Size getSurfaceSize() {
throw new UnsupportedOperationException();
}