mirror of
https://github.com/androidx/media.git
synced 2025-05-15 19:49:50 +08:00
Remove unnecessary TargetApi
annotation
This commit is contained in:
parent
963e517a5a
commit
08ab18be77
@ -17,7 +17,6 @@ package androidx.media3.exoplayer.audio;
|
|||||||
|
|
||||||
import static java.lang.annotation.ElementType.TYPE_USE;
|
import static java.lang.annotation.ElementType.TYPE_USE;
|
||||||
|
|
||||||
import android.annotation.TargetApi;
|
|
||||||
import android.media.AudioTimestamp;
|
import android.media.AudioTimestamp;
|
||||||
import android.media.AudioTrack;
|
import android.media.AudioTrack;
|
||||||
import androidx.annotation.IntDef;
|
import androidx.annotation.IntDef;
|
||||||
@ -120,7 +119,6 @@ import java.lang.annotation.Target;
|
|||||||
* @param systemTimeUs The current system time, in microseconds.
|
* @param systemTimeUs The current system time, in microseconds.
|
||||||
* @return Whether the timestamp was updated.
|
* @return Whether the timestamp was updated.
|
||||||
*/
|
*/
|
||||||
@TargetApi(19) // audioTimestamp will be null if Util.SDK_INT < 19.
|
|
||||||
public boolean maybePollTimestamp(long systemTimeUs) {
|
public boolean maybePollTimestamp(long systemTimeUs) {
|
||||||
if (audioTimestamp == null || (systemTimeUs - lastTimestampSampleTimeUs) < sampleIntervalUs) {
|
if (audioTimestamp == null || (systemTimeUs - lastTimestampSampleTimeUs) < sampleIntervalUs) {
|
||||||
return false;
|
return false;
|
||||||
@ -226,7 +224,6 @@ import java.lang.annotation.Target;
|
|||||||
* If {@link #maybePollTimestamp(long)} or {@link #hasTimestamp()} returned {@code true}, returns
|
* If {@link #maybePollTimestamp(long)} or {@link #hasTimestamp()} returned {@code true}, returns
|
||||||
* the system time at which the latest timestamp was sampled, in microseconds.
|
* the system time at which the latest timestamp was sampled, in microseconds.
|
||||||
*/
|
*/
|
||||||
@TargetApi(19) // audioTimestamp will be null if Util.SDK_INT < 19.
|
|
||||||
public long getTimestampSystemTimeUs() {
|
public long getTimestampSystemTimeUs() {
|
||||||
return audioTimestamp != null ? audioTimestamp.getTimestampSystemTimeUs() : C.TIME_UNSET;
|
return audioTimestamp != null ? audioTimestamp.getTimestampSystemTimeUs() : C.TIME_UNSET;
|
||||||
}
|
}
|
||||||
@ -235,7 +232,6 @@ import java.lang.annotation.Target;
|
|||||||
* If {@link #maybePollTimestamp(long)} or {@link #hasTimestamp()} returned {@code true}, returns
|
* If {@link #maybePollTimestamp(long)} or {@link #hasTimestamp()} returned {@code true}, returns
|
||||||
* the latest timestamp's position in frames.
|
* the latest timestamp's position in frames.
|
||||||
*/
|
*/
|
||||||
@TargetApi(19) // audioTimestamp will be null if Util.SDK_INT < 19.
|
|
||||||
public long getTimestampPositionFrames() {
|
public long getTimestampPositionFrames() {
|
||||||
return audioTimestamp != null ? audioTimestamp.getTimestampPositionFrames() : C.INDEX_UNSET;
|
return audioTimestamp != null ? audioTimestamp.getTimestampPositionFrames() : C.INDEX_UNSET;
|
||||||
}
|
}
|
||||||
|
@ -715,7 +715,6 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TargetApi(17) // Needed for placeholderSurface usage, as it is always null on API level 16.
|
|
||||||
@Override
|
@Override
|
||||||
protected void onReset() {
|
protected void onReset() {
|
||||||
try {
|
try {
|
||||||
@ -866,7 +865,6 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer
|
|||||||
return tunneling && Util.SDK_INT < 23;
|
return tunneling && Util.SDK_INT < 23;
|
||||||
}
|
}
|
||||||
|
|
||||||
@TargetApi(17) // Needed for placeHolderSurface usage, as it is always null on API level 16.
|
|
||||||
@Override
|
@Override
|
||||||
protected MediaCodecAdapter.Configuration getMediaCodecConfiguration(
|
protected MediaCodecAdapter.Configuration getMediaCodecConfiguration(
|
||||||
MediaCodecInfo codecInfo,
|
MediaCodecInfo codecInfo,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user