Java Code Examples for com.google.android.exoplayer2.text.Cue#EMPTY
The following examples show how to use
com.google.android.exoplayer2.text.Cue#EMPTY .
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: SubripSubtitle.java From MediaSDK with Apache License 2.0 | 5 votes |
@Override public List<Cue> getCues(long timeUs) { int index = Util.binarySearchFloor(cueTimesUs, timeUs, true, false); if (index == -1 || cues[index] == Cue.EMPTY) { // timeUs is earlier than the start of the first cue, or we have an empty cue. return Collections.emptyList(); } else { return Collections.singletonList(cues[index]); } }
Example 2
Source File: SsaSubtitle.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
@Override public List<Cue> getCues(long timeUs) { int index = Util.binarySearchFloor(cueTimesUs, timeUs, true, false); if (index == -1 || cues[index] == Cue.EMPTY) { // timeUs is earlier than the start of the first cue, or we have an empty cue. return Collections.emptyList(); } else { return Collections.singletonList(cues[index]); } }
Example 3
Source File: SubripSubtitle.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
@Override public List<Cue> getCues(long timeUs) { int index = Util.binarySearchFloor(cueTimesUs, timeUs, true, false); if (index == -1 || cues[index] == Cue.EMPTY) { // timeUs is earlier than the start of the first cue, or we have an empty cue. return Collections.emptyList(); } else { return Collections.singletonList(cues[index]); } }
Example 4
Source File: SsaSubtitle.java From Telegram with GNU General Public License v2.0 | 5 votes |
@Override public List<Cue> getCues(long timeUs) { int index = Util.binarySearchFloor(cueTimesUs, timeUs, true, false); if (index == -1 || cues[index] == Cue.EMPTY) { // timeUs is earlier than the start of the first cue, or we have an empty cue. return Collections.emptyList(); } else { return Collections.singletonList(cues[index]); } }
Example 5
Source File: SubripSubtitle.java From Telegram with GNU General Public License v2.0 | 5 votes |
@Override public List<Cue> getCues(long timeUs) { int index = Util.binarySearchFloor(cueTimesUs, timeUs, true, false); if (index == -1 || cues[index] == Cue.EMPTY) { // timeUs is earlier than the start of the first cue, or we have an empty cue. return Collections.emptyList(); } else { return Collections.singletonList(cues[index]); } }