OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_FACTORY_H_ | 11 #ifndef WEBRTC_API_AUDIO_CODECS_AUDIO_ENCODER_FACTORY_H_ |
12 #define WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_FACTORY_H_ | 12 #define WEBRTC_API_AUDIO_CODECS_AUDIO_ENCODER_FACTORY_H_ |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
| 17 #include "webrtc/api/audio_codecs/audio_encoder.h" |
17 #include "webrtc/api/audio_codecs/audio_format.h" | 18 #include "webrtc/api/audio_codecs/audio_format.h" |
18 #include "webrtc/base/refcount.h" | 19 #include "webrtc/base/refcount.h" |
19 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h" | |
20 | 20 |
21 namespace webrtc { | 21 namespace webrtc { |
22 | 22 |
23 // A factory that creates AudioEncoders. | 23 // A factory that creates AudioEncoders. |
24 // NOTE: This class is still under development and may change without notice. | 24 // NOTE: This class is still under development and may change without notice. |
25 class AudioEncoderFactory : public rtc::RefCountInterface { | 25 class AudioEncoderFactory : public rtc::RefCountInterface { |
26 public: | 26 public: |
27 // Returns a prioritized list of audio codecs, to use for signaling etc. | 27 // Returns a prioritized list of audio codecs, to use for signaling etc. |
28 virtual std::vector<AudioCodecSpec> GetSupportedEncoders() = 0; | 28 virtual std::vector<AudioCodecSpec> GetSupportedEncoders() = 0; |
29 | 29 |
30 // Returns information about how this format would be encoded, provided it's | 30 // Returns information about how this format would be encoded, provided it's |
31 // supported. More format and format variations may be supported than those | 31 // supported. More format and format variations may be supported than those |
32 // returned by GetSupportedEncoders(). | 32 // returned by GetSupportedEncoders(). |
33 virtual rtc::Optional<AudioCodecInfo> QueryAudioEncoder( | 33 virtual rtc::Optional<AudioCodecInfo> QueryAudioEncoder( |
34 const SdpAudioFormat& format) = 0; | 34 const SdpAudioFormat& format) = 0; |
35 | 35 |
36 // Creates an AudioEncoder for the specified format. The encoder will tags its | 36 // Creates an AudioEncoder for the specified format. The encoder will tags its |
37 // payloads with the specified payload type. | 37 // payloads with the specified payload type. |
38 // TODO(ossu): Try to avoid audio encoders having to know their payload type. | 38 // TODO(ossu): Try to avoid audio encoders having to know their payload type. |
39 virtual std::unique_ptr<AudioEncoder> MakeAudioEncoder( | 39 virtual std::unique_ptr<AudioEncoder> MakeAudioEncoder( |
40 int payload_type, | 40 int payload_type, |
41 const SdpAudioFormat& format) = 0; | 41 const SdpAudioFormat& format) = 0; |
42 }; | 42 }; |
43 | 43 |
44 } // namespace webrtc | 44 } // namespace webrtc |
45 | 45 |
46 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_FACTORY_H_ | 46 #endif // WEBRTC_API_AUDIO_CODECS_AUDIO_ENCODER_FACTORY_H_ |
OLD | NEW |