Index: media/audio/audio_file_writer.h |
diff --git a/media/audio/audio_file_writer.h b/media/audio/audio_file_writer.h |
index dabfa23dd95566b78e32f34e6312a5608a9a2b9d..6ed92c5a8699c3b08063ef1214460829b17816bb 100644 |
--- a/media/audio/audio_file_writer.h |
+++ b/media/audio/audio_file_writer.h |
@@ -7,6 +7,8 @@ |
#include <memory> |
+#include "base/callback_forward.h" |
+ |
namespace base { |
class FilePath; |
} |
@@ -14,6 +16,7 @@ class FilePath; |
namespace media { |
class AudioBus; |
+class AudioParameters; |
// A writer interface used for writing audio data to file for debugging |
// purposes. |
@@ -38,8 +41,18 @@ class AudioFileWriter { |
// may be ambigulous if Start() or Stop() is executed at the moment. Can be |
// called from any sequence. |
virtual bool WillWrite() = 0; |
+ |
+ // Gets the extension for the file type the as a string, for example "wav". |
+ // Can be called before calling Start() to add the appropriate extension to |
+ // the filename. |
+ virtual std::string GetExtension() = 0; |
}; |
-} // namespace media |
+// Used for creating an AudioFileWriter. |
+using CreateAudioFileWriterCallback = |
+ base::RepeatingCallback<std::unique_ptr<AudioFileWriter>( |
o1ka
2017/02/09 13:04:03
Declare in within AudioFileWriter scope and call i
Henrik Grunell
2017/02/10 09:00:56
Sounds good, done.
|
+ const AudioParameters&)>; |
+ |
+} // namspace media |
#endif // MEDIA_AUDIO_AUDIO_FILE_WRITER_H_ |