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

Side by Side Diff: remoting/host/audio_capturer_linux.cc

Issue 15782010: Update remoting/ and jingle/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/host/chromoting_host_context.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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 scoped_ptr<AudioPacket> packet(new AudioPacket()); 72 scoped_ptr<AudioPacket> packet(new AudioPacket());
73 packet->add_data(data->data()); 73 packet->add_data(data->data());
74 packet->set_encoding(AudioPacket::ENCODING_RAW); 74 packet->set_encoding(AudioPacket::ENCODING_RAW);
75 packet->set_sampling_rate(kSamplingRate); 75 packet->set_sampling_rate(kSamplingRate);
76 packet->set_bytes_per_sample(AudioPacket::BYTES_PER_SAMPLE_2); 76 packet->set_bytes_per_sample(AudioPacket::BYTES_PER_SAMPLE_2);
77 packet->set_channels(AudioPacket::CHANNELS_STEREO); 77 packet->set_channels(AudioPacket::CHANNELS_STEREO);
78 callback_.Run(packet.Pass()); 78 callback_.Run(packet.Pass());
79 } 79 }
80 80
81 bool AudioCapturer::IsSupported() { 81 bool AudioCapturer::IsSupported() {
82 return g_pulseaudio_pipe_sink_reader.Get() != NULL; 82 return g_pulseaudio_pipe_sink_reader.Get().get() != NULL;
83 } 83 }
84 84
85 scoped_ptr<AudioCapturer> AudioCapturer::Create() { 85 scoped_ptr<AudioCapturer> AudioCapturer::Create() {
86 scoped_refptr<AudioPipeReader> reader = 86 scoped_refptr<AudioPipeReader> reader =
87 g_pulseaudio_pipe_sink_reader.Get(); 87 g_pulseaudio_pipe_sink_reader.Get();
88 if (!reader) 88 if (!reader.get())
89 return scoped_ptr<AudioCapturer>(); 89 return scoped_ptr<AudioCapturer>();
90 return scoped_ptr<AudioCapturer>(new AudioCapturerLinux(reader)); 90 return scoped_ptr<AudioCapturer>(new AudioCapturerLinux(reader));
91 } 91 }
92 92
93 } // namespace remoting 93 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/host/chromoting_host_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698