Lines Matching refs:cue
139 Cue cue = event.second; in updateActiveCues() local
141 if (cue.mEndTimeMs == event.first) { in updateActiveCues()
143 if (DEBUG) Log.v(TAG, "Removing " + cue); in updateActiveCues()
144 mActiveCues.remove(cue); in updateActiveCues()
145 if (cue.mRunID == 0) { in updateActiveCues()
148 } else if (cue.mStartTimeMs == event.first) { in updateActiveCues()
151 if (DEBUG) Log.v(TAG, "Adding " + cue); in updateActiveCues()
152 if (cue.mInnerTimesMs != null) { in updateActiveCues()
153 cue.onTime(timeMs); in updateActiveCues()
155 mActiveCues.add(cue); in updateActiveCues()
156 } else if (cue.mInnerTimesMs != null) { in updateActiveCues()
158 cue.onTime(timeMs); in updateActiveCues()
173 Cue cue = run.mFirstCue; in removeRunsByEndTimeIndex() local
174 while (cue != null) { in removeRunsByEndTimeIndex()
175 mCues.remove(cue); in removeRunsByEndTimeIndex()
176 Cue nextCue = cue.mNextInRun; in removeRunsByEndTimeIndex()
177 cue.mNextInRun = null; in removeRunsByEndTimeIndex()
178 cue = nextCue; in removeRunsByEndTimeIndex()
307 protected synchronized boolean addCue(Cue cue) { in addCue() argument
308 mCues.add(cue); in addCue()
310 if (cue.mRunID != 0) { in addCue()
311 Run run = mRunsByID.get(cue.mRunID); in addCue()
314 mRunsByID.put(cue.mRunID, run); in addCue()
315 run.mEndTimeMs = cue.mEndTimeMs; in addCue()
316 } else if (run.mEndTimeMs < cue.mEndTimeMs) { in addCue()
317 run.mEndTimeMs = cue.mEndTimeMs; in addCue()
321 cue.mNextInRun = run.mFirstCue; in addCue()
322 run.mFirstCue = cue; in addCue()
337 cue.mStartTimeMs + " <= " + nowMs + ", " + in addCue()
338 cue.mEndTimeMs + " >= " + mLastTimeMs); in addCue()
341 cue.mStartTimeMs <= nowMs && in addCue()
343 cue.mEndTimeMs >= mLastTimeMs) { in addCue()
372 cue.mEndTimeMs >= mLastTimeMs && in addCue()
373 (cue.mStartTimeMs < mNextScheduledTimeMs || in addCue()
403 private boolean addEvent(Cue cue, long timeMs) { in addEvent() argument
408 } else if (cues.contains(cue)) { in addEvent()
413 cues.add(cue); in addEvent()
417 private void removeEvent(Cue cue, long timeMs) { in removeEvent() argument
420 cues.remove(cue); in removeEvent()
427 public void add(Cue cue) { in add() argument
429 if (cue.mStartTimeMs >= cue.mEndTimeMs) in add()
432 if (!addEvent(cue, cue.mStartTimeMs)) { in add()
436 long lastTimeMs = cue.mStartTimeMs; in add()
437 if (cue.mInnerTimesMs != null) { in add()
438 for (long timeMs: cue.mInnerTimesMs) { in add()
439 if (timeMs > lastTimeMs && timeMs < cue.mEndTimeMs) { in add()
440 addEvent(cue, timeMs); in add()
446 addEvent(cue, cue.mEndTimeMs); in add()
449 public void remove(Cue cue) { in remove() argument
450 removeEvent(cue, cue.mStartTimeMs); in remove()
451 if (cue.mInnerTimesMs != null) { in remove()
452 for (long timeMs: cue.mInnerTimesMs) { in remove()
453 removeEvent(cue, timeMs); in remove()
456 removeEvent(cue, cue.mEndTimeMs); in remove()
527 Cue cue = mLastEntry.second; in remove() local
528 removeEvent(cue, cue.mStartTimeMs); in remove()
529 if (cue.mInnerTimesMs != null) { in remove()
530 for (long timeMs: cue.mInnerTimesMs) { in remove()
531 removeEvent(cue, timeMs); in remove()