package com.foxx.androidcast.media;

/*********************************************************************
 * H264BitstreamHevcTest.java
 * Created at: Sat 16 May 2026 18:50:36 +0200
 * Updated at: Wed 20 May 2026 15:17:13 +0200 by Anton Afanasyeu <a.afanasieff@gmail.com>
 * Commit: 5d8e82d2e60a21fff3138d2a394ee4e8b4c6dcb8
 * class H264BitstreamHevcTest
 * Contributors:
 *    - Anton Afanasyeu <a.afanasieff@gmail.com> (2 commits, 23 lines)
 *    - Cursor Agent (project assistant)
 * Digest: SHA256	9ef0b0dfebf6389a7977b2a18bce65e5d75c7117601dcf9947b9bd458c1f8b4c
**********************************************************************/
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

public class H264BitstreamHevcTest {
    @Test
    public void avccHevcNalGetsStartCode() {
        byte[] vps = {0, 0, 0, 4, 0x40, 0x01, 0x0c, 0x01};
        byte[] annexB = H264Bitstream.toAnnexB(vps);
        assertTrue(annexB[0] == 0 && annexB[1] == 0 && annexB[2] == 0 && annexB[3] == 1);
        assertEquals(0x40, annexB[4] & 0xff);
    }
}
