Loading media/java/android/media/MediaCodec.java +12 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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) Loading @@ -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(); } Loading Loading
media/java/android/media/MediaCodec.java +12 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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) Loading @@ -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(); } Loading