OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 int16_t* decoded, | 57 int16_t* decoded, |
58 SpeechType* speech_type); | 58 SpeechType* speech_type); |
59 | 59 |
60 // Indicates if the decoder implements the DecodePlc method. | 60 // Indicates if the decoder implements the DecodePlc method. |
61 virtual bool HasDecodePlc() const; | 61 virtual bool HasDecodePlc() const; |
62 | 62 |
63 // Calls the packet-loss concealment of the decoder to update the state after | 63 // Calls the packet-loss concealment of the decoder to update the state after |
64 // one or several lost packets. | 64 // one or several lost packets. |
65 virtual size_t DecodePlc(size_t num_frames, int16_t* decoded); | 65 virtual size_t DecodePlc(size_t num_frames, int16_t* decoded); |
66 | 66 |
67 // Initializes the decoder. | 67 // Resets the decoder state (empty buffers etc.). |
68 virtual int Init() = 0; | 68 virtual void Reset() = 0; |
69 | 69 |
70 // Notifies the decoder of an incoming packet to NetEQ. | 70 // Notifies the decoder of an incoming packet to NetEQ. |
71 virtual int IncomingPacket(const uint8_t* payload, | 71 virtual int IncomingPacket(const uint8_t* payload, |
72 size_t payload_len, | 72 size_t payload_len, |
73 uint16_t rtp_sequence_number, | 73 uint16_t rtp_sequence_number, |
74 uint32_t rtp_timestamp, | 74 uint32_t rtp_timestamp, |
75 uint32_t arrival_timestamp); | 75 uint32_t arrival_timestamp); |
76 | 76 |
77 // Returns the last error code from the decoder. | 77 // Returns the last error code from the decoder. |
78 virtual int ErrorCode(); | 78 virtual int ErrorCode(); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 int sample_rate_hz, | 113 int sample_rate_hz, |
114 int16_t* decoded, | 114 int16_t* decoded, |
115 SpeechType* speech_type); | 115 SpeechType* speech_type); |
116 | 116 |
117 private: | 117 private: |
118 DISALLOW_COPY_AND_ASSIGN(AudioDecoder); | 118 DISALLOW_COPY_AND_ASSIGN(AudioDecoder); |
119 }; | 119 }; |
120 | 120 |
121 } // namespace webrtc | 121 } // namespace webrtc |
122 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INTERFACE_AUDIO_DECODER_H_ | 122 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INTERFACE_AUDIO_DECODER_H_ |
OLD | NEW |