com.coremedia.iso.boxes.CompositionTimeToSample Java Examples
The following examples show how to use
com.coremedia.iso.boxes.CompositionTimeToSample.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MP4Builder.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
protected void createCtts(Track track, SampleTableBox stbl) { int[] sampleCompositions = track.getSampleCompositions(); if (sampleCompositions == null) { return; } CompositionTimeToSample.Entry lastEntry = null; List<CompositionTimeToSample.Entry> entries = new ArrayList<>(); for (int a = 0; a < sampleCompositions.length; a++) { int offset = sampleCompositions[a]; if (lastEntry != null && lastEntry.getOffset() == offset) { lastEntry.setCount(lastEntry.getCount() + 1); } else { lastEntry = new CompositionTimeToSample.Entry(1, offset); entries.add(lastEntry); } } CompositionTimeToSample ctts = new CompositionTimeToSample(); ctts.setEntries(entries); stbl.addBox(ctts); }
Example #2
Source File: MP4Builder.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
protected void createCtts(Track track, SampleTableBox stbl) { int[] sampleCompositions = track.getSampleCompositions(); if (sampleCompositions == null) { return; } CompositionTimeToSample.Entry lastEntry = null; List<CompositionTimeToSample.Entry> entries = new ArrayList<>(); for (int a = 0; a < sampleCompositions.length; a++) { int offset = sampleCompositions[a]; if (lastEntry != null && lastEntry.getOffset() == offset) { lastEntry.setCount(lastEntry.getCount() + 1); } else { lastEntry = new CompositionTimeToSample.Entry(1, offset); entries.add(lastEntry); } } CompositionTimeToSample ctts = new CompositionTimeToSample(); ctts.setEntries(entries); stbl.addBox(ctts); }
Example #3
Source File: MP4Builder.java From Telegram-FOSS with GNU General Public License v2.0 | 6 votes |
protected void createCtts(Track track, SampleTableBox stbl) { int[] sampleCompositions = track.getSampleCompositions(); if (sampleCompositions == null) { return; } CompositionTimeToSample.Entry lastEntry = null; List<CompositionTimeToSample.Entry> entries = new ArrayList<>(); for (int a = 0; a < sampleCompositions.length; a++) { int offset = sampleCompositions[a]; if (lastEntry != null && lastEntry.getOffset() == offset) { lastEntry.setCount(lastEntry.getCount() + 1); } else { lastEntry = new CompositionTimeToSample.Entry(1, offset); entries.add(lastEntry); } } CompositionTimeToSample ctts = new CompositionTimeToSample(); ctts.setEntries(entries); stbl.addBox(ctts); }
Example #4
Source File: MP4Builder.java From Telegram with GNU General Public License v2.0 | 6 votes |
protected void createCtts(Track track, SampleTableBox stbl) { int[] sampleCompositions = track.getSampleCompositions(); if (sampleCompositions == null) { return; } CompositionTimeToSample.Entry lastEntry = null; List<CompositionTimeToSample.Entry> entries = new ArrayList<>(); for (int a = 0; a < sampleCompositions.length; a++) { int offset = sampleCompositions[a]; if (lastEntry != null && lastEntry.getOffset() == offset) { lastEntry.setCount(lastEntry.getCount() + 1); } else { lastEntry = new CompositionTimeToSample.Entry(1, offset); entries.add(lastEntry); } } CompositionTimeToSample ctts = new CompositionTimeToSample(); ctts.setEntries(entries); stbl.addBox(ctts); }