| 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 CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_CLIENT_H_ | 5 #ifndef CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_CLIENT_H_ |
| 6 #define CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_CLIENT_H_ | 6 #define CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "media/base/buffering_state.h" | 10 #include "media/base/buffering_state.h" |
| 11 #include "media/base/pipeline_status.h" | 11 #include "media/base/pipeline_status.h" |
| 12 | 12 |
| 13 namespace chromecast { | 13 namespace chromecast { |
| 14 namespace media { | 14 namespace media { |
| 15 | 15 |
| 16 struct MediaPipelineClient { | 16 struct RendererMediaPipelineClient { |
| 17 typedef base::Callback<void( | 17 typedef base::Callback<void( |
| 18 base::TimeDelta, base::TimeDelta, base::TimeTicks)> TimeUpdateCB; | 18 base::TimeDelta, base::TimeDelta, base::TimeTicks)> TimeUpdateCB; |
| 19 | 19 |
| 20 MediaPipelineClient(); | 20 RendererMediaPipelineClient(); |
| 21 ~MediaPipelineClient(); | 21 ~RendererMediaPipelineClient(); |
| 22 | 22 |
| 23 // Callback used to report a playback error as a ::media::PipelineStatus. | 23 // Callback used to report a playback error as a ::media::PipelineStatus. |
| 24 ::media::PipelineStatusCB error_cb; | 24 ::media::PipelineStatusCB error_cb; |
| 25 |
| 26 // Callback used to report the latest playback time, |
| 27 // as well as the maximum time available for rendering. |
| 28 TimeUpdateCB time_update_cb; |
| 29 |
| 30 // Callback used to report the buffering status. |
| 31 ::media::BufferingStateCB buffering_state_cb; |
| 32 |
| 33 // Callback used to report the creation and destruction of |
| 34 // MediaPipelineBackend |
| 35 base::Closure pipeline_backend_created_cb; |
| 36 base::Closure pipeline_backend_destroyed_cb; |
| 37 }; |
| 38 |
| 39 struct BrowserMediaPipelineClient { |
| 40 typedef base::Callback< |
| 41 void(base::TimeDelta, base::TimeDelta, base::TimeTicks)> TimeUpdateCB; |
| 42 |
| 43 BrowserMediaPipelineClient(); |
| 44 ~BrowserMediaPipelineClient(); |
| 45 |
| 46 // Callback used to report a playback error as a ::media::PipelineStatus. |
| 47 ::media::PipelineStatusCB error_cb; |
| 25 | 48 |
| 26 // Callback used to report the latest playback time, | 49 // Callback used to report the latest playback time, |
| 27 // as well as the maximum time available for rendering. | 50 // as well as the maximum time available for rendering. |
| 28 TimeUpdateCB time_update_cb; | 51 TimeUpdateCB time_update_cb; |
| 29 | 52 |
| 30 // Callback used to report the buffering status. | 53 // Callback used to report the buffering status. |
| 31 ::media::BufferingStateCB buffering_state_cb; | 54 ::media::BufferingStateCB buffering_state_cb; |
| 32 | 55 |
| 33 // Callback used to report the creation and destruction of | 56 // Callback used to report the creation and destruction of |
| 34 // MediaPipelineBackend | 57 // MediaPipelineBackend |
| 35 base::Closure pipeline_backend_created_cb; | 58 base::Closure pipeline_backend_created_cb; |
| 36 base::Closure pipeline_backend_destroyed_cb; | 59 base::Closure pipeline_backend_destroyed_cb; |
| 37 }; | 60 }; |
| 38 | 61 |
| 39 } // namespace media | 62 } // namespace media |
| 40 } // namespace chromecast | 63 } // namespace chromecast |
| 41 | 64 |
| 42 #endif // CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_CLIENT_H_ | 65 #endif // CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_CLIENT_H_ |
| OLD | NEW |