aboutsummaryrefslogtreecommitdiff
path: root/shadows/framework/src/main/java/org/robolectric/shadows/ShadowMediaCodec.java
diff options
context:
space:
mode:
Diffstat (limited to 'shadows/framework/src/main/java/org/robolectric/shadows/ShadowMediaCodec.java')
-rw-r--r--shadows/framework/src/main/java/org/robolectric/shadows/ShadowMediaCodec.java30
1 files changed, 15 insertions, 15 deletions
diff --git a/shadows/framework/src/main/java/org/robolectric/shadows/ShadowMediaCodec.java b/shadows/framework/src/main/java/org/robolectric/shadows/ShadowMediaCodec.java
index 3bee37b16..2e3003ac9 100644
--- a/shadows/framework/src/main/java/org/robolectric/shadows/ShadowMediaCodec.java
+++ b/shadows/framework/src/main/java/org/robolectric/shadows/ShadowMediaCodec.java
@@ -151,12 +151,12 @@ public class ShadowMediaCodec {
}
/** Saves the callback to allow use inside the shadow. */
- @Implementation(minSdk = LOLLIPOP)
+ @Implementation
protected void native_setCallback(MediaCodec.Callback callback) {
this.callback = callback;
}
- @Implementation(minSdk = LOLLIPOP, maxSdk = N_MR1)
+ @Implementation(maxSdk = N_MR1)
protected void native_configure(
String[] keys, Object[] values, Surface surface, MediaCrypto crypto, int flags) {
innerConfigure(keys, values, surface, crypto, flags);
@@ -189,7 +189,7 @@ public class ShadowMediaCodec {
* Starts the async encoding process, by first reporting a format change event, and then
* presenting an input buffer to the callback.
*/
- @Implementation(minSdk = LOLLIPOP)
+ @Implementation
protected void native_start() {
// Reset state
inputBuffersPendingDequeue.clear();
@@ -215,7 +215,7 @@ public class ShadowMediaCodec {
}
/** Flushes the available output buffers. */
- @Implementation(minSdk = LOLLIPOP)
+ @Implementation
protected void native_flush() {
// Reset input buffers only if the MediaCodec is in synchronous mode. If it is in asynchronous
// mode, the client needs to call start().
@@ -237,7 +237,7 @@ public class ShadowMediaCodec {
}
/** Returns the input or output buffer corresponding to the given index, or null if invalid. */
- @Implementation(minSdk = LOLLIPOP)
+ @Implementation
protected ByteBuffer getBuffer(boolean input, int index) {
ByteBuffer[] buffers = input ? inputBuffers : outputBuffers;
return index >= 0 && index < buffers.length && !(input && codecOwnsInputBuffer(index))
@@ -245,7 +245,7 @@ public class ShadowMediaCodec {
: null;
}
- @Implementation(minSdk = LOLLIPOP)
+ @Implementation
protected int native_dequeueInputBuffer(long timeoutUs) {
checkState(!isAsync, "Attempting to deque buffer in Async mode.");
try {
@@ -273,7 +273,7 @@ public class ShadowMediaCodec {
* Triggers presentation of the corresponding output buffer for the given input buffer, and passes
* the given metadata as buffer info.
*/
- @Implementation(minSdk = LOLLIPOP)
+ @Implementation
protected void native_queueInputBuffer(
int index, int offset, int size, long presentationTimeUs, int flags) {
if (index < 0
@@ -291,7 +291,7 @@ public class ShadowMediaCodec {
inputBuffersPendingQueuing.remove(Integer.valueOf(index));
}
- @Implementation(minSdk = LOLLIPOP)
+ @Implementation
protected int native_dequeueOutputBuffer(BufferInfo info, long timeoutUs) {
checkState(!isAsync, "Attempting to deque buffer in Async mode.");
try {
@@ -326,7 +326,7 @@ public class ShadowMediaCodec {
releaseOutputBuffer(index);
}
- @Implementation(minSdk = LOLLIPOP)
+ @Implementation
protected void releaseOutputBuffer(int index, long renderTimestampNs) {
releaseOutputBuffer(index);
}
@@ -405,7 +405,7 @@ public class ShadowMediaCodec {
}
/** Prevents calling Android-only methods on basic ByteBuffer objects. */
- @Implementation(minSdk = LOLLIPOP, maxSdk = TIRAMISU)
+ @Implementation(maxSdk = TIRAMISU)
protected void invalidateByteBuffer(@Nullable ByteBuffer[] buffers, int index) {}
@Implementation(minSdk = U.SDK_INT)
@@ -413,14 +413,14 @@ public class ShadowMediaCodec {
@Nullable ByteBuffer[] buffers, int index, boolean input) {}
/** Prevents calling Android-only methods on basic ByteBuffer objects. */
- @Implementation(minSdk = LOLLIPOP, maxSdk = TIRAMISU)
+ @Implementation(maxSdk = TIRAMISU)
protected void validateInputByteBuffer(@Nullable ByteBuffer[] buffers, int index) {}
@Implementation(minSdk = U.SDK_INT)
protected void validateInputByteBufferLocked(@Nullable ByteBuffer[] buffers, int index) {}
/** Prevents calling Android-only methods on basic ByteBuffer objects. */
- @Implementation(minSdk = LOLLIPOP, maxSdk = TIRAMISU)
+ @Implementation(maxSdk = TIRAMISU)
protected void revalidateByteBuffer(@Nullable ByteBuffer[] buffers, int index) {}
@Implementation(minSdk = U.SDK_INT)
@@ -430,7 +430,7 @@ public class ShadowMediaCodec {
* Prevents calling Android-only methods on basic ByteBuffer objects. Replicates existing behavior
* adjusting buffer positions and limits.
*/
- @Implementation(minSdk = LOLLIPOP, maxSdk = TIRAMISU)
+ @Implementation(maxSdk = TIRAMISU)
protected void validateOutputByteBuffer(
@Nullable ByteBuffer[] buffers, int index, @NonNull BufferInfo info) {
if (buffers != null && index >= 0 && index < buffers.length) {
@@ -448,14 +448,14 @@ public class ShadowMediaCodec {
}
/** Prevents calling Android-only methods on basic ByteBuffer objects. */
- @Implementation(minSdk = LOLLIPOP, maxSdk = TIRAMISU)
+ @Implementation(maxSdk = TIRAMISU)
protected void invalidateByteBuffers(@Nullable ByteBuffer[] buffers) {}
@Implementation(minSdk = U.SDK_INT)
protected void invalidateByteBuffersLocked(@Nullable ByteBuffer[] buffers) {}
/** Prevents attempting to free non-direct ByteBuffer objects. */
- @Implementation(minSdk = LOLLIPOP, maxSdk = TIRAMISU)
+ @Implementation(maxSdk = TIRAMISU)
protected void freeByteBuffer(@Nullable ByteBuffer buffer) {}
@Implementation(minSdk = U.SDK_INT)