### Question:
AdtsAacStreamingTrack extends AbstractStreamingTrack implements Callable<Void> { public Void call() throws Exception { AdtsHeader header; int i = 1; try { while ((header = readADTSHeader(is)) != null) { if (firstHeader == null) { firstHeader = header; gotFirstSample.countDown(); } byte[] frame = new byte[header.frameLength - header.getSize()]; int n = 0; while (n < frame.length) { int count = is.read(frame, n, frame.length - n); if (count < 0) throw new EOFException(); n += count; } sampleSink.acceptSample(new StreamingSampleImpl(ByteBuffer.wrap(frame), 1024), this); } } catch (EOFException e) { LOG.info("Done reading ADTS AAC file."); } return null; } AdtsAacStreamingTrack(InputStream is, long avgBitrate, long maxBitrate); boolean isClosed(); synchronized SampleDescriptionBox getSampleDescriptionBox(); long getTimescale(); String getHandler(); String getLanguage(); void setLanguage(String lang); void close(); Void call(); @Override String toString();  }### Answer:
@Test public void testMuxing() throws Exception { AdtsAacStreamingTrack b = new AdtsAacStreamingTrack(AdtsAacStreamingTrackTest.class.getResourceAsStream("/org/mp4parser/streaming/input/aac/somesound.aac"), 65000, 80000); ByteArrayOutputStream baos = new ByteArrayOutputStream(); new FragmentedMp4Writer(Collections.<StreamingTrack>singletonList(b), Channels.newChannel(baos)); b.call(); IsoFile isoFile = new IsoFile(Channels.newChannel(new ByteArrayInputStream(baos.toByteArray()))); new FileOutputStream("output.mp4").write(baos.toByteArray()); Walk.through(isoFile); List<Sample> s = new Mp4SampleList(1, isoFile, new InMemRandomAccessSourceImpl(baos.toByteArray())); for (Sample sample : s) { sample.asByteBuffer(); } }