| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_RENDERERS_RENDERER_IMPL_H_ | 5 #ifndef MEDIA_RENDERERS_RENDERER_IMPL_H_ |
| 6 #define MEDIA_RENDERERS_RENDERER_IMPL_H_ | 6 #define MEDIA_RENDERERS_RENDERER_IMPL_H_ |
| 7 | 7 |
| 8 #include <vector> |
| 9 |
| 8 #include "base/cancelable_callback.h" | 10 #include "base/cancelable_callback.h" |
| 9 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 12 #include "base/synchronization/lock.h" | 14 #include "base/synchronization/lock.h" |
| 13 #include "base/time/clock.h" | 15 #include "base/time/clock.h" |
| 14 #include "base/time/default_tick_clock.h" | 16 #include "base/time/default_tick_clock.h" |
| 15 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 16 #include "media/base/buffering_state.h" | 18 #include "media/base/buffering_state.h" |
| 17 #include "media/base/decryptor.h" | 19 #include "media/base/decryptor.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 75 |
| 74 private: | 76 private: |
| 75 enum State { | 77 enum State { |
| 76 STATE_UNINITIALIZED, | 78 STATE_UNINITIALIZED, |
| 77 STATE_INITIALIZING, | 79 STATE_INITIALIZING, |
| 78 STATE_FLUSHING, | 80 STATE_FLUSHING, |
| 79 STATE_PLAYING, | 81 STATE_PLAYING, |
| 80 STATE_ERROR | 82 STATE_ERROR |
| 81 }; | 83 }; |
| 82 | 84 |
| 83 base::TimeTicks GetWallClockTime(base::TimeDelta time); | 85 bool GetWallClockTime(const std::vector<base::TimeDelta>& media_timestamps, |
| 86 std::vector<base::TimeTicks>* wall_clock_times); |
| 84 | 87 |
| 85 // Requests that this object notifies when a decryptor is ready through the | 88 // Requests that this object notifies when a decryptor is ready through the |
| 86 // |decryptor_ready_cb| provided. | 89 // |decryptor_ready_cb| provided. |
| 87 // If |decryptor_ready_cb| is null, the existing callback will be fired with | 90 // If |decryptor_ready_cb| is null, the existing callback will be fired with |
| 88 // nullptr immediately and reset. | 91 // nullptr immediately and reset. |
| 89 void SetDecryptorReadyCallback(const DecryptorReadyCB& decryptor_ready_cb); | 92 void SetDecryptorReadyCallback(const DecryptorReadyCB& decryptor_ready_cb); |
| 90 | 93 |
| 91 // Helper functions and callbacks for Initialize(). | 94 // Helper functions and callbacks for Initialize(). |
| 92 void InitializeAudioRenderer(); | 95 void InitializeAudioRenderer(); |
| 93 void OnAudioRendererInitializeDone(PipelineStatus status); | 96 void OnAudioRendererInitializeDone(PipelineStatus status); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 | 189 |
| 187 base::WeakPtr<RendererImpl> weak_this_; | 190 base::WeakPtr<RendererImpl> weak_this_; |
| 188 base::WeakPtrFactory<RendererImpl> weak_factory_; | 191 base::WeakPtrFactory<RendererImpl> weak_factory_; |
| 189 | 192 |
| 190 DISALLOW_COPY_AND_ASSIGN(RendererImpl); | 193 DISALLOW_COPY_AND_ASSIGN(RendererImpl); |
| 191 }; | 194 }; |
| 192 | 195 |
| 193 } // namespace media | 196 } // namespace media |
| 194 | 197 |
| 195 #endif // MEDIA_RENDERERS_RENDERER_IMPL_H_ | 198 #endif // MEDIA_RENDERERS_RENDERER_IMPL_H_ |
| OLD | NEW |