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

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

Issue 810133003: replace NULL->nullptr in src/remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | remoting/client/jni/chromoting_jni_runtime.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 #include "remoting/client/audio_decode_scheduler.h" 5 #include "remoting/client/audio_decode_scheduler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "remoting/client/audio_player.h" 10 #include "remoting/client/audio_player.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 main_task_runner_->PostTask(FROM_HERE, base::Bind( 87 main_task_runner_->PostTask(FROM_HERE, base::Bind(
88 &AudioDecodeScheduler::Core::ProcessDecodedPacket, this, 88 &AudioDecodeScheduler::Core::ProcessDecodedPacket, this,
89 base::Passed(&decoded_packet), done)); 89 base::Passed(&decoded_packet), done));
90 } 90 }
91 91
92 void AudioDecodeScheduler::Core::ProcessDecodedPacket( 92 void AudioDecodeScheduler::Core::ProcessDecodedPacket(
93 scoped_ptr<AudioPacket> packet, 93 scoped_ptr<AudioPacket> packet,
94 const base::Closure& done) { 94 const base::Closure& done) {
95 DCHECK(main_task_runner_->BelongsToCurrentThread()); 95 DCHECK(main_task_runner_->BelongsToCurrentThread());
96 // Only process |packet| if it is non-NULL. 96 // Only process |packet| if it is non-null.
97 if (packet.get() && audio_player_.get()) 97 if (packet.get() && audio_player_.get())
98 audio_player_->ProcessAudioPacket(packet.Pass()); 98 audio_player_->ProcessAudioPacket(packet.Pass());
99 done.Run(); 99 done.Run();
100 } 100 }
101 101
102 AudioDecodeScheduler::AudioDecodeScheduler( 102 AudioDecodeScheduler::AudioDecodeScheduler(
103 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 103 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
104 scoped_refptr<base::SingleThreadTaskRunner> audio_decode_task_runner, 104 scoped_refptr<base::SingleThreadTaskRunner> audio_decode_task_runner,
105 scoped_ptr<AudioPlayer> audio_player) 105 scoped_ptr<AudioPlayer> audio_player)
106 : core_(new Core(main_task_runner, audio_decode_task_runner, 106 : core_(new Core(main_task_runner, audio_decode_task_runner,
107 audio_player.Pass())) { 107 audio_player.Pass())) {
108 } 108 }
109 109
110 AudioDecodeScheduler::~AudioDecodeScheduler() { 110 AudioDecodeScheduler::~AudioDecodeScheduler() {
111 core_->Detach(); 111 core_->Detach();
112 } 112 }
113 113
114 void AudioDecodeScheduler::Initialize(const protocol::SessionConfig& config) { 114 void AudioDecodeScheduler::Initialize(const protocol::SessionConfig& config) {
115 core_->Initialize(config); 115 core_->Initialize(config);
116 } 116 }
117 117
118 void AudioDecodeScheduler::ProcessAudioPacket(scoped_ptr<AudioPacket> packet, 118 void AudioDecodeScheduler::ProcessAudioPacket(scoped_ptr<AudioPacket> packet,
119 const base::Closure& done) { 119 const base::Closure& done) {
120 core_->ProcessAudioPacket(packet.Pass(), done); 120 core_->ProcessAudioPacket(packet.Pass(), done);
121 } 121 }
122 122
123 } // namespace remoting 123 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/client/jni/chromoting_jni_runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698