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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 int StartRecordingPlayout(OutStream* stream, const CodecInst* codecInst); | 253 int StartRecordingPlayout(OutStream* stream, const CodecInst* codecInst); |
254 int StopRecordingPlayout(); | 254 int StopRecordingPlayout(); |
255 | 255 |
256 void SetMixWithMicStatus(bool mix); | 256 void SetMixWithMicStatus(bool mix); |
257 | 257 |
258 // Muting, Volume and Level. | 258 // Muting, Volume and Level. |
259 void SetInputMute(bool enable); | 259 void SetInputMute(bool enable); |
260 void SetChannelOutputVolumeScaling(float scaling); | 260 void SetChannelOutputVolumeScaling(float scaling); |
261 int GetSpeechOutputLevel() const; | 261 int GetSpeechOutputLevel() const; |
262 int GetSpeechOutputLevelFullRange() const; | 262 int GetSpeechOutputLevelFullRange() const; |
| 263 // See description of "totalAudioEnergy" in the WebRTC stats spec: |
| 264 // https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-totalaudio
energy |
| 265 double GetTotalOutputEnergy() const; |
| 266 double GetTotalOutputDuration() const; |
263 | 267 |
264 // Stats. | 268 // Stats. |
265 int GetNetworkStatistics(NetworkStatistics& stats); | 269 int GetNetworkStatistics(NetworkStatistics& stats); |
266 void GetDecodingCallStatistics(AudioDecodingCallStats* stats) const; | 270 void GetDecodingCallStatistics(AudioDecodingCallStats* stats) const; |
267 | 271 |
268 // Audio+Video Sync. | 272 // Audio+Video Sync. |
269 uint32_t GetDelayEstimate() const; | 273 uint32_t GetDelayEstimate() const; |
270 int SetMinimumPlayoutDelay(int delayMs); | 274 int SetMinimumPlayoutDelay(int delayMs); |
271 int GetPlayoutTimestamp(unsigned int& timestamp); | 275 int GetPlayoutTimestamp(unsigned int& timestamp); |
272 int GetRtpRtcp(RtpRtcp** rtpRtcpModule, RtpReceiver** rtp_receiver) const; | 276 int GetRtpRtcp(RtpRtcp** rtpRtcpModule, RtpReceiver** rtp_receiver) const; |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 std::unique_ptr<RTPPayloadRegistry> rtp_payload_registry_; | 467 std::unique_ptr<RTPPayloadRegistry> rtp_payload_registry_; |
464 std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; | 468 std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; |
465 std::unique_ptr<RtpReceiver> rtp_receiver_; | 469 std::unique_ptr<RtpReceiver> rtp_receiver_; |
466 TelephoneEventHandler* telephone_event_handler_; | 470 TelephoneEventHandler* telephone_event_handler_; |
467 std::unique_ptr<RtpRtcp> _rtpRtcpModule; | 471 std::unique_ptr<RtpRtcp> _rtpRtcpModule; |
468 std::unique_ptr<AudioCodingModule> audio_coding_; | 472 std::unique_ptr<AudioCodingModule> audio_coding_; |
469 acm2::CodecManager codec_manager_; | 473 acm2::CodecManager codec_manager_; |
470 acm2::RentACodec rent_a_codec_; | 474 acm2::RentACodec rent_a_codec_; |
471 std::unique_ptr<AudioSinkInterface> audio_sink_; | 475 std::unique_ptr<AudioSinkInterface> audio_sink_; |
472 AudioLevel _outputAudioLevel; | 476 AudioLevel _outputAudioLevel; |
| 477 double totalOutputEnergy_ = 0.0; |
| 478 double totalOutputDuration_ = 0.0; |
473 bool _externalTransport; | 479 bool _externalTransport; |
474 // Downsamples to the codec rate if necessary. | 480 // Downsamples to the codec rate if necessary. |
475 PushResampler<int16_t> input_resampler_; | 481 PushResampler<int16_t> input_resampler_; |
476 std::unique_ptr<FilePlayer> input_file_player_; | 482 std::unique_ptr<FilePlayer> input_file_player_; |
477 std::unique_ptr<FilePlayer> output_file_player_; | 483 std::unique_ptr<FilePlayer> output_file_player_; |
478 std::unique_ptr<FileRecorder> output_file_recorder_; | 484 std::unique_ptr<FileRecorder> output_file_recorder_; |
479 int _inputFilePlayerId; | 485 int _inputFilePlayerId; |
480 int _outputFilePlayerId; | 486 int _outputFilePlayerId; |
481 int _outputFileRecorderId; | 487 int _outputFileRecorderId; |
482 bool _outputFileRecording; | 488 bool _outputFileRecording; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 | 559 |
554 bool encoder_queue_is_active_ GUARDED_BY(encoder_queue_lock_) = false; | 560 bool encoder_queue_is_active_ GUARDED_BY(encoder_queue_lock_) = false; |
555 | 561 |
556 rtc::TaskQueue* encoder_queue_ = nullptr; | 562 rtc::TaskQueue* encoder_queue_ = nullptr; |
557 }; | 563 }; |
558 | 564 |
559 } // namespace voe | 565 } // namespace voe |
560 } // namespace webrtc | 566 } // namespace webrtc |
561 | 567 |
562 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ | 568 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ |
OLD | NEW |