audio_decoder.h 819 B

123456789101112131415161718192021222324252627282930313233
  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
  3. // found in the LICENSE file.
  4. #ifndef REMOTING_CODEC_AUDIO_DECODER_H_
  5. #define REMOTING_CODEC_AUDIO_DECODER_H_
  6. #include <memory>
  7. namespace remoting {
  8. namespace protocol {
  9. class SessionConfig;
  10. } // namespace protocol
  11. class AudioPacket;
  12. class AudioDecoder {
  13. public:
  14. static std::unique_ptr<AudioDecoder> CreateAudioDecoder(
  15. const protocol::SessionConfig& config);
  16. virtual ~AudioDecoder() {}
  17. // Returns the decoded packet. If the packet is invalid, then a NULL
  18. // std::unique_ptr is returned.
  19. virtual std::unique_ptr<AudioPacket> Decode(
  20. std::unique_ptr<AudioPacket> packet) = 0;
  21. };
  22. } // namespace remoting
  23. #endif // REMOTING_CODEC_AUDIO_DECODER_H_