Search in sources :

Example 26 with SeekPoint

use of androidx.media3.extractor.SeekPoint in project media by androidx.

the class XingSeekerTest method getSeekPointsAtStartOfStream.

@Test
public void getSeekPointsAtStartOfStream() {
    SeekPoints seekPoints = seeker.getSeekPoints(0);
    SeekPoint seekPoint = seekPoints.first;
    assertThat(seekPoint).isEqualTo(seekPoints.second);
    assertThat(seekPoint.timeUs).isEqualTo(0);
    assertThat(seekPoint.position).isEqualTo(XING_FRAME_POSITION + xingFrameSize);
}
Also used : SeekPoint(androidx.media3.extractor.SeekPoint) SeekPoints(androidx.media3.extractor.SeekMap.SeekPoints) Test(org.junit.Test)

Example 27 with SeekPoint

use of androidx.media3.extractor.SeekPoint in project media by androidx.

the class XingSeekerTest method getSeekPointsAtEndOfStream.

@Test
public void getSeekPointsAtEndOfStream() {
    SeekPoints seekPoints = seeker.getSeekPoints(STREAM_DURATION_US);
    SeekPoint seekPoint = seekPoints.first;
    assertThat(seekPoint).isEqualTo(seekPoints.second);
    assertThat(seekPoint.timeUs).isEqualTo(STREAM_DURATION_US);
    assertThat(seekPoint.position).isEqualTo(STREAM_LENGTH - 1);
}
Also used : SeekPoint(androidx.media3.extractor.SeekPoint) SeekPoints(androidx.media3.extractor.SeekMap.SeekPoints) Test(org.junit.Test)

Aggregations

SeekPoint (com.google.android.exoplayer2.extractor.SeekPoint)17 SeekPoint (androidx.media3.extractor.SeekPoint)10 Test (org.junit.Test)6 Nullable (androidx.annotation.Nullable)4 SeekPoints (androidx.media3.extractor.SeekMap.SeekPoints)3 SeekPoints (com.google.android.exoplayer2.extractor.SeekMap.SeekPoints)3