| 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 28 matching lines...) Expand all Loading... |
| 39 // |payload_type|. If the packet contains redundant encodings, the |redundant| | 39 // |payload_type|. If the packet contains redundant encodings, the |redundant| |
| 40 // vector will be populated with EncodedInfoLeaf structs. Each struct in the | 40 // 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 | 41 // 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 | 42 // 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 | 43 // stream. When EncoderInfoLeaf structs are present in the vector, the main |
| 44 // struct's |encoded_bytes| will be the sum of all the |encoded_bytes| in the | 44 // struct's |encoded_bytes| will be the sum of all the |encoded_bytes| in the |
| 45 // vector. | 45 // vector. |
| 46 struct EncodedInfo : public EncodedInfoLeaf { | 46 struct EncodedInfo : public EncodedInfoLeaf { |
| 47 EncodedInfo(); | 47 EncodedInfo(); |
| 48 EncodedInfo(const EncodedInfo&); | 48 EncodedInfo(const EncodedInfo&); |
| 49 EncodedInfo(EncodedInfo&&); |
| 49 ~EncodedInfo(); | 50 ~EncodedInfo(); |
| 51 EncodedInfo& operator=(const EncodedInfo&); |
| 52 EncodedInfo& operator=(EncodedInfo&&); |
| 50 | 53 |
| 51 std::vector<EncodedInfoLeaf> redundant; | 54 std::vector<EncodedInfoLeaf> redundant; |
| 52 }; | 55 }; |
| 53 | 56 |
| 54 virtual ~AudioEncoder() = default; | 57 virtual ~AudioEncoder() = default; |
| 55 | 58 |
| 56 // Returns the input sample rate in Hz and the number of input channels. | 59 // Returns the input sample rate in Hz and the number of input channels. |
| 57 // These are constants set at instantiation time. | 60 // These are constants set at instantiation time. |
| 58 virtual int SampleRateHz() const = 0; | 61 virtual int SampleRateHz() const = 0; |
| 59 virtual size_t NumChannels() const = 0; | 62 virtual size_t NumChannels() const = 0; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 // This function is deprecated. It was used to return the maximum number of | 140 // This function is deprecated. It was used to return the maximum number of |
| 138 // bytes that can be produced by the encoder at each Encode() call. Since the | 141 // bytes that can be produced by the encoder at each Encode() call. Since the |
| 139 // Encode interface was changed to use rtc::Buffer, this is no longer | 142 // Encode interface was changed to use rtc::Buffer, this is no longer |
| 140 // applicable. It is only kept in to avoid breaking subclasses that still have | 143 // applicable. It is only kept in to avoid breaking subclasses that still have |
| 141 // it implemented (with the override attribute). It will be removed as soon | 144 // it implemented (with the override attribute). It will be removed as soon |
| 142 // as these subclasses have been given a chance to change. | 145 // as these subclasses have been given a chance to change. |
| 143 virtual size_t MaxEncodedBytes() const; | 146 virtual size_t MaxEncodedBytes() const; |
| 144 }; | 147 }; |
| 145 } // namespace webrtc | 148 } // namespace webrtc |
| 146 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ | 149 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ |
| OLD | NEW |