OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 |
(...skipping 13 matching lines...) Expand all Loading... |
24 // This is the interface class for encoders in AudioCoding module. Each codec | 24 // This is the interface class for encoders in AudioCoding module. Each codec |
25 // type must have an implementation of this class. | 25 // type must have an implementation of this class. |
26 class AudioEncoder { | 26 class AudioEncoder { |
27 public: | 27 public: |
28 struct EncodedInfoLeaf { | 28 struct EncodedInfoLeaf { |
29 size_t encoded_bytes = 0; | 29 size_t encoded_bytes = 0; |
30 uint32_t encoded_timestamp = 0; | 30 uint32_t encoded_timestamp = 0; |
31 int payload_type = 0; | 31 int payload_type = 0; |
32 bool send_even_if_empty = false; | 32 bool send_even_if_empty = false; |
33 bool speech = true; | 33 bool speech = true; |
| 34 const char* encoder_name = nullptr; |
34 }; | 35 }; |
35 | 36 |
36 // This is the main struct for auxiliary encoding information. Each encoded | 37 // This is the main struct for auxiliary encoding information. Each encoded |
37 // packet should be accompanied by one EncodedInfo struct, containing the | 38 // packet should be accompanied by one EncodedInfo struct, containing the |
38 // total number of |encoded_bytes|, the |encoded_timestamp| and the | 39 // total number of |encoded_bytes|, the |encoded_timestamp| and the |
39 // |payload_type|. If the packet contains redundant encodings, the |redundant| | 40 // |payload_type|. If the packet contains redundant encodings, the |redundant| |
40 // vector will be populated with EncodedInfoLeaf structs. Each struct in the | 41 // vector will be populated with EncodedInfoLeaf structs. Each struct in the |
41 // vector represents one encoding; the order of structs in the vector is the | 42 // vector represents one encoding; the order of structs in the vector is the |
42 // same as the order in which the actual payloads are written to the byte | 43 // same as the order in which the actual payloads are written to the byte |
43 // stream. When EncoderInfoLeaf structs are present in the vector, the main | 44 // stream. When EncoderInfoLeaf structs are present in the vector, the main |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // This function is deprecated. It was used to return the maximum number of | 141 // This function is deprecated. It was used to return the maximum number of |
141 // bytes that can be produced by the encoder at each Encode() call. Since the | 142 // bytes that can be produced by the encoder at each Encode() call. Since the |
142 // Encode interface was changed to use rtc::Buffer, this is no longer | 143 // Encode interface was changed to use rtc::Buffer, this is no longer |
143 // applicable. It is only kept in to avoid breaking subclasses that still have | 144 // applicable. It is only kept in to avoid breaking subclasses that still have |
144 // it implemented (with the override attribute). It will be removed as soon | 145 // it implemented (with the override attribute). It will be removed as soon |
145 // as these subclasses have been given a chance to change. | 146 // as these subclasses have been given a chance to change. |
146 virtual size_t MaxEncodedBytes() const; | 147 virtual size_t MaxEncodedBytes() const; |
147 }; | 148 }; |
148 } // namespace webrtc | 149 } // namespace webrtc |
149 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ | 150 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ |
OLD | NEW |