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

Unified Diff: remoting/protocol/audio_source.h

Issue 2254673002: Remove dependency on AudioStub in ConnectionToClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/audio_pump_unittest.cc ('k') | remoting/protocol/audio_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/audio_source.h
diff --git a/remoting/host/audio_capturer.h b/remoting/protocol/audio_source.h
similarity index 53%
copy from remoting/host/audio_capturer.h
copy to remoting/protocol/audio_source.h
index c79949903ca892247fae2bcf84b459566dcf366d..d36d378b4f8bb3781b7199c76436f0518dc8231b 100644
--- a/remoting/host/audio_capturer.h
+++ b/remoting/protocol/audio_source.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef REMOTING_HOST_AUDIO_CAPTURER_H_
-#define REMOTING_HOST_AUDIO_CAPTURER_H_
+#ifndef REMOTING_PROTOCOL_AUDIO_SOURCE_H_
+#define REMOTING_PROTOCOL_AUDIO_SOURCE_H_
#include <memory>
@@ -13,26 +13,22 @@ namespace remoting {
class AudioPacket;
-class AudioCapturer {
+namespace protocol {
+
+class AudioSource {
public:
typedef base::Callback<void(std::unique_ptr<AudioPacket> packet)>
PacketCapturedCallback;
- virtual ~AudioCapturer() {}
-
- // Returns true if audio capturing is supported on this platform. If this
- // returns true, then Create() must not return nullptr.
- static bool IsSupported();
- static std::unique_ptr<AudioCapturer> Create();
+ virtual ~AudioSource() {}
// Capturers should sample at a 44.1 or 48 kHz sampling rate, in uncompressed
// PCM stereo format. Capturers may choose the number of frames per packet.
// Returns true on success.
virtual bool Start(const PacketCapturedCallback& callback) = 0;
-
- static bool IsValidSampleRate(int sample_rate);
};
+} // namespace protocol
} // namespace remoting
-#endif // REMOTING_HOST_AUDIO_CAPTURER_H_
+#endif // REMOTING_PROTOCOL_AUDIO_SOURCE_H_
« no previous file with comments | « remoting/protocol/audio_pump_unittest.cc ('k') | remoting/protocol/audio_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698