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

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

Issue 10907187: Don't use base::Unretained in AudioDecodeScheduler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/client/audio_decode_scheduler.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_DECODE_SCHEDULER_H_ 5 #ifndef REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_
6 #define REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_ 6 #define REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "remoting/protocol/audio_stub.h" 10 #include "remoting/protocol/audio_stub.h"
(...skipping 21 matching lines...) Expand all
32 virtual ~AudioDecodeScheduler(); 32 virtual ~AudioDecodeScheduler();
33 33
34 // Initializes decoder with the information from the protocol config. 34 // Initializes decoder with the information from the protocol config.
35 void Initialize(const protocol::SessionConfig& config); 35 void Initialize(const protocol::SessionConfig& config);
36 36
37 // AudioStub implementation. 37 // AudioStub implementation.
38 virtual void ProcessAudioPacket(scoped_ptr<AudioPacket> packet, 38 virtual void ProcessAudioPacket(scoped_ptr<AudioPacket> packet,
39 const base::Closure& done) OVERRIDE; 39 const base::Closure& done) OVERRIDE;
40 40
41 private: 41 private:
42 // Called on the audio decoder thread. 42 class Core;
43 void DecodePacket(scoped_ptr<AudioPacket> packet, const base::Closure& done);
44 43
45 // Called on the main thread. 44 scoped_refptr<Core> core_;
46 void ProcessDecodedPacket(scoped_ptr<AudioPacket> packet,
47 const base::Closure& done);
48
49 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
50 scoped_refptr<base::SingleThreadTaskRunner> audio_decode_task_runner_;
51 scoped_ptr<AudioDecoder> decoder_;
52 scoped_ptr<AudioPlayer> audio_player_;
53 45
54 DISALLOW_COPY_AND_ASSIGN(AudioDecodeScheduler); 46 DISALLOW_COPY_AND_ASSIGN(AudioDecodeScheduler);
55 }; 47 };
56 48
57 } // namespace remoting 49 } // namespace remoting
58 50
59 #endif // REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_ 51 #endif // REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/client/audio_decode_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698