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

Commit d5f79663 authored by Santiago Seifert's avatar Santiago Seifert
Browse files

Document onSampleCompleted.cryptoInfo

Bug: 152766234
Test: atest CtsMediaParserTestCases
Change-Id: Ic8182671c1521f5d6db346a6c4a44c5be273db32
parent c322ed21
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ import android.annotation.CheckResult;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.StringDef;
import android.media.MediaCodec.CryptoInfo;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Pair;
@@ -386,7 +387,7 @@ public final class MediaParser {
        /**
         * Called once all the data of a sample has been passed to {@link #onSampleDataFound}.
         *
         * <p>Also includes sample metadata, like presentation timestamp and flags.
         * <p>Includes sample metadata, like presentation timestamp and flags.
         *
         * @param trackIndex The index of the track to which the sample corresponds.
         * @param timeMicros The media timestamp associated with the sample, in microseconds.
@@ -396,8 +397,10 @@ public final class MediaParser {
         * @param offset The number of bytes that have been consumed by {@code
         *     onSampleDataFound(int, MediaParser.InputReader)} for the specified track, since the
         *     last byte belonging to the sample whose metadata is being passed.
         * @param cryptoData Encryption data required to decrypt the sample. May be null for
         *     unencrypted samples.
         * @param cryptoInfo Encryption data required to decrypt the sample. May be null for
         *     unencrypted samples. MediaParser may reuse {@link CryptoInfo} instances to avoid
         *     allocations, so implementations of this method must not write to or keep reference to
         *     the fields of this parameter.
         */
        void onSampleCompleted(
                int trackIndex,
@@ -405,7 +408,7 @@ public final class MediaParser {
                int flags,
                int size,
                int offset,
                @Nullable MediaCodec.CryptoInfo cryptoData);
                @Nullable CryptoInfo cryptoInfo);
    }

    /**
@@ -1404,7 +1407,7 @@ public final class MediaParser {
        return null;
    }

    private static MediaCodec.CryptoInfo toCryptoInfo(TrackOutput.CryptoData encryptionData) {
    private static CryptoInfo toCryptoInfo(TrackOutput.CryptoData encryptionData) {
        // TODO: Implement.
        return null;
    }