@Test public void testParseTrueHdSyncframeAudioSampleCount_nonSyncframe() { assertThat(Ac3Util.parseTrueHdSyncframeAudioSampleCount(TRUEHD_NON_SYNCFRAME_HEADER)) .isEqualTo(0); }
public static int parseTrueHdSyncframeAudioSampleCount(byte[] syncframe) { if (syncframe[4] != (byte) 0xF8 || syncframe[5] != (byte) 0x72 || syncframe[6] != (byte) 0x6F || (syncframe[7] & 0xFE) != 0xBA) { return 0; } boolean isMlp = (syncframe[7] & 0xFF) == 0xBB; return 40 << ((syncframe[isMlp ? 9 : 8] >> 4) & 0x07); }
Ac3Util { public static int parseTrueHdSyncframeAudioSampleCount(byte[] syncframe) { if (syncframe[4] != (byte) 0xF8 || syncframe[5] != (byte) 0x72 || syncframe[6] != (byte) 0x6F || (syncframe[7] & 0xFE) != 0xBA) { return 0; } boolean isMlp = (syncframe[7] & 0xFF) == 0xBB; return 40 << ((syncframe[isMlp ? 9 : 8] >> 4) & 0x07); } }
Ac3Util { public static int parseTrueHdSyncframeAudioSampleCount(byte[] syncframe) { if (syncframe[4] != (byte) 0xF8 || syncframe[5] != (byte) 0x72 || syncframe[6] != (byte) 0x6F || (syncframe[7] & 0xFE) != 0xBA) { return 0; } boolean isMlp = (syncframe[7] & 0xFF) == 0xBB; return 40 << ((syncframe[isMlp ? 9 : 8] >> 4) & 0x07); } private  Ac3Util(); }
Ac3Util { public static int parseTrueHdSyncframeAudioSampleCount(byte[] syncframe) { if (syncframe[4] != (byte) 0xF8 || syncframe[5] != (byte) 0x72 || syncframe[6] != (byte) 0x6F || (syncframe[7] & 0xFE) != 0xBA) { return 0; } boolean isMlp = (syncframe[7] & 0xFF) == 0xBB; return 40 << ((syncframe[isMlp ? 9 : 8] >> 4) & 0x07); } private  Ac3Util(); static Format parseAc3AnnexFFormat(
      ParsableByteArray data, String trackId, String language, DrmInitData drmInitData); static Format parseEAc3AnnexFFormat(
      ParsableByteArray data, String trackId, String language, DrmInitData drmInitData); static SyncFrameInfo parseAc3SyncframeInfo(ParsableBitArray data); static int parseAc3SyncframeSize(byte[] data); static int getAc3SyncframeAudioSampleCount(); static int parseEAc3SyncframeAudioSampleCount(ByteBuffer buffer); static int findTrueHdSyncframeOffset(ByteBuffer buffer); static int parseTrueHdSyncframeAudioSampleCount(byte[] syncframe); static int parseTrueHdSyncframeAudioSampleCount(ByteBuffer buffer, int offset); }
Ac3Util { public static int parseTrueHdSyncframeAudioSampleCount(byte[] syncframe) { if (syncframe[4] != (byte) 0xF8 || syncframe[5] != (byte) 0x72 || syncframe[6] != (byte) 0x6F || (syncframe[7] & 0xFE) != 0xBA) { return 0; } boolean isMlp = (syncframe[7] & 0xFF) == 0xBB; return 40 << ((syncframe[isMlp ? 9 : 8] >> 4) & 0x07); } private  Ac3Util(); static Format parseAc3AnnexFFormat(
      ParsableByteArray data, String trackId, String language, DrmInitData drmInitData); static Format parseEAc3AnnexFFormat(
      ParsableByteArray data, String trackId, String language, DrmInitData drmInitData); static SyncFrameInfo parseAc3SyncframeInfo(ParsableBitArray data); static int parseAc3SyncframeSize(byte[] data); static int getAc3SyncframeAudioSampleCount(); static int parseEAc3SyncframeAudioSampleCount(ByteBuffer buffer); static int findTrueHdSyncframeOffset(ByteBuffer buffer); static int parseTrueHdSyncframeAudioSampleCount(byte[] syncframe); static int parseTrueHdSyncframeAudioSampleCount(ByteBuffer buffer, int offset); static final int TRUEHD_RECHUNK_SAMPLE_COUNT; static final int TRUEHD_SYNCFRAME_PREFIX_LENGTH; }