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

Commit 6430b154 authored by Jeff Tinker's avatar Jeff Tinker Committed by Android (Google) Code Review
Browse files

Merge "Add javadocs to MediaCodec.CryptoInfo methods" into nyc-dev

parents 6e64423c 8ad2965d
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -2221,7 +2221,10 @@ final public class MediaCodec {
        public int mode;

        /**
         * Metadata describing encryption pattern for the protected bytes in a subsample.
         * Metadata describing an encryption pattern for the protected bytes in
         * a subsample.  An encryption pattern consists of a repeating sequence
         * of crypto blocks comprised of a number of encrypted blocks followed
         * by a number of unencrypted, or skipped, blocks.
         */
        public final static class Pattern {
            /**
@@ -2273,6 +2276,10 @@ final public class MediaCodec {
         */
        private Pattern pattern;

        /**
         * Set the subsample count, clear/encrypted sizes, key, IV and mode fields of
         * a {@link MediaCodec.CryptoInfo} instance.
         */
        public void set(
                int newNumSubSamples,
                @NonNull int[] newNumBytesOfClearData,
@@ -2289,6 +2296,10 @@ final public class MediaCodec {
            pattern = new Pattern(0, 0);
        }

        /**
         * Set the encryption pattern on a {@link MediaCodec.CryptoInfo} instance.
         * See {@link MediaCodec.CryptoInfo.Pattern}.
         */
        public void setPattern(Pattern newPattern) {
            pattern = newPattern;
        }