 Chromium Code Reviews
 Chromium Code Reviews Issue 1965733002:
  NetEq: Implement muted output  (Closed) 
  Base URL: https://chromium.googlesource.com/external/webrtc.git@muted-expand
    
  
    Issue 1965733002:
  NetEq: Implement muted output  (Closed) 
  Base URL: https://chromium.googlesource.com/external/webrtc.git@muted-expand| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 std::string ToString() const; | 86 std::string ToString() const; | 
| 87 | 87 | 
| 88 int sample_rate_hz; // Initial value. Will change with input data. | 88 int sample_rate_hz; // Initial value. Will change with input data. | 
| 89 bool enable_audio_classifier; | 89 bool enable_audio_classifier; | 
| 90 bool enable_post_decode_vad; | 90 bool enable_post_decode_vad; | 
| 91 size_t max_packets_in_buffer; | 91 size_t max_packets_in_buffer; | 
| 92 int max_delay_ms; | 92 int max_delay_ms; | 
| 93 BackgroundNoiseMode background_noise_mode; | 93 BackgroundNoiseMode background_noise_mode; | 
| 94 NetEqPlayoutMode playout_mode; | 94 NetEqPlayoutMode playout_mode; | 
| 95 bool enable_fast_accelerate; | 95 bool enable_fast_accelerate; | 
| 96 bool enable_muted_state = false; | |
| 96 }; | 97 }; | 
| 97 | 98 | 
| 98 enum ReturnCodes { | 99 enum ReturnCodes { | 
| 99 kOK = 0, | 100 kOK = 0, | 
| 100 kFail = -1, | 101 kFail = -1, | 
| 101 kNotImplemented = -2 | 102 kNotImplemented = -2 | 
| 102 }; | 103 }; | 
| 103 | 104 | 
| 104 enum ErrorCodes { | 105 enum ErrorCodes { | 
| 105 kNoError = 0, | 106 kNoError = 0, | 
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 155 // Returns kOk on success, kFail on failure. | 156 // Returns kOk on success, kFail on failure. | 
| 156 virtual int InsertSyncPacket(const WebRtcRTPHeader& rtp_header, | 157 virtual int InsertSyncPacket(const WebRtcRTPHeader& rtp_header, | 
| 157 uint32_t receive_timestamp) = 0; | 158 uint32_t receive_timestamp) = 0; | 
| 158 | 159 | 
| 159 // Instructs NetEq to deliver 10 ms of audio data. The data is written to | 160 // Instructs NetEq to deliver 10 ms of audio data. The data is written to | 
| 160 // |audio_frame|. All data in |audio_frame| is wiped; |data_|, |speech_type_|, | 161 // |audio_frame|. All data in |audio_frame| is wiped; |data_|, |speech_type_|, | 
| 161 // |num_channels_|, |sample_rate_hz_|, |samples_per_channel_|, and | 162 // |num_channels_|, |sample_rate_hz_|, |samples_per_channel_|, and | 
| 162 // |vad_activity_| are updated upon success. If an error is returned, some | 163 // |vad_activity_| are updated upon success. If an error is returned, some | 
| 163 // fields may not have been updated. | 164 // fields may not have been updated. | 
| 164 // Returns kOK on success, or kFail in case of an error. | 165 // Returns kOK on success, or kFail in case of an error. | 
| 165 virtual int GetAudio(AudioFrame* audio_frame) = 0; | 166 virtual int GetAudio(AudioFrame* audio_frame, bool* muted_output) = 0; | 
| 
minyue-webrtc
2016/05/11 11:29:53
suggest name: output_muted or even simply muted.
 
hlundin-webrtc
2016/05/12 07:44:40
Done.
 | |
| 166 | 167 | 
| 167 // Associates |rtp_payload_type| with |codec| and |codec_name|, and stores the | 168 // Associates |rtp_payload_type| with |codec| and |codec_name|, and stores the | 
| 168 // information in the codec database. Returns 0 on success, -1 on failure. | 169 // information in the codec database. Returns 0 on success, -1 on failure. | 
| 169 // The name is only used to provide information back to the caller about the | 170 // The name is only used to provide information back to the caller about the | 
| 170 // decoders. Hence, the name is arbitrary, and may be empty. | 171 // decoders. Hence, the name is arbitrary, and may be empty. | 
| 171 virtual int RegisterPayloadType(NetEqDecoder codec, | 172 virtual int RegisterPayloadType(NetEqDecoder codec, | 
| 172 const std::string& codec_name, | 173 const std::string& codec_name, | 
| 173 uint8_t rtp_payload_type) = 0; | 174 uint8_t rtp_payload_type) = 0; | 
| 174 | 175 | 
| 175 // Provides an externally created decoder object |decoder| to insert in the | 176 // Provides an externally created decoder object |decoder| to insert in the | 
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 289 | 290 | 
| 290 protected: | 291 protected: | 
| 291 NetEq() {} | 292 NetEq() {} | 
| 292 | 293 | 
| 293 private: | 294 private: | 
| 294 RTC_DISALLOW_COPY_AND_ASSIGN(NetEq); | 295 RTC_DISALLOW_COPY_AND_ASSIGN(NetEq); | 
| 295 }; | 296 }; | 
| 296 | 297 | 
| 297 } // namespace webrtc | 298 } // namespace webrtc | 
| 298 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_ | 299 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_ | 
| OLD | NEW |