IFileOutput.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*******************************************************************************
  2. * Copyright 2009-2016 Jörg Müller
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. ******************************************************************************/
  16. #pragma once
  17. /**
  18. * @file IFileOutput.h
  19. * @ingroup file
  20. * The IFileOutput interface.
  21. */
  22. #include "file/IWriter.h"
  23. #include "respec/Specification.h"
  24. #include <memory>
  25. #include <string>
  26. AUD_NAMESPACE_BEGIN
  27. /**
  28. * @interface IFileOutput
  29. * The IFileOutput interface represents a file output plugin that can write files.
  30. */
  31. class AUD_API IFileOutput
  32. {
  33. public:
  34. /**
  35. * Creates a new file writer.
  36. * \param filename The path to the file to be written.
  37. * \param specs The file's audio specification.
  38. * \param format The file's container format.
  39. * \param codec The codec used for encoding the audio data.
  40. * \param bitrate The bitrate for encoding.
  41. * \exception Exception Thrown if the file specified cannot be written.
  42. */
  43. virtual std::shared_ptr<IWriter> createWriter(std::string filename, DeviceSpecs specs, Container format, Codec codec, unsigned int bitrate)=0;
  44. };
  45. AUD_NAMESPACE_END