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

Side by Side Diff: content/browser/renderer_host/media/audio_debug_file_writer.h

Issue 2582703003: Audio output debug recording. (Closed)
Patch Set: Control through AudioManager. Compiles on Linux, works with PulseAudio. Created 3 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
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 CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_DEBUG_FILE_WRITER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_DEBUG_FILE_WRITER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_DEBUG_FILE_WRITER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_DEBUG_FILE_WRITER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 20 matching lines...) Expand all
31 : public NON_EXPORTED_BASE(media::AudioFileWriter) { 31 : public NON_EXPORTED_BASE(media::AudioFileWriter) {
32 public: 32 public:
33 explicit AudioDebugFileWriter(const media::AudioParameters& params); 33 explicit AudioDebugFileWriter(const media::AudioParameters& params);
34 ~AudioDebugFileWriter() override; 34 ~AudioDebugFileWriter() override;
35 35
36 void Start(const base::FilePath& file) override; 36 void Start(const base::FilePath& file) override;
37 void Stop() override; 37 void Stop() override;
38 void Write(std::unique_ptr<media::AudioBus> data) override; 38 void Write(std::unique_ptr<media::AudioBus> data) override;
39 bool WillWrite() override; 39 bool WillWrite() override;
40 40
41 // Simple create function that can be passed as a callback.
42 static std::unique_ptr<media::AudioFileWriter> CreateAudioDebugFileWriter(
43 const media::AudioParameters& params);
44
41 private: 45 private:
42 class AudioFileWriter; 46 class AudioFileWriter;
43 using AudioFileWriterUniquePtr = 47 using AudioFileWriterUniquePtr =
44 std::unique_ptr<AudioFileWriter, BrowserThread::DeleteOnFileThread>; 48 std::unique_ptr<AudioFileWriter, BrowserThread::DeleteOnFileThread>;
45 AudioFileWriterUniquePtr file_writer_; 49 AudioFileWriterUniquePtr file_writer_;
46 const media::AudioParameters params_; 50 const media::AudioParameters params_;
47 base::SequenceChecker client_sequence_checker_; 51 base::SequenceChecker client_sequence_checker_;
48 }; 52 };
49 53
50 } // namspace content 54 } // namspace content
51 55
52 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_DEBUG_FILE_WRITER_H_ 56 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_DEBUG_FILE_WRITER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698