Class FakeSampleStream.FakeSampleStreamItem

    • Method Detail

      • oneByteSample

        public static FakeSampleStream.FakeSampleStreamItem oneByteSample​(long timeUs)
        Creates an item representing a sample with the provided timestamp.

        The sample will contain a single byte of data.

        Parameters:
        timeUs - The timestamp of the sample.
      • oneByteSample

        public static FakeSampleStream.FakeSampleStreamItem oneByteSample​(long timeUs,
                                                                          @com.google.android.exoplayer2.C.BufferFlags int flags)
        Creates an item representing a sample with the provided timestamp and flags.

        The sample will contain a single byte of data.

        Parameters:
        timeUs - The timestamp of the sample.
        flags - The sample C.BufferFlags.
      • sample

        public static FakeSampleStream.FakeSampleStreamItem sample​(long timeUs,
                                                                   @com.google.android.exoplayer2.C.BufferFlags int flags,
                                                                   byte[] sampleData)
        Creates an item representing a sample with the provided timestamp, flags and data.
        Parameters:
        timeUs - The timestamp of the sample.
        flags - The sample C.BufferFlags.
        sampleData - The sample data.