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

Side by Side Diff: remoting/client/audio_player.h

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU 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 | « remoting/client/audio_decode_scheduler.cc ('k') | remoting/client/audio_player.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 REMOTING_CLIENT_AUDIO_PLAYER_H_ 5 #ifndef REMOTING_CLIENT_AUDIO_PLAYER_H_
6 #define REMOTING_CLIENT_AUDIO_PLAYER_H_ 6 #define REMOTING_CLIENT_AUDIO_PLAYER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <list> 11 #include <list>
12 #include <memory>
12 13
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/synchronization/lock.h" 15 #include "base/synchronization/lock.h"
16 #include "remoting/proto/audio.pb.h" 16 #include "remoting/proto/audio.pb.h"
17 17
18 namespace remoting { 18 namespace remoting {
19 19
20 class AudioPlayer { 20 class AudioPlayer {
21 public: 21 public:
22 virtual ~AudioPlayer(); 22 virtual ~AudioPlayer();
23 23
24 void ProcessAudioPacket(scoped_ptr<AudioPacket> packet); 24 void ProcessAudioPacket(std::unique_ptr<AudioPacket> packet);
25 25
26 protected: 26 protected:
27 AudioPlayer(); 27 AudioPlayer();
28 28
29 // Return the recommended number of samples to include in a frame. 29 // Return the recommended number of samples to include in a frame.
30 virtual uint32_t GetSamplesPerFrame() = 0; 30 virtual uint32_t GetSamplesPerFrame() = 0;
31 31
32 // Resets the audio player and starts playback. 32 // Resets the audio player and starts playback.
33 // Returns true on success. 33 // Returns true on success.
34 virtual bool ResetAudioPlayer(AudioPacket::SamplingRate sampling_rate) = 0; 34 virtual bool ResetAudioPlayer(AudioPacket::SamplingRate sampling_rate) = 0;
(...skipping 25 matching lines...) Expand all
60 60
61 // The number of bytes from |queued_packets_| that have been consumed. 61 // The number of bytes from |queued_packets_| that have been consumed.
62 size_t bytes_consumed_; 62 size_t bytes_consumed_;
63 63
64 DISALLOW_COPY_AND_ASSIGN(AudioPlayer); 64 DISALLOW_COPY_AND_ASSIGN(AudioPlayer);
65 }; 65 };
66 66
67 } // namespace remoting 67 } // namespace remoting
68 68
69 #endif // REMOTING_CLIENT_AUDIO_PLAYER_H_ 69 #endif // REMOTING_CLIENT_AUDIO_PLAYER_H_
OLDNEW
« no previous file with comments | « remoting/client/audio_decode_scheduler.cc ('k') | remoting/client/audio_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698