Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Side by Side Diff: media/base/silent_sink_suspender.h

Issue 2567143002: media::SilentSinkSuspender should simulate |delay| and |delay_timestamp| (Closed)
Patch Set: build fix content_unittets & media_blink_unittsests Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/base/fake_audio_render_callback.cc ('k') | media/base/silent_sink_suspender.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_BASE_SILENT_SINK_SUSPENDER_H_ 5 #ifndef MEDIA_BASE_SILENT_SINK_SUSPENDER_H_
6 #define MEDIA_BASE_SILENT_SINK_SUSPENDER_H_ 6 #define MEDIA_BASE_SILENT_SINK_SUSPENDER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 bool is_transition_pending_ = false; 96 bool is_transition_pending_ = false;
97 97
98 // Buffers accumulated during the transition from |fake_sink_| to |sink_|. 98 // Buffers accumulated during the transition from |fake_sink_| to |sink_|.
99 std::deque<std::unique_ptr<AudioBus>> buffers_after_silence_; 99 std::deque<std::unique_ptr<AudioBus>> buffers_after_silence_;
100 100
101 // A cancelable task that is posted to switch to or from the |fake_sink_| 101 // A cancelable task that is posted to switch to or from the |fake_sink_|
102 // after a period of silence or first non-silent audio respective. We do this 102 // after a period of silence or first non-silent audio respective. We do this
103 // on Android to save battery consumption. 103 // on Android to save battery consumption.
104 base::CancelableCallback<void(bool)> sink_transition_callback_; 104 base::CancelableCallback<void(bool)> sink_transition_callback_;
105 105
106 // Audio output delay at the moment when transition to |fake_sink_| starts.
107 base::TimeDelta latest_output_delay_;
108 // Audio output delay timestamp at the moment when transition to |fake_sink_|
109 // starts.
110 base::TimeTicks latest_output_delay_timestamp_;
111 // Time when transition to |fake_sink_| starts.
112 base::TimeTicks fake_sink_transition_time_;
113
106 DISALLOW_COPY_AND_ASSIGN(SilentSinkSuspender); 114 DISALLOW_COPY_AND_ASSIGN(SilentSinkSuspender);
107 }; 115 };
108 116
109 } // namespace content 117 } // namespace content
110 118
111 #endif // MEDIA_BASE_SILENT_SINK_SUSPENDER_H_ 119 #endif // MEDIA_BASE_SILENT_SINK_SUSPENDER_H_
OLDNEW
« no previous file with comments | « media/base/fake_audio_render_callback.cc ('k') | media/base/silent_sink_suspender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698