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

Side by Side Diff: components/audio_modem/audio_recorder.h

Issue 1907973003: media: Move audio_parameters and audio_point to media/base/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_H_ 5 #ifndef COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_H_
6 #define COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_H_ 6 #define COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "media/audio/audio_io.h" 12 #include "media/audio/audio_io.h"
13 #include "media/audio/audio_parameters.h"
14 #include "media/base/audio_converter.h" 13 #include "media/base/audio_converter.h"
14 #include "media/base/audio_parameters.h"
15 15
16 namespace audio_modem { 16 namespace audio_modem {
17 17
18 // The AudioRecorder class will record audio until told to stop. 18 // The AudioRecorder class will record audio until told to stop.
19 class AudioRecorder { 19 class AudioRecorder {
20 public: 20 public:
21 using RecordedSamplesCallback = base::Callback<void(const std::string&)>; 21 using RecordedSamplesCallback = base::Callback<void(const std::string&)>;
22 22
23 // Initializes the object. Do not use this object before calling this method. 23 // Initializes the object. Do not use this object before calling this method.
24 virtual void Initialize(const RecordedSamplesCallback& decode_callback) = 0; 24 virtual void Initialize(const RecordedSamplesCallback& decode_callback) = 0;
25 25
26 // If we are already recording, this function will do nothing. 26 // If we are already recording, this function will do nothing.
27 virtual void Record() = 0; 27 virtual void Record() = 0;
28 // If we are already stopped, this function will do nothing. 28 // If we are already stopped, this function will do nothing.
29 virtual void Stop() = 0; 29 virtual void Stop() = 0;
30 30
31 // Cleans up and deletes this object. Do not use object after this call. 31 // Cleans up and deletes this object. Do not use object after this call.
32 virtual void Finalize() = 0; 32 virtual void Finalize() = 0;
33 33
34 protected: 34 protected:
35 virtual ~AudioRecorder() {} 35 virtual ~AudioRecorder() {}
36 }; 36 };
37 37
38 } // namespace audio_modem 38 } // namespace audio_modem
39 39
40 #endif // COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_H_ 40 #endif // COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_H_
OLDNEW
« no previous file with comments | « components/audio_modem/audio_player_impl.cc ('k') | components/audio_modem/audio_recorder_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698