| 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_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_ | 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_ |
| 6 #define MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_ | 6 #define MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 STATE_FLUSHING, | 50 STATE_FLUSHING, |
| 51 STATE_PLAYING, | 51 STATE_PLAYING, |
| 52 STATE_ERROR | 52 STATE_ERROR |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 // Called when the MojoDemuxerStreamAdapter is ready to go (has a config, | 55 // Called when the MojoDemuxerStreamAdapter is ready to go (has a config, |
| 56 // pipe handle, etc) and can be handed off to a renderer for use. | 56 // pipe handle, etc) and can be handed off to a renderer for use. |
| 57 void OnStreamReady(const mojo::Closure& callback); | 57 void OnStreamReady(const mojo::Closure& callback); |
| 58 | 58 |
| 59 // Called when |audio_renderer_| initialization has completed. | 59 // Called when |audio_renderer_| initialization has completed. |
| 60 void OnRendererInitializeDone(const mojo::Closure& callback); | 60 void OnRendererInitializeDone(const mojo::Closure& callback, |
| 61 PipelineStatus status); |
| 61 | 62 |
| 62 // Callback executed by filters to update statistics. | 63 // Callback executed by filters to update statistics. |
| 63 void OnUpdateStatistics(const PipelineStatistics& stats); | 64 void OnUpdateStatistics(const PipelineStatistics& stats); |
| 64 | 65 |
| 65 // Periodically polls the media time from the renderer and notifies the client | 66 // Periodically polls the media time from the renderer and notifies the client |
| 66 // if the media time has changed since the last update. If |force| is true, | 67 // if the media time has changed since the last update. If |force| is true, |
| 67 // the client is notified even if the time is unchanged. | 68 // the client is notified even if the time is unchanged. |
| 68 void UpdateMediaTime(bool force); | 69 void UpdateMediaTime(bool force); |
| 69 void CancelPeriodicMediaTimeUpdates(); | 70 void CancelPeriodicMediaTimeUpdates(); |
| 70 void SchedulePeriodicMediaTimeUpdates(); | 71 void SchedulePeriodicMediaTimeUpdates(); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 93 | 94 |
| 94 base::WeakPtr<MojoRendererService> weak_this_; | 95 base::WeakPtr<MojoRendererService> weak_this_; |
| 95 base::WeakPtrFactory<MojoRendererService> weak_factory_; | 96 base::WeakPtrFactory<MojoRendererService> weak_factory_; |
| 96 | 97 |
| 97 DISALLOW_COPY_AND_ASSIGN(MojoRendererService); | 98 DISALLOW_COPY_AND_ASSIGN(MojoRendererService); |
| 98 }; | 99 }; |
| 99 | 100 |
| 100 } // namespace media | 101 } // namespace media |
| 101 | 102 |
| 102 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_ | 103 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_ |
| OLD | NEW |