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 #include "chromecast/media/cma/pipeline/media_pipeline_impl.h" | 5 #include "chromecast/media/cma/pipeline/media_pipeline_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 struct MediaPipelineImpl::FlushTask { | 77 struct MediaPipelineImpl::FlushTask { |
78 bool audio_flushed; | 78 bool audio_flushed; |
79 bool video_flushed; | 79 bool video_flushed; |
80 base::Closure done_cb; | 80 base::Closure done_cb; |
81 }; | 81 }; |
82 | 82 |
83 MediaPipelineImpl::MediaPipelineImpl() | 83 MediaPipelineImpl::MediaPipelineImpl() |
84 : cdm_context_(nullptr), | 84 : cdm_context_(nullptr), |
85 backend_state_(BACKEND_STATE_UNINITIALIZED), | 85 backend_state_(BACKEND_STATE_UNINITIALIZED), |
86 playback_rate_(1.0f), | 86 playback_rate_(0), |
87 audio_decoder_(nullptr), | 87 audio_decoder_(nullptr), |
88 video_decoder_(nullptr), | 88 video_decoder_(nullptr), |
89 pending_time_update_task_(false), | 89 pending_time_update_task_(false), |
90 last_media_time_(::media::kNoTimestamp), | 90 last_media_time_(::media::kNoTimestamp), |
91 statistics_rolling_counter_(0), | 91 statistics_rolling_counter_(0), |
92 audio_bytes_for_bitrate_estimation_(0), | 92 audio_bytes_for_bitrate_estimation_(0), |
93 video_bytes_for_bitrate_estimation_(0), | 93 video_bytes_for_bitrate_estimation_(0), |
94 playback_stalled_(false), | 94 playback_stalled_(false), |
95 playback_stalled_notification_sent_(false), | 95 playback_stalled_notification_sent_(false), |
96 weak_factory_(this) { | 96 weak_factory_(this) { |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 | 571 |
572 void MediaPipelineImpl::ResetBitrateState() { | 572 void MediaPipelineImpl::ResetBitrateState() { |
573 elapsed_time_delta_ = base::TimeDelta::FromSeconds(0); | 573 elapsed_time_delta_ = base::TimeDelta::FromSeconds(0); |
574 audio_bytes_for_bitrate_estimation_ = 0; | 574 audio_bytes_for_bitrate_estimation_ = 0; |
575 video_bytes_for_bitrate_estimation_ = 0; | 575 video_bytes_for_bitrate_estimation_ = 0; |
576 last_sample_time_ = base::TimeTicks::Now(); | 576 last_sample_time_ = base::TimeTicks::Now(); |
577 } | 577 } |
578 | 578 |
579 } // namespace media | 579 } // namespace media |
580 } // namespace chromecast | 580 } // namespace chromecast |
OLD | NEW |