Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b8e07ed authored by Lajos Molnar's avatar Lajos Molnar Committed by Automerger Merge Worker
Browse files

Merge "media: trivial implementation of MediaCodec.detachOutputSurface" into...

Merge "media: trivial implementation of MediaCodec.detachOutputSurface" into main am: 86bf87a9 am: 4ea8bc4f

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2974125



Change-Id: I8be7f1102c20170f971f5abe18bf341ecab95c4d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents bd9bdbb2 4ea8bc4f
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -2345,6 +2345,15 @@ final public class MediaCodec {
            throw new IllegalArgumentException("Can't use crypto and descrambler together!");
        }

        // at the moment no codecs support detachable surface
        if (android.media.codec.Flags.nullOutputSurface()) {
            // Detached surface flag is only meaningful if surface is null. Otherwise, it is
            // ignored.
            if (surface == null && (flags & CONFIGURE_FLAG_DETACHED_SURFACE) != 0) {
                throw new IllegalArgumentException("Codec does not support detached surface");
            }
        }

        String[] keys = null;
        Object[] values = null;

@@ -2419,7 +2428,8 @@ final public class MediaCodec {
     *  output.
     *
     *  @throws IllegalStateException if the codec was not
     *                                configured in surface mode.
     *            configured in surface mode or if the codec does not support
     *            detaching the output surface.
     *  @see CONFIGURE_FLAG_DETACHED_SURFACE
     */
    @FlaggedApi(FLAG_NULL_OUTPUT_SURFACE)
@@ -2429,6 +2439,7 @@ final public class MediaCodec {
        }
        // note: we still have a surface in detached mode, so keep mHasSurface
        // we also technically allow calling detachOutputSurface multiple times in a row
        throw new IllegalStateException("codec does not support detaching output surface");
        // native_detachSurface();
    }