| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 class DocumentTimeline; | 39 class DocumentTimeline; |
| 40 | 40 |
| 41 class Player FINAL : public RefCounted<Player> { | 41 class Player FINAL : public RefCounted<Player> { |
| 42 | 42 |
| 43 public: | 43 public: |
| 44 ~Player(); | 44 ~Player(); |
| 45 static PassRefPtr<Player> create(DocumentTimeline*, TimedItem*); | 45 static PassRefPtr<Player> create(DocumentTimeline*, TimedItem*); |
| 46 | 46 |
| 47 // Returns whether this player is still current or in effect. | 47 // Returns whether this player is still current or in effect. |
| 48 bool update(); | 48 // timeToEffectChange returns: |
| 49 // infinity - if this player is no longer in effect |
| 50 // 0 - if this player requires an update on the next frame |
| 51 // n - if this player requires an update after 'n' units of time |
| 52 bool update(double* timeToEffectChange = 0); |
| 53 |
| 49 void cancel(); | 54 void cancel(); |
| 50 double currentTime() const; | 55 double currentTime() const; |
| 51 void setCurrentTime(double); | 56 void setCurrentTime(double); |
| 52 bool paused() const { return !isNull(m_pauseStartTime); } | 57 bool paused() const { return !isNull(m_pauseStartTime); } |
| 53 void setPaused(bool); | 58 void setPaused(bool); |
| 54 double playbackRate() const { return m_playbackRate; } | 59 double playbackRate() const { return m_playbackRate; } |
| 55 void setPlaybackRate(double); | 60 void setPlaybackRate(double); |
| 56 double startTime() const { return m_startTime; } | 61 double startTime() const { return m_startTime; } |
| 57 double timeDrift() const; | 62 double timeDrift() const; |
| 58 DocumentTimeline* timeline() { return m_timeline; } | 63 DocumentTimeline* timeline() { return m_timeline; } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 69 double m_timeDrift; | 74 double m_timeDrift; |
| 70 const double m_startTime; | 75 const double m_startTime; |
| 71 | 76 |
| 72 RefPtr<TimedItem> m_content; | 77 RefPtr<TimedItem> m_content; |
| 73 DocumentTimeline* const m_timeline; | 78 DocumentTimeline* const m_timeline; |
| 74 }; | 79 }; |
| 75 | 80 |
| 76 } // namespace | 81 } // namespace |
| 77 | 82 |
| 78 #endif | 83 #endif |
| OLD | NEW |