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 22 matching lines...) Expand all Loading... |
33 int frame_size_ms, | 33 int frame_size_ms, |
34 int16_t enforce_frame_size) { | 34 int16_t enforce_frame_size) { |
35 return WebRtcIsacfix_ControlBwe(inst, rate_bps, frame_size_ms, | 35 return WebRtcIsacfix_ControlBwe(inst, rate_bps, frame_size_ms, |
36 enforce_frame_size); | 36 enforce_frame_size); |
37 } | 37 } |
38 static inline int16_t Create(instance_type** inst) { | 38 static inline int16_t Create(instance_type** inst) { |
39 return WebRtcIsacfix_Create(inst); | 39 return WebRtcIsacfix_Create(inst); |
40 } | 40 } |
41 static inline int DecodeInternal(instance_type* inst, | 41 static inline int DecodeInternal(instance_type* inst, |
42 const uint8_t* encoded, | 42 const uint8_t* encoded, |
43 int16_t len, | 43 size_t len, |
44 int16_t* decoded, | 44 int16_t* decoded, |
45 int16_t* speech_type) { | 45 int16_t* speech_type) { |
46 return WebRtcIsacfix_Decode(inst, encoded, len, decoded, speech_type); | 46 return WebRtcIsacfix_Decode(inst, encoded, len, decoded, speech_type); |
47 } | 47 } |
48 static inline int16_t DecodePlc(instance_type* inst, | 48 static inline size_t DecodePlc(instance_type* inst, |
49 int16_t* decoded, | 49 int16_t* decoded, |
50 int16_t num_lost_frames) { | 50 size_t num_lost_frames) { |
51 return WebRtcIsacfix_DecodePlc(inst, decoded, num_lost_frames); | 51 return WebRtcIsacfix_DecodePlc(inst, decoded, num_lost_frames); |
52 } | 52 } |
53 static inline int16_t DecoderInit(instance_type* inst) { | 53 static inline int16_t DecoderInit(instance_type* inst) { |
54 return WebRtcIsacfix_DecoderInit(inst); | 54 return WebRtcIsacfix_DecoderInit(inst); |
55 } | 55 } |
56 static inline int Encode(instance_type* inst, | 56 static inline int Encode(instance_type* inst, |
57 const int16_t* speech_in, | 57 const int16_t* speech_in, |
58 uint8_t* encoded) { | 58 uint8_t* encoded) { |
59 return WebRtcIsacfix_Encode(inst, speech_in, encoded); | 59 return WebRtcIsacfix_Encode(inst, speech_in, encoded); |
60 } | 60 } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 uint16_t sample_rate_hz) { | 97 uint16_t sample_rate_hz) { |
98 DCHECK_EQ(sample_rate_hz, kFixSampleRate); | 98 DCHECK_EQ(sample_rate_hz, kFixSampleRate); |
99 } | 99 } |
100 static inline void SetInitialBweBottleneck( | 100 static inline void SetInitialBweBottleneck( |
101 instance_type* inst, | 101 instance_type* inst, |
102 int bottleneck_bits_per_second) { | 102 int bottleneck_bits_per_second) { |
103 WebRtcIsacfix_SetInitialBweBottleneck(inst, bottleneck_bits_per_second); | 103 WebRtcIsacfix_SetInitialBweBottleneck(inst, bottleneck_bits_per_second); |
104 } | 104 } |
105 static inline int16_t UpdateBwEstimate(instance_type* inst, | 105 static inline int16_t UpdateBwEstimate(instance_type* inst, |
106 const uint8_t* encoded, | 106 const uint8_t* encoded, |
107 int32_t packet_size, | 107 size_t packet_size, |
108 uint16_t rtp_seq_number, | 108 uint16_t rtp_seq_number, |
109 uint32_t send_ts, | 109 uint32_t send_ts, |
110 uint32_t arr_ts) { | 110 uint32_t arr_ts) { |
111 return WebRtcIsacfix_UpdateBwEstimate(inst, encoded, packet_size, | 111 return WebRtcIsacfix_UpdateBwEstimate(inst, encoded, packet_size, |
112 rtp_seq_number, send_ts, arr_ts); | 112 rtp_seq_number, send_ts, arr_ts); |
113 } | 113 } |
114 static inline int16_t SetMaxPayloadSize(instance_type* inst, | 114 static inline int16_t SetMaxPayloadSize(instance_type* inst, |
115 int16_t max_payload_size_bytes) { | 115 int16_t max_payload_size_bytes) { |
116 return WebRtcIsacfix_SetMaxPayloadSize(inst, max_payload_size_bytes); | 116 return WebRtcIsacfix_SetMaxPayloadSize(inst, max_payload_size_bytes); |
117 } | 117 } |
(...skipping 22 matching lines...) Expand all Loading... |
140 size_t max_decoded_bytes, | 140 size_t max_decoded_bytes, |
141 int16_t* decoded, | 141 int16_t* decoded, |
142 SpeechType* speech_type) override; | 142 SpeechType* speech_type) override; |
143 int DecodeRedundant(const uint8_t* encoded, | 143 int DecodeRedundant(const uint8_t* encoded, |
144 size_t encoded_len, | 144 size_t encoded_len, |
145 int sample_rate_hz, | 145 int sample_rate_hz, |
146 size_t max_decoded_bytes, | 146 size_t max_decoded_bytes, |
147 int16_t* decoded, | 147 int16_t* decoded, |
148 SpeechType* speech_type) override; | 148 SpeechType* speech_type) override; |
149 bool HasDecodePlc() const override; | 149 bool HasDecodePlc() const override; |
150 int DecodePlc(int num_frames, int16_t* decoded) override; | 150 size_t DecodePlc(size_t num_frames, int16_t* decoded) override; |
151 int Init() override; | 151 int Init() override; |
152 int IncomingPacket(const uint8_t* payload, | 152 int IncomingPacket(const uint8_t* payload, |
153 size_t payload_len, | 153 size_t payload_len, |
154 uint16_t rtp_sequence_number, | 154 uint16_t rtp_sequence_number, |
155 uint32_t rtp_timestamp, | 155 uint32_t rtp_timestamp, |
156 uint32_t arrival_timestamp) override; | 156 uint32_t arrival_timestamp) override; |
157 int ErrorCode() override; | 157 int ErrorCode() override; |
158 int PacketDuration(const uint8_t* encoded, size_t encoded_len) const override; | 158 int PacketDuration(const uint8_t* encoded, size_t encoded_len) const override; |
159 int PacketDurationRedundant(const uint8_t* encoded, | 159 int PacketDurationRedundant(const uint8_t* encoded, |
160 size_t encoded_len) const override; | 160 size_t encoded_len) const override; |
161 bool PacketHasFec(const uint8_t* encoded, size_t encoded_len) const override; | 161 bool PacketHasFec(const uint8_t* encoded, size_t encoded_len) const override; |
162 size_t Channels() const override; | 162 size_t Channels() const override; |
163 }; | 163 }; |
164 | 164 |
165 } // namespace webrtc | 165 } // namespace webrtc |
166 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_INTERFACE_AUDIO_ENCODER_I
SACFIX_H_ | 166 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_INTERFACE_AUDIO_ENCODER_I
SACFIX_H_ |
OLD | NEW |