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

Side by Side Diff: media/audio/clockless_audio_sink.h

Issue 1911913002: Convert //media/audio from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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/audio/audio_power_monitor_unittest.cc ('k') | media/audio/clockless_audio_sink.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_AUDIO_CLOCKLESS_AUDIO_SINK_H_ 5 #ifndef MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_
6 #define MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_ 6 #define MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "media/base/audio_renderer_sink.h" 13 #include "media/base/audio_renderer_sink.h"
14 14
15 namespace base { 15 namespace base {
16 class SingleThreadTaskRunner; 16 class SingleThreadTaskRunner;
17 } 17 }
18 18
19 namespace media { 19 namespace media {
20 class AudioBus; 20 class AudioBus;
21 class ClocklessAudioSinkThread; 21 class ClocklessAudioSinkThread;
(...skipping 21 matching lines...) Expand all
43 // Enables audio frame hashing. Must be called prior to Initialize(). 43 // Enables audio frame hashing. Must be called prior to Initialize().
44 void StartAudioHashForTesting(); 44 void StartAudioHashForTesting();
45 45
46 // Returns the hash of all audio frames seen since construction. 46 // Returns the hash of all audio frames seen since construction.
47 std::string GetAudioHashForTesting(); 47 std::string GetAudioHashForTesting();
48 48
49 protected: 49 protected:
50 ~ClocklessAudioSink() override; 50 ~ClocklessAudioSink() override;
51 51
52 private: 52 private:
53 scoped_ptr<ClocklessAudioSinkThread> thread_; 53 std::unique_ptr<ClocklessAudioSinkThread> thread_;
54 bool initialized_; 54 bool initialized_;
55 bool playing_; 55 bool playing_;
56 bool hashing_; 56 bool hashing_;
57 57
58 // Time taken in last set of Render() calls. 58 // Time taken in last set of Render() calls.
59 base::TimeDelta playback_time_; 59 base::TimeDelta playback_time_;
60 60
61 DISALLOW_COPY_AND_ASSIGN(ClocklessAudioSink); 61 DISALLOW_COPY_AND_ASSIGN(ClocklessAudioSink);
62 }; 62 };
63 63
64 } // namespace media 64 } // namespace media
65 65
66 #endif // MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_ 66 #endif // MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_
OLDNEW
« no previous file with comments | « media/audio/audio_power_monitor_unittest.cc ('k') | media/audio/clockless_audio_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698