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

Side by Side Diff: media/audio/fake_audio_input_stream.h

Issue 9965076: Revert 130180 - Move media/audio files into media namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « media/audio/audio_parameters_unittest.cc ('k') | media/audio/fake_audio_input_stream.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 // A fake implementation of AudioInputStream, useful for testing purpose. 5 // A fake implementation of AudioInputStream, useful for testing purpose.
6 6
7 #ifndef MEDIA_AUDIO_FAKE_AUDIO_INPUT_STREAM_H_ 7 #ifndef MEDIA_AUDIO_FAKE_AUDIO_INPUT_STREAM_H_
8 #define MEDIA_AUDIO_FAKE_AUDIO_INOUT_STREAM_H_ 8 #define MEDIA_AUDIO_FAKE_AUDIO_INOUT_STREAM_H_
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/threading/thread.h" 13 #include "base/threading/thread.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "media/audio/audio_io.h" 15 #include "media/audio/audio_io.h"
16 16 #include "media/audio/audio_parameters.h"
17 namespace media {
18 17
19 class AudioManagerBase; 18 class AudioManagerBase;
20 class AudioParameters;
21 19
22 class MEDIA_EXPORT FakeAudioInputStream 20 class MEDIA_EXPORT FakeAudioInputStream
23 : public AudioInputStream { 21 : public AudioInputStream {
24 public: 22 public:
25 static AudioInputStream* MakeFakeStream(AudioManagerBase* manager, 23 static AudioInputStream* MakeFakeStream(AudioManagerBase* manager,
26 const AudioParameters& params); 24 const AudioParameters& params);
27 25
28 virtual bool Open() OVERRIDE; 26 virtual bool Open() OVERRIDE;
29 virtual void Start(AudioInputCallback* callback) OVERRIDE; 27 virtual void Start(AudioInputCallback* callback) OVERRIDE;
30 virtual void Stop() OVERRIDE; 28 virtual void Stop() OVERRIDE;
(...skipping 16 matching lines...) Expand all
47 AudioInputCallback* callback_; 45 AudioInputCallback* callback_;
48 scoped_array<uint8> buffer_; 46 scoped_array<uint8> buffer_;
49 int buffer_size_; 47 int buffer_size_;
50 base::Thread thread_; 48 base::Thread thread_;
51 base::Time last_callback_time_; 49 base::Time last_callback_time_;
52 base::TimeDelta callback_interval_; 50 base::TimeDelta callback_interval_;
53 51
54 DISALLOW_COPY_AND_ASSIGN(FakeAudioInputStream); 52 DISALLOW_COPY_AND_ASSIGN(FakeAudioInputStream);
55 }; 53 };
56 54
57 } // namespace media
58
59 #endif // MEDIA_AUDIO_FAKE_AUDIO_INPUT_STREAM_H_ 55 #endif // MEDIA_AUDIO_FAKE_AUDIO_INPUT_STREAM_H_
OLDNEW
« no previous file with comments | « media/audio/audio_parameters_unittest.cc ('k') | media/audio/fake_audio_input_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698