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

Side by Side Diff: remoting/host/audio_capturer_linux.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 | « remoting/host/audio_capturer.h ('k') | remoting/host/audio_capturer_win.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/host/audio_capturer_linux.h" 5 #include "remoting/host/audio_capturer_linux.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "remoting/proto/audio.pb.h" 10 #include "remoting/proto/audio.pb.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 scoped_ptr<AudioPacket> packet(new AudioPacket()); 69 scoped_ptr<AudioPacket> packet(new AudioPacket());
70 packet->add_data(data->data()); 70 packet->add_data(data->data());
71 packet->set_encoding(AudioPacket::ENCODING_RAW); 71 packet->set_encoding(AudioPacket::ENCODING_RAW);
72 packet->set_sampling_rate(AudioPipeReader::kSamplingRate); 72 packet->set_sampling_rate(AudioPipeReader::kSamplingRate);
73 packet->set_bytes_per_sample(AudioPipeReader::kBytesPerSample); 73 packet->set_bytes_per_sample(AudioPipeReader::kBytesPerSample);
74 packet->set_channels(AudioPipeReader::kChannels); 74 packet->set_channels(AudioPipeReader::kChannels);
75 callback_.Run(packet.Pass()); 75 callback_.Run(packet.Pass());
76 } 76 }
77 77
78 bool AudioCapturer::IsSupported() { 78 bool AudioCapturer::IsSupported() {
79 return g_pulseaudio_pipe_sink_reader.Get().get() != NULL; 79 return g_pulseaudio_pipe_sink_reader.Get().get() != nullptr;
80 } 80 }
81 81
82 scoped_ptr<AudioCapturer> AudioCapturer::Create() { 82 scoped_ptr<AudioCapturer> AudioCapturer::Create() {
83 scoped_refptr<AudioPipeReader> reader = 83 scoped_refptr<AudioPipeReader> reader =
84 g_pulseaudio_pipe_sink_reader.Get(); 84 g_pulseaudio_pipe_sink_reader.Get();
85 if (!reader.get()) 85 if (!reader.get())
86 return nullptr; 86 return nullptr;
87 return make_scoped_ptr(new AudioCapturerLinux(reader)); 87 return make_scoped_ptr(new AudioCapturerLinux(reader));
88 } 88 }
89 89
90 } // namespace remoting 90 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/audio_capturer.h ('k') | remoting/host/audio_capturer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698