blob: 0becf6ffc4c0eda1fb830c2f931be3609ccb1c2e [file] [log] [blame]
kwibergc01c6a42016-04-28 14:23:32 -07001/*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
kwiberg087bd342017-02-10 08:15:44 -080011#ifndef WEBRTC_API_AUDIO_CODECS_AUDIO_DECODER_FACTORY_H_
12#define WEBRTC_API_AUDIO_CODECS_AUDIO_DECODER_FACTORY_H_
kwibergc01c6a42016-04-28 14:23:32 -070013
14#include <memory>
15#include <vector>
16
kwiberg087bd342017-02-10 08:15:44 -080017#include "webrtc/api/audio_codecs/audio_decoder.h"
18#include "webrtc/api/audio_codecs/audio_format.h"
Edward Lemurc20978e2017-07-06 19:44:34 +020019#include "webrtc/rtc_base/refcount.h"
kwibergc01c6a42016-04-28 14:23:32 -070020
21namespace webrtc {
22
23// A factory that creates AudioDecoders.
24// NOTE: This class is still under development and may change without notice.
ossue725f7c2016-05-19 10:48:04 -070025class AudioDecoderFactory : public rtc::RefCountInterface {
kwibergc01c6a42016-04-28 14:23:32 -070026 public:
ossud4e9f622016-08-18 02:01:17 -070027 virtual std::vector<AudioCodecSpec> GetSupportedDecoders() = 0;
kwibergc01c6a42016-04-28 14:23:32 -070028
kwibergd32bf752017-01-19 07:03:59 -080029 virtual bool IsSupportedDecoder(const SdpAudioFormat& format) = 0;
30
kwibergc01c6a42016-04-28 14:23:32 -070031 virtual std::unique_ptr<AudioDecoder> MakeAudioDecoder(
32 const SdpAudioFormat& format) = 0;
33};
34
35} // namespace webrtc
36
kwiberg087bd342017-02-10 08:15:44 -080037#endif // WEBRTC_API_AUDIO_CODECS_AUDIO_DECODER_FACTORY_H_