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..99a6feaff3827539fe071744b832c7ca338021d9 100644 |
--- a/media/audio/audio_file_writer.h |
+++ b/media/audio/audio_file_writer.h |
@@ -7,18 +7,23 @@ |
#include <memory> |
-namespace base { |
-class FilePath; |
-} |
+#include "base/callback_forward.h" |
+#include "base/files/file_path.h" |
namespace media { |
class AudioBus; |
+class AudioParameters; |
// A writer interface used for writing audio data to file for debugging |
// purposes. |
class AudioFileWriter { |
public: |
+ // Used for creating an AudioFileWriter. |
+ using CreateCallback = |
+ base::RepeatingCallback<std::unique_ptr<AudioFileWriter>( |
+ const AudioParameters&)>; |
+ |
virtual ~AudioFileWriter() {} |
// Must be called before calling Write() for the first time after creation or |
@@ -38,8 +43,13 @@ 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 const base::FilePath::CharType* GetFileNameExtension() = 0; |
}; |
-} // namespace media |
+} // namspace media |
#endif // MEDIA_AUDIO_AUDIO_FILE_WRITER_H_ |