2013-07-10 00:45:36 +00:00
|
|
|
/*
|
2016-02-07 20:46:45 -08:00
|
|
|
* Copyright (c) 2004 The WebRTC project authors. All Rights Reserved.
|
2013-07-10 00:45:36 +00:00
|
|
|
*
|
2016-02-07 20:46:45 -08:00
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
2013-07-10 00:45:36 +00:00
|
|
|
*/
|
|
|
|
|
|
2019-01-11 09:11:00 -08:00
|
|
|
#ifndef MEDIA_ENGINE_WEBRTC_VOICE_ENGINE_H_
|
|
|
|
|
#define MEDIA_ENGINE_WEBRTC_VOICE_ENGINE_H_
|
2013-07-10 00:45:36 +00:00
|
|
|
|
|
|
|
|
#include <map>
|
2016-02-26 03:00:35 -08:00
|
|
|
#include <memory>
|
2013-07-10 00:45:36 +00:00
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "api/audio_codecs/audio_encoder_factory.h"
|
2019-01-25 20:26:48 +01:00
|
|
|
#include "api/scoped_refptr.h"
|
2019-03-27 18:51:45 +01:00
|
|
|
#include "api/task_queue/task_queue_factory.h"
|
2019-09-02 15:16:49 +02:00
|
|
|
#include "api/transport/rtp/rtp_source.h"
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "call/audio_state.h"
|
|
|
|
|
#include "call/call.h"
|
2019-05-29 18:40:55 -07:00
|
|
|
#include "media/base/media_engine.h"
|
2019-01-11 09:11:00 -08:00
|
|
|
#include "media/base/rtp_utils.h"
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "rtc_base/buffer.h"
|
2019-01-11 09:11:00 -08:00
|
|
|
#include "rtc_base/constructor_magic.h"
|
|
|
|
|
#include "rtc_base/network_route.h"
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "rtc_base/task_queue.h"
|
|
|
|
|
#include "rtc_base/thread_checker.h"
|
2013-07-10 00:45:36 +00:00
|
|
|
|
|
|
|
|
namespace cricket {
|
|
|
|
|
|
|
|
|
|
class AudioDeviceModule;
|
2016-12-13 14:06:26 -08:00
|
|
|
class AudioMixer;
|
2016-03-08 12:37:39 -08:00
|
|
|
class AudioSource;
|
2013-07-10 00:45:36 +00:00
|
|
|
class WebRtcVoiceMediaChannel;
|
|
|
|
|
|
|
|
|
|
// WebRtcVoiceEngine is a class to be used with CompositeMediaEngine.
|
|
|
|
|
// It uses the WebRtc VoiceEngine library for audio handling.
|
2018-11-16 10:40:36 +01:00
|
|
|
class WebRtcVoiceEngine final : public VoiceEngineInterface {
|
2015-05-29 15:05:44 +02:00
|
|
|
friend class WebRtcVoiceMediaChannel;
|
2018-06-19 15:03:05 +02:00
|
|
|
|
2013-07-10 00:45:36 +00:00
|
|
|
public:
|
2016-06-13 07:34:51 -07:00
|
|
|
WebRtcVoiceEngine(
|
2019-03-27 18:51:45 +01:00
|
|
|
webrtc::TaskQueueFactory* task_queue_factory,
|
2016-06-13 07:34:51 -07:00
|
|
|
webrtc::AudioDeviceModule* adm,
|
2017-05-02 06:46:30 -07:00
|
|
|
const rtc::scoped_refptr<webrtc::AudioEncoderFactory>& encoder_factory,
|
2016-12-13 14:06:26 -08:00
|
|
|
const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& decoder_factory,
|
2017-06-29 08:32:09 -07:00
|
|
|
rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer,
|
|
|
|
|
rtc::scoped_refptr<webrtc::AudioProcessing> audio_processing);
|
2018-11-16 10:40:36 +01:00
|
|
|
~WebRtcVoiceEngine() override;
|
2013-07-10 00:45:36 +00:00
|
|
|
|
2017-06-15 08:29:25 -07:00
|
|
|
// Does initialization that needs to occur on the worker thread.
|
2018-11-16 10:40:36 +01:00
|
|
|
void Init() override;
|
2017-06-15 08:29:25 -07:00
|
|
|
|
2018-11-16 10:40:36 +01:00
|
|
|
rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const override;
|
|
|
|
|
VoiceMediaChannel* CreateMediaChannel(
|
|
|
|
|
webrtc::Call* call,
|
|
|
|
|
const MediaConfig& config,
|
|
|
|
|
const AudioOptions& options,
|
|
|
|
|
const webrtc::CryptoOptions& crypto_options) override;
|
2013-07-10 00:45:36 +00:00
|
|
|
|
2018-11-16 10:40:36 +01:00
|
|
|
const std::vector<AudioCodec>& send_codecs() const override;
|
|
|
|
|
const std::vector<AudioCodec>& recv_codecs() const override;
|
2020-03-16 13:40:51 +01:00
|
|
|
std::vector<webrtc::RtpHeaderExtensionCapability> GetRtpHeaderExtensions()
|
|
|
|
|
const override;
|
2013-07-10 00:45:36 +00:00
|
|
|
|
|
|
|
|
// For tracking WebRtc channels. Needed because we have to pause them
|
|
|
|
|
// all when switching devices.
|
|
|
|
|
// May only be called by WebRtcVoiceMediaChannel.
|
2015-09-29 06:06:31 -07:00
|
|
|
void RegisterChannel(WebRtcVoiceMediaChannel* channel);
|
|
|
|
|
void UnregisterChannel(WebRtcVoiceMediaChannel* channel);
|
2013-07-10 00:45:36 +00:00
|
|
|
|
2016-01-15 03:06:36 -08:00
|
|
|
// Starts AEC dump using an existing file. A maximum file size in bytes can be
|
|
|
|
|
// specified. When the maximum file size is reached, logging is stopped and
|
|
|
|
|
// the file is closed. If max_size_bytes is set to <= 0, no limit will be
|
|
|
|
|
// used.
|
2019-06-11 14:04:16 +02:00
|
|
|
bool StartAecDump(webrtc::FileWrapper file, int64_t max_size_bytes) override;
|
2013-12-13 00:21:03 +00:00
|
|
|
|
2015-10-22 03:25:41 -07:00
|
|
|
// Stops AEC dump.
|
2018-11-16 10:40:36 +01:00
|
|
|
void StopAecDump() override;
|
2015-10-22 03:25:41 -07:00
|
|
|
|
2013-07-10 00:45:36 +00:00
|
|
|
private:
|
2015-09-29 06:06:31 -07:00
|
|
|
// Every option that is "set" will be applied. Every option not "set" will be
|
|
|
|
|
// ignored. This allows us to selectively turn on and off different options
|
|
|
|
|
// easily at any time.
|
2013-07-10 00:45:36 +00:00
|
|
|
bool ApplyOptions(const AudioOptions& options);
|
2014-10-10 09:42:53 +00:00
|
|
|
|
2015-10-20 15:49:38 -07:00
|
|
|
int CreateVoEChannel();
|
Reland of Activate 'offload debug dump recordings from audio thread to TaskQueue'. (patchset #1 id:1 of https://codereview.webrtc.org/2910633002/ )
Reason for revert:
Revert of revert of revert of revert of 'Activating..'. Or "reland of reland of 'Activate..'".
*Now* the internal projects are fixed and the fix is verified.
Original issue's description:
> Revert of Activate 'offload debug dump recordings from audio thread to TaskQueue'. (patchset #1 id:1 of https://codereview.webrtc.org/2903153005/ )
>
> Reason for revert:
> Reverting again: internal project issues were apparently not completely fixed.
>
> Original issue's description:
> > Reland of Activate 'offload debug dump recordings from audio thread to TaskQueue'. (patchset #1 id:1 of https://codereview.webrtc.org/2904893002/ )
> >
> > Reason for revert:
> > Revert the revert now that internal projects are updated.
> >
> > Original issue's description:
> > > Revert of Activate 'offload debug dump recordings from audio thread to TaskQueue'. (patchset #4 id:160001 of https://codereview.webrtc.org/2896813002/ )
> > >
> > > Reason for revert:
> > > Breaks internal project.
> > >
> > > Original issue's description:
> > > > Activate 'offload debug dump recordings from audio thread to TaskQueue'.
> > > >
> > > > A low priority task queue is added to WebRTCVoiceEngine. The
> > > > start/stop debug calls make file logging happen on the task queue.
> > > >
> > > > In a dependent CL (https://codereview.webrtc.org/2888303003), the task queue is moved to PeerConnectionFactory,
> > > > so that it can be shared for low priority tasks between different
> > > > subcomponents. It will require some changes to MediaEngine,
> > > > CompositeMediaEngine, WebRTCVoiceEngine, and changes in internal
> > > > projects.
> > > >
> > > > A task queue must be created and destroyed from the same thread. With
> > > > this CL that will be the worker thread, which creates and destroys
> > > > WebRTCVoiceEngine. With the dependent CL, it will probably change to
> > > > the signaling thread.
> > > >
> > > > NOTRY=True # tests just passed
> > > >
> > > > BUG=webrtc:7404
> > > >
> > > > Review-Url: https://codereview.webrtc.org/2896813002
> > > > Cr-Commit-Position: refs/heads/master@{#18252}
> > > > Committed: https://chromium.googlesource.com/external/webrtc/+/c61bf947b4ac31f3500858ffcae6fee39d799930
> > >
> > > TBR=solenberg@webrtc.org,tommi@webrtc.org,perkj@webrtc.org,danilchap@webrtc.org,tommi@chromium.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:7404
> > >
> > > Review-Url: https://codereview.webrtc.org/2904893002
> > > Cr-Commit-Position: refs/heads/master@{#18255}
> > > Committed: https://chromium.googlesource.com/external/webrtc/+/be68b72cfad0686dcd892bba1368b199a7ee16ca
> >
> > TBR=solenberg@webrtc.org,tommi@webrtc.org,perkj@webrtc.org,danilchap@webrtc.org,tommi@chromium.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:7404
> >
> > Review-Url: https://codereview.webrtc.org/2903153005
> > Cr-Commit-Position: refs/heads/master@{#18270}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/d2303a2338106feab684860f1c133877b46bdd4f
>
> TBR=solenberg@webrtc.org,tommi@webrtc.org,perkj@webrtc.org,danilchap@webrtc.org,tommi@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7404
>
> Review-Url: https://codereview.webrtc.org/2910633002
> Cr-Commit-Position: refs/heads/master@{#18272}
> Committed: https://chromium.googlesource.com/external/webrtc/+/fe9ecb07ea8254d8a09605f25203a4d045b3ffee
TBR=solenberg@webrtc.org,tommi@webrtc.org,perkj@webrtc.org,danilchap@webrtc.org,tommi@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7404
Review-Url: https://codereview.webrtc.org/2904423002
Cr-Commit-Position: refs/heads/master@{#18300}
2017-05-29 02:56:27 -07:00
|
|
|
|
2019-03-27 18:51:45 +01:00
|
|
|
webrtc::TaskQueueFactory* const task_queue_factory_;
|
2019-03-26 17:36:53 +00:00
|
|
|
std::unique_ptr<rtc::TaskQueue> low_priority_worker_queue_;
|
Reland of Activate 'offload debug dump recordings from audio thread to TaskQueue'. (patchset #1 id:1 of https://codereview.webrtc.org/2910633002/ )
Reason for revert:
Revert of revert of revert of revert of 'Activating..'. Or "reland of reland of 'Activate..'".
*Now* the internal projects are fixed and the fix is verified.
Original issue's description:
> Revert of Activate 'offload debug dump recordings from audio thread to TaskQueue'. (patchset #1 id:1 of https://codereview.webrtc.org/2903153005/ )
>
> Reason for revert:
> Reverting again: internal project issues were apparently not completely fixed.
>
> Original issue's description:
> > Reland of Activate 'offload debug dump recordings from audio thread to TaskQueue'. (patchset #1 id:1 of https://codereview.webrtc.org/2904893002/ )
> >
> > Reason for revert:
> > Revert the revert now that internal projects are updated.
> >
> > Original issue's description:
> > > Revert of Activate 'offload debug dump recordings from audio thread to TaskQueue'. (patchset #4 id:160001 of https://codereview.webrtc.org/2896813002/ )
> > >
> > > Reason for revert:
> > > Breaks internal project.
> > >
> > > Original issue's description:
> > > > Activate 'offload debug dump recordings from audio thread to TaskQueue'.
> > > >
> > > > A low priority task queue is added to WebRTCVoiceEngine. The
> > > > start/stop debug calls make file logging happen on the task queue.
> > > >
> > > > In a dependent CL (https://codereview.webrtc.org/2888303003), the task queue is moved to PeerConnectionFactory,
> > > > so that it can be shared for low priority tasks between different
> > > > subcomponents. It will require some changes to MediaEngine,
> > > > CompositeMediaEngine, WebRTCVoiceEngine, and changes in internal
> > > > projects.
> > > >
> > > > A task queue must be created and destroyed from the same thread. With
> > > > this CL that will be the worker thread, which creates and destroys
> > > > WebRTCVoiceEngine. With the dependent CL, it will probably change to
> > > > the signaling thread.
> > > >
> > > > NOTRY=True # tests just passed
> > > >
> > > > BUG=webrtc:7404
> > > >
> > > > Review-Url: https://codereview.webrtc.org/2896813002
> > > > Cr-Commit-Position: refs/heads/master@{#18252}
> > > > Committed: https://chromium.googlesource.com/external/webrtc/+/c61bf947b4ac31f3500858ffcae6fee39d799930
> > >
> > > TBR=solenberg@webrtc.org,tommi@webrtc.org,perkj@webrtc.org,danilchap@webrtc.org,tommi@chromium.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:7404
> > >
> > > Review-Url: https://codereview.webrtc.org/2904893002
> > > Cr-Commit-Position: refs/heads/master@{#18255}
> > > Committed: https://chromium.googlesource.com/external/webrtc/+/be68b72cfad0686dcd892bba1368b199a7ee16ca
> >
> > TBR=solenberg@webrtc.org,tommi@webrtc.org,perkj@webrtc.org,danilchap@webrtc.org,tommi@chromium.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:7404
> >
> > Review-Url: https://codereview.webrtc.org/2903153005
> > Cr-Commit-Position: refs/heads/master@{#18270}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/d2303a2338106feab684860f1c133877b46bdd4f
>
> TBR=solenberg@webrtc.org,tommi@webrtc.org,perkj@webrtc.org,danilchap@webrtc.org,tommi@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7404
>
> Review-Url: https://codereview.webrtc.org/2910633002
> Cr-Commit-Position: refs/heads/master@{#18272}
> Committed: https://chromium.googlesource.com/external/webrtc/+/fe9ecb07ea8254d8a09605f25203a4d045b3ffee
TBR=solenberg@webrtc.org,tommi@webrtc.org,perkj@webrtc.org,danilchap@webrtc.org,tommi@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7404
Review-Url: https://codereview.webrtc.org/2904423002
Cr-Commit-Position: refs/heads/master@{#18300}
2017-05-29 02:56:27 -07:00
|
|
|
|
2016-04-08 05:35:48 -07:00
|
|
|
webrtc::AudioDeviceModule* adm();
|
2017-07-25 15:45:24 -07:00
|
|
|
webrtc::AudioProcessing* apm() const;
|
Remove voe::TransmitMixer
TransmitMixer's functionality is moved into the AudioTransportProxy
owned by AudioState. This removes the need for an AudioTransport
implementation in VoEBaseImpl, which means that the proxy is no longer
a proxy, hence AudioTransportProxy is renamed to AudioTransportImpl.
In the short term, AudioState needs to know which AudioDeviceModule is
used, so it is added in AudioState::Config. AudioTransportImpl needs
to know which AudioSendStream:s are currently enabled to send, so
AudioState maintains a map of them, which is reduced into a simple
vector for AudioTransportImpl.
To encode and transmit audio,
AudioSendStream::OnAudioData(std::unique_ptr<AudioFrame> audio_frame)
is introduced, which is used in both the Chromium and standalone use
cases. This removes the need for two different instances of
voe::Channel::ProcessAndEncodeAudio(), so there is now only one,
taking an AudioFrame as argument. Callers need to allocate their own
AudioFrame:s, which is wasteful but not a regression since this was
already happening in the voe::Channel functions.
Most of the logic changed resides in
AudioTransportImpl::RecordedDataIsAvailable(), where two strange
things were found:
1. The clock drift parameter was ineffective since
apm->echo_cancellation()->enable_drift_compensation(false) is
called during initialization.
2. The output parameter 'new_mic_volume' was never set - instead it
was returned as a result, causing the ADM to never update the
analog mic gain
(https://cs.chromium.org/chromium/src/third_party/webrtc/voice_engine/voe_base_impl.cc?q=voe_base_impl.cc&dr&l=100).
Besides this, tests are updated, and some dead code is removed which
was found in the process.
Bug: webrtc:4690, webrtc:8591
Change-Id: I789d5296bf5efb7299a5ee05a4f3ce6abf9124b2
Reviewed-on: https://webrtc-review.googlesource.com/26681
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21301}
2017-12-15 16:42:15 +01:00
|
|
|
webrtc::AudioState* audio_state();
|
2013-07-10 00:45:36 +00:00
|
|
|
|
2019-05-29 18:40:55 -07:00
|
|
|
std::vector<AudioCodec> CollectCodecs(
|
2017-04-27 02:08:52 -07:00
|
|
|
const std::vector<webrtc::AudioCodecSpec>& specs) const;
|
2016-08-17 02:45:41 -07:00
|
|
|
|
2015-11-06 15:34:49 -08:00
|
|
|
rtc::ThreadChecker signal_thread_checker_;
|
|
|
|
|
rtc::ThreadChecker worker_thread_checker_;
|
|
|
|
|
|
Remove voe::TransmitMixer
TransmitMixer's functionality is moved into the AudioTransportProxy
owned by AudioState. This removes the need for an AudioTransport
implementation in VoEBaseImpl, which means that the proxy is no longer
a proxy, hence AudioTransportProxy is renamed to AudioTransportImpl.
In the short term, AudioState needs to know which AudioDeviceModule is
used, so it is added in AudioState::Config. AudioTransportImpl needs
to know which AudioSendStream:s are currently enabled to send, so
AudioState maintains a map of them, which is reduced into a simple
vector for AudioTransportImpl.
To encode and transmit audio,
AudioSendStream::OnAudioData(std::unique_ptr<AudioFrame> audio_frame)
is introduced, which is used in both the Chromium and standalone use
cases. This removes the need for two different instances of
voe::Channel::ProcessAndEncodeAudio(), so there is now only one,
taking an AudioFrame as argument. Callers need to allocate their own
AudioFrame:s, which is wasteful but not a regression since this was
already happening in the voe::Channel functions.
Most of the logic changed resides in
AudioTransportImpl::RecordedDataIsAvailable(), where two strange
things were found:
1. The clock drift parameter was ineffective since
apm->echo_cancellation()->enable_drift_compensation(false) is
called during initialization.
2. The output parameter 'new_mic_volume' was never set - instead it
was returned as a result, causing the ADM to never update the
analog mic gain
(https://cs.chromium.org/chromium/src/third_party/webrtc/voice_engine/voe_base_impl.cc?q=voe_base_impl.cc&dr&l=100).
Besides this, tests are updated, and some dead code is removed which
was found in the process.
Bug: webrtc:4690, webrtc:8591
Change-Id: I789d5296bf5efb7299a5ee05a4f3ce6abf9124b2
Reviewed-on: https://webrtc-review.googlesource.com/26681
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21301}
2017-12-15 16:42:15 +01:00
|
|
|
// The audio device module.
|
2016-03-30 23:28:51 -07:00
|
|
|
rtc::scoped_refptr<webrtc::AudioDeviceModule> adm_;
|
2017-04-27 02:08:52 -07:00
|
|
|
rtc::scoped_refptr<webrtc::AudioEncoderFactory> encoder_factory_;
|
2016-06-13 07:34:51 -07:00
|
|
|
rtc::scoped_refptr<webrtc::AudioDecoderFactory> decoder_factory_;
|
2017-06-15 08:29:25 -07:00
|
|
|
rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer_;
|
Remove voe::TransmitMixer
TransmitMixer's functionality is moved into the AudioTransportProxy
owned by AudioState. This removes the need for an AudioTransport
implementation in VoEBaseImpl, which means that the proxy is no longer
a proxy, hence AudioTransportProxy is renamed to AudioTransportImpl.
In the short term, AudioState needs to know which AudioDeviceModule is
used, so it is added in AudioState::Config. AudioTransportImpl needs
to know which AudioSendStream:s are currently enabled to send, so
AudioState maintains a map of them, which is reduced into a simple
vector for AudioTransportImpl.
To encode and transmit audio,
AudioSendStream::OnAudioData(std::unique_ptr<AudioFrame> audio_frame)
is introduced, which is used in both the Chromium and standalone use
cases. This removes the need for two different instances of
voe::Channel::ProcessAndEncodeAudio(), so there is now only one,
taking an AudioFrame as argument. Callers need to allocate their own
AudioFrame:s, which is wasteful but not a regression since this was
already happening in the voe::Channel functions.
Most of the logic changed resides in
AudioTransportImpl::RecordedDataIsAvailable(), where two strange
things were found:
1. The clock drift parameter was ineffective since
apm->echo_cancellation()->enable_drift_compensation(false) is
called during initialization.
2. The output parameter 'new_mic_volume' was never set - instead it
was returned as a result, causing the ADM to never update the
analog mic gain
(https://cs.chromium.org/chromium/src/third_party/webrtc/voice_engine/voe_base_impl.cc?q=voe_base_impl.cc&dr&l=100).
Besides this, tests are updated, and some dead code is removed which
was found in the process.
Bug: webrtc:4690, webrtc:8591
Change-Id: I789d5296bf5efb7299a5ee05a4f3ce6abf9124b2
Reviewed-on: https://webrtc-review.googlesource.com/26681
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21301}
2017-12-15 16:42:15 +01:00
|
|
|
// The audio processing module.
|
2017-06-29 08:32:09 -07:00
|
|
|
rtc::scoped_refptr<webrtc::AudioProcessing> apm_;
|
2013-07-10 00:45:36 +00:00
|
|
|
// The primary instance of WebRtc VoiceEngine.
|
2015-11-06 15:34:49 -08:00
|
|
|
rtc::scoped_refptr<webrtc::AudioState> audio_state_;
|
2016-08-17 02:45:41 -07:00
|
|
|
std::vector<AudioCodec> send_codecs_;
|
|
|
|
|
std::vector<AudioCodec> recv_codecs_;
|
2015-09-29 06:06:31 -07:00
|
|
|
std::vector<WebRtcVoiceMediaChannel*> channels_;
|
2015-12-08 09:50:23 -08:00
|
|
|
bool is_dumping_aec_ = false;
|
2017-06-15 08:29:25 -07:00
|
|
|
bool initialized_ = false;
|
2013-07-10 00:45:36 +00:00
|
|
|
|
2019-04-25 08:50:11 +02:00
|
|
|
// Cache experimental_ns and apply in case they are missing in the audio
|
|
|
|
|
// options. We need to do this because SetExtraOptions() will revert to
|
|
|
|
|
// defaults for options which are not provided.
|
2018-06-15 15:58:38 +02:00
|
|
|
absl::optional<bool> experimental_ns_;
|
2018-01-11 13:52:30 +01:00
|
|
|
// Jitter buffer settings for new streams.
|
2019-03-15 10:37:31 +01:00
|
|
|
size_t audio_jitter_buffer_max_packets_ = 200;
|
2018-01-11 13:52:30 +01:00
|
|
|
bool audio_jitter_buffer_fast_accelerate_ = false;
|
2018-11-27 15:45:20 +01:00
|
|
|
int audio_jitter_buffer_min_delay_ms_ = 0;
|
2019-01-10 15:58:36 +01:00
|
|
|
bool audio_jitter_buffer_enable_rtx_handling_ = false;
|
2015-10-21 13:01:53 -07:00
|
|
|
|
2016-03-30 23:28:51 -07:00
|
|
|
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceEngine);
|
2013-07-10 00:45:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// WebRtcVoiceMediaChannel is an implementation of VoiceMediaChannel that uses
|
|
|
|
|
// WebRtc Voice Engine.
|
2015-11-06 15:34:49 -08:00
|
|
|
class WebRtcVoiceMediaChannel final : public VoiceMediaChannel,
|
|
|
|
|
public webrtc::Transport {
|
2013-07-10 00:45:36 +00:00
|
|
|
public:
|
2015-09-17 16:42:56 +02:00
|
|
|
WebRtcVoiceMediaChannel(WebRtcVoiceEngine* engine,
|
2016-02-12 02:27:06 -08:00
|
|
|
const MediaConfig& config,
|
2015-09-17 16:42:56 +02:00
|
|
|
const AudioOptions& options,
|
2018-10-15 10:20:24 -07:00
|
|
|
const webrtc::CryptoOptions& crypto_options,
|
2015-09-17 16:42:56 +02:00
|
|
|
webrtc::Call* call);
|
2015-05-07 16:05:53 +02:00
|
|
|
~WebRtcVoiceMediaChannel() override;
|
2015-05-07 16:42:08 +02:00
|
|
|
|
2015-09-09 01:36:22 -07:00
|
|
|
const AudioOptions& options() const { return options_; }
|
2015-05-07 16:42:08 +02:00
|
|
|
|
2015-08-07 16:05:34 -07:00
|
|
|
bool SetSendParameters(const AudioSendParameters& params) override;
|
|
|
|
|
bool SetRecvParameters(const AudioRecvParameters& params) override;
|
2016-05-16 11:40:30 -07:00
|
|
|
webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const override;
|
2018-01-23 15:02:36 -08:00
|
|
|
webrtc::RTCError SetRtpSendParameters(
|
|
|
|
|
uint32_t ssrc,
|
|
|
|
|
const webrtc::RtpParameters& parameters) override;
|
2016-05-16 11:40:30 -07:00
|
|
|
webrtc::RtpParameters GetRtpReceiveParameters(uint32_t ssrc) const override;
|
2019-12-04 09:31:36 -08:00
|
|
|
webrtc::RtpParameters GetDefaultRtpReceiveParameters() const override;
|
2016-04-07 22:59:22 -07:00
|
|
|
|
2016-08-04 05:28:21 -07:00
|
|
|
void SetPlayout(bool playout) override;
|
2016-03-08 12:37:39 -08:00
|
|
|
void SetSend(bool send) override;
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
bool SetAudioSend(uint32_t ssrc,
|
|
|
|
|
bool enable,
|
|
|
|
|
const AudioOptions* options,
|
2016-03-08 12:37:39 -08:00
|
|
|
AudioSource* source) override;
|
2015-05-07 16:05:53 +02:00
|
|
|
bool AddSendStream(const StreamParams& sp) override;
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
bool RemoveSendStream(uint32_t ssrc) override;
|
2015-05-07 16:05:53 +02:00
|
|
|
bool AddRecvStream(const StreamParams& sp) override;
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
bool RemoveRecvStream(uint32_t ssrc) override;
|
2019-09-20 11:05:30 -07:00
|
|
|
void ResetUnsignaledRecvStream() override;
|
2018-10-04 14:22:34 -07:00
|
|
|
|
|
|
|
|
// E2EE Frame API
|
|
|
|
|
// Set a frame decryptor to a particular ssrc that will intercept all
|
|
|
|
|
// incoming audio payloads and attempt to decrypt them before forwarding the
|
|
|
|
|
// result.
|
|
|
|
|
void SetFrameDecryptor(uint32_t ssrc,
|
|
|
|
|
rtc::scoped_refptr<webrtc::FrameDecryptorInterface>
|
|
|
|
|
frame_decryptor) override;
|
|
|
|
|
// Set a frame encryptor to a particular ssrc that will intercept all
|
|
|
|
|
// outgoing audio payloads frames and attempt to encrypt them and forward the
|
|
|
|
|
// result to the packetizer.
|
|
|
|
|
void SetFrameEncryptor(uint32_t ssrc,
|
|
|
|
|
rtc::scoped_refptr<webrtc::FrameEncryptorInterface>
|
|
|
|
|
frame_encryptor) override;
|
|
|
|
|
|
2015-10-09 02:32:53 -07:00
|
|
|
bool SetOutputVolume(uint32_t ssrc, double volume) override;
|
2019-12-04 09:31:36 -08:00
|
|
|
// Applies the new volume to current and future unsignaled streams.
|
|
|
|
|
bool SetDefaultOutputVolume(double volume) override;
|
2015-05-07 16:05:53 +02:00
|
|
|
|
2019-02-16 02:07:05 +01:00
|
|
|
bool SetBaseMinimumPlayoutDelayMs(uint32_t ssrc, int delay_ms) override;
|
|
|
|
|
absl::optional<int> GetBaseMinimumPlayoutDelayMs(
|
|
|
|
|
uint32_t ssrc) const override;
|
|
|
|
|
|
2015-05-07 16:05:53 +02:00
|
|
|
bool CanInsertDtmf() override;
|
2015-12-02 12:35:09 -08:00
|
|
|
bool InsertDtmf(uint32_t ssrc, int event, int duration) override;
|
2015-05-07 16:05:53 +02:00
|
|
|
|
2019-03-12 11:10:27 -07:00
|
|
|
void OnPacketReceived(rtc::CopyOnWriteBuffer packet,
|
2018-11-05 13:01:41 +01:00
|
|
|
int64_t packet_time_us) override;
|
2016-03-29 17:27:21 -07:00
|
|
|
void OnNetworkRouteChanged(const std::string& transport_name,
|
2016-04-19 15:41:36 -07:00
|
|
|
const rtc::NetworkRoute& network_route) override;
|
2016-03-22 15:32:27 -07:00
|
|
|
void OnReadyToSend(bool ready) override;
|
2015-05-07 16:05:53 +02:00
|
|
|
bool GetStats(VoiceMediaInfo* info) override;
|
2015-05-07 16:42:08 +02:00
|
|
|
|
2019-12-04 09:31:36 -08:00
|
|
|
// Set the audio sink for an existing stream.
|
2015-12-12 01:37:01 +01:00
|
|
|
void SetRawAudioSink(
|
|
|
|
|
uint32_t ssrc,
|
2016-02-26 03:00:35 -08:00
|
|
|
std::unique_ptr<webrtc::AudioSinkInterface> sink) override;
|
2019-12-04 09:31:36 -08:00
|
|
|
// Will set the audio sink on the latest unsignaled stream, future or
|
|
|
|
|
// current. Only one stream at a time will use the sink.
|
|
|
|
|
void SetDefaultRawAudioSink(
|
|
|
|
|
std::unique_ptr<webrtc::AudioSinkInterface> sink) override;
|
2015-12-12 01:37:01 +01:00
|
|
|
|
2017-06-15 12:52:32 -07:00
|
|
|
std::vector<webrtc::RtpSource> GetSources(uint32_t ssrc) const override;
|
Reland of Implemented the GetSources() in native code. (patchset #1 id:1 of https://codereview.webrtc.org/2809613002/ )
Reason for revert:
Re-land, reverting did not fix bug.
https://bugs.chromium.org/p/webrtc/issues/detail?id=7465
Original issue's description:
> Revert of Implemented the GetSources() in native code. (patchset #11 id:510001 of https://codereview.webrtc.org/2770233003/ )
>
> Reason for revert:
> Suspected of WebRtcApprtcBrowserTest.MANUAL_WorksOnApprtc breakage, see
>
> https://bugs.chromium.org/p/webrtc/issues/detail?id=7465
>
> Original issue's description:
> > Added the GetSources() to the RtpReceiverInterface and implemented
> > it for the AudioRtpReceiver.
> >
> > This method returns a vector of RtpSource(both CSRC source and SSRC
> > source) which contains the ID of a source, the timestamp, the source
> > type (SSRC or CSRC) and the audio level.
> >
> > The RtpSource objects are buffered and maintained by the
> > RtpReceiver in webrtc/modules/rtp_rtcp/. When the method is called,
> > the info of the contributing source will be pulled along the object
> > chain:
> > AudioRtpReceiver -> VoiceChannel -> WebRtcVoiceMediaChannel ->
> > AudioReceiveStream -> voe::Channel -> RtpRtcp module
> >
> > Spec:https://w3c.github.io/webrtc-pc/archives/20151006/webrtc.html#widl-RTCRtpReceiver-getContributingSources-sequence-RTCRtpContributingSource
> >
> > BUG=chromium:703122
> > TBR=stefan@webrtc.org, danilchap@webrtc.org
> >
> > Review-Url: https://codereview.webrtc.org/2770233003
> > Cr-Commit-Position: refs/heads/master@{#17591}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/292084c3765d9f3ee406ca2ec86eae206b540053
>
> TBR=deadbeef@webrtc.org,solenberg@webrtc.org,hbos@webrtc.org,philipel@webrtc.org,stefan@webrtc.org,danilchap@webrtc.org,zhihuang@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=chromium:703122
>
> Review-Url: https://codereview.webrtc.org/2809613002
> Cr-Commit-Position: refs/heads/master@{#17616}
> Committed: https://chromium.googlesource.com/external/webrtc/+/fbcc5cb3869d1370008e40f24fc03ac8fb69c675
TBR=deadbeef@webrtc.org,solenberg@webrtc.org,philipel@webrtc.org,stefan@webrtc.org,danilchap@webrtc.org,zhihuang@webrtc.org,olka@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:703122
Review-Url: https://codereview.webrtc.org/2810623003
Cr-Commit-Position: refs/heads/master@{#17621}
2017-04-10 07:39:05 -07:00
|
|
|
|
2020-03-31 11:29:56 +02:00
|
|
|
// Sets a frame transformer between encoder and packetizer, to transform
|
|
|
|
|
// encoded frames before sending them out the network.
|
|
|
|
|
void SetEncoderToPacketizerFrameTransformer(
|
|
|
|
|
uint32_t ssrc,
|
|
|
|
|
rtc::scoped_refptr<webrtc::FrameTransformerInterface> frame_transformer)
|
|
|
|
|
override;
|
2020-04-01 07:46:16 +02:00
|
|
|
void SetDepacketizerToDecoderFrameTransformer(
|
|
|
|
|
uint32_t ssrc,
|
|
|
|
|
rtc::scoped_refptr<webrtc::FrameTransformerInterface> frame_transformer)
|
|
|
|
|
override;
|
2020-03-31 11:29:56 +02:00
|
|
|
|
2015-05-07 16:42:08 +02:00
|
|
|
// implements Transport interface
|
2015-10-02 03:39:33 -07:00
|
|
|
bool SendRtp(const uint8_t* data,
|
|
|
|
|
size_t len,
|
|
|
|
|
const webrtc::PacketOptions& options) override {
|
2016-03-20 06:15:43 -07:00
|
|
|
rtc::CopyOnWriteBuffer packet(data, len, kMaxRtpPacketLen);
|
2015-10-15 07:26:07 -07:00
|
|
|
rtc::PacketOptions rtc_options;
|
|
|
|
|
rtc_options.packet_id = options.packet_id;
|
2018-09-17 17:06:08 -07:00
|
|
|
if (DscpEnabled()) {
|
|
|
|
|
rtc_options.dscp = PreferredDscp();
|
|
|
|
|
}
|
2018-10-09 18:27:57 +02:00
|
|
|
rtc_options.info_signaled_after_sent.included_in_feedback =
|
|
|
|
|
options.included_in_feedback;
|
|
|
|
|
rtc_options.info_signaled_after_sent.included_in_allocation =
|
|
|
|
|
options.included_in_allocation;
|
2015-10-15 07:26:07 -07:00
|
|
|
return VoiceMediaChannel::SendPacket(&packet, rtc_options);
|
2015-05-07 16:42:08 +02:00
|
|
|
}
|
|
|
|
|
|
2015-09-28 09:59:31 -07:00
|
|
|
bool SendRtcp(const uint8_t* data, size_t len) override {
|
2016-03-20 06:15:43 -07:00
|
|
|
rtc::CopyOnWriteBuffer packet(data, len, kMaxRtpPacketLen);
|
2018-04-11 20:14:17 -07:00
|
|
|
rtc::PacketOptions rtc_options;
|
2018-09-17 17:06:08 -07:00
|
|
|
if (DscpEnabled()) {
|
|
|
|
|
rtc_options.dscp = PreferredDscp();
|
|
|
|
|
}
|
2018-10-18 16:52:22 -07:00
|
|
|
|
2018-04-11 20:14:17 -07:00
|
|
|
return VoiceMediaChannel::SendRtcp(&packet, rtc_options);
|
2015-05-07 16:42:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
2015-09-17 16:42:56 +02:00
|
|
|
bool SetOptions(const AudioOptions& options);
|
|
|
|
|
bool SetRecvCodecs(const std::vector<AudioCodec>& codecs);
|
2016-03-08 06:35:16 -08:00
|
|
|
bool SetSendCodecs(const std::vector<AudioCodec>& codecs);
|
2016-03-08 12:37:39 -08:00
|
|
|
bool SetLocalSource(uint32_t ssrc, AudioSource* source);
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
bool MuteStream(uint32_t ssrc, bool mute);
|
2015-09-17 16:42:56 +02:00
|
|
|
|
2015-05-07 16:42:08 +02:00
|
|
|
WebRtcVoiceEngine* engine() { return engine_; }
|
2016-11-03 02:46:53 -07:00
|
|
|
void ChangePlayout(bool playout);
|
2015-10-20 15:49:38 -07:00
|
|
|
int CreateVoEChannel();
|
2015-11-20 09:59:34 -08:00
|
|
|
bool DeleteVoEChannel(int channel);
|
2016-04-27 14:17:10 -07:00
|
|
|
bool SetMaxSendBitrate(int bps);
|
2016-04-14 13:56:37 -07:00
|
|
|
void SetupRecording();
|
2017-03-01 11:29:29 -08:00
|
|
|
// Check if 'ssrc' is an unsignaled stream, and if so mark it as not being
|
|
|
|
|
// unsignaled anymore (i.e. it is now removed, or signaled), and return true.
|
|
|
|
|
bool MaybeDeregisterUnsignaledRecvStream(uint32_t ssrc);
|
2015-05-07 14:07:48 +02:00
|
|
|
|
2015-11-06 15:34:49 -08:00
|
|
|
rtc::ThreadChecker worker_thread_checker_;
|
2015-05-07 14:07:48 +02:00
|
|
|
|
2015-11-06 15:34:49 -08:00
|
|
|
WebRtcVoiceEngine* const engine_ = nullptr;
|
2016-04-20 16:23:10 -07:00
|
|
|
std::vector<AudioCodec> send_codecs_;
|
2017-03-27 07:15:49 -07:00
|
|
|
|
|
|
|
|
// TODO(kwiberg): decoder_map_ and recv_codecs_ store the exact same
|
|
|
|
|
// information, in slightly different formats. Eliminate recv_codecs_.
|
|
|
|
|
std::map<int, webrtc::SdpAudioFormat> decoder_map_;
|
2013-07-10 00:45:36 +00:00
|
|
|
std::vector<AudioCodec> recv_codecs_;
|
2017-03-27 07:15:49 -07:00
|
|
|
|
2016-04-27 14:17:10 -07:00
|
|
|
int max_send_bitrate_bps_ = 0;
|
2013-07-10 00:45:36 +00:00
|
|
|
AudioOptions options_;
|
2018-06-15 15:58:38 +02:00
|
|
|
absl::optional<int> dtmf_payload_type_;
|
2016-11-17 05:25:37 -08:00
|
|
|
int dtmf_payload_freq_ = -1;
|
2016-03-08 06:35:16 -08:00
|
|
|
bool recv_transport_cc_enabled_ = false;
|
2016-06-14 12:13:00 -07:00
|
|
|
bool recv_nack_enabled_ = false;
|
2016-11-17 05:25:37 -08:00
|
|
|
bool desired_playout_ = false;
|
2015-11-06 15:34:49 -08:00
|
|
|
bool playout_ = false;
|
2016-03-08 12:37:39 -08:00
|
|
|
bool send_ = false;
|
2015-11-06 15:34:49 -08:00
|
|
|
webrtc::Call* const call_ = nullptr;
|
2013-07-10 00:45:36 +00:00
|
|
|
|
2018-11-09 13:17:39 -08:00
|
|
|
const MediaConfig::Audio audio_config_;
|
|
|
|
|
|
2017-03-01 11:29:29 -08:00
|
|
|
// Queue of unsignaled SSRCs; oldest at the beginning.
|
|
|
|
|
std::vector<uint32_t> unsignaled_recv_ssrcs_;
|
|
|
|
|
|
2018-04-03 11:16:33 -07:00
|
|
|
// This is a stream param that comes from the remote description, but wasn't
|
|
|
|
|
// signaled with any a=ssrc lines. It holds the information that was signaled
|
|
|
|
|
// before the unsignaled receive stream is created when the first packet is
|
|
|
|
|
// received.
|
|
|
|
|
StreamParams unsignaled_stream_params_;
|
|
|
|
|
|
2017-03-01 11:29:29 -08:00
|
|
|
// Volume for unsignaled streams, which may be set before the stream exists.
|
2015-10-13 03:58:19 -07:00
|
|
|
double default_recv_volume_ = 1.0;
|
2019-02-16 02:07:05 +01:00
|
|
|
|
|
|
|
|
// Delay for unsignaled streams, which may be set before the stream exists.
|
|
|
|
|
int default_recv_base_minimum_delay_ms_ = 0;
|
|
|
|
|
|
2017-03-01 11:29:29 -08:00
|
|
|
// Sink for latest unsignaled stream - may be set before the stream exists.
|
2016-02-26 03:00:35 -08:00
|
|
|
std::unique_ptr<webrtc::AudioSinkInterface> default_sink_;
|
2015-11-12 06:02:30 -08:00
|
|
|
// Default SSRC to use for RTCP receiver reports in case of no signaled
|
2015-10-20 15:49:38 -07:00
|
|
|
// send streams. See: https://code.google.com/p/webrtc/issues/detail?id=4740
|
2015-11-12 06:02:30 -08:00
|
|
|
// and https://code.google.com/p/chromium/issues/detail?id=547661
|
|
|
|
|
uint32_t receiver_reports_ssrc_ = 0xFA17FA17u;
|
2015-10-13 03:58:19 -07:00
|
|
|
|
2015-10-21 13:01:53 -07:00
|
|
|
class WebRtcAudioSendStream;
|
|
|
|
|
std::map<uint32_t, WebRtcAudioSendStream*> send_streams_;
|
2015-11-16 07:34:50 -08:00
|
|
|
std::vector<webrtc::RtpExtension> send_rtp_extensions_;
|
2018-03-26 10:24:32 -07:00
|
|
|
std::string mid_;
|
2015-10-21 13:01:53 -07:00
|
|
|
|
|
|
|
|
class WebRtcAudioReceiveStream;
|
2015-11-20 09:59:34 -08:00
|
|
|
std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_;
|
2015-05-07 14:07:48 +02:00
|
|
|
std::vector<webrtc::RtpExtension> recv_rtp_extensions_;
|
2015-10-21 13:01:53 -07:00
|
|
|
|
2018-06-15 15:58:38 +02:00
|
|
|
absl::optional<webrtc::AudioSendStream::Config::SendCodecSpec>
|
2017-04-27 02:08:52 -07:00
|
|
|
send_codec_spec_;
|
2016-03-08 06:35:16 -08:00
|
|
|
|
2018-03-20 19:18:55 +01:00
|
|
|
// TODO(kwiberg): Per-SSRC codec pair IDs?
|
|
|
|
|
const webrtc::AudioCodecPairId codec_pair_id_ =
|
|
|
|
|
webrtc::AudioCodecPairId::Create();
|
|
|
|
|
|
2018-10-15 10:20:24 -07:00
|
|
|
// Per peer connection crypto options that last for the lifetime of the peer
|
|
|
|
|
// connection.
|
|
|
|
|
const webrtc::CryptoOptions crypto_options_;
|
2018-10-04 14:22:34 -07:00
|
|
|
// Unsignaled streams have an option to have a frame decryptor set on them.
|
|
|
|
|
rtc::scoped_refptr<webrtc::FrameDecryptorInterface>
|
|
|
|
|
unsignaled_frame_decryptor_;
|
|
|
|
|
|
2015-10-21 13:01:53 -07:00
|
|
|
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel);
|
2013-07-10 00:45:36 +00:00
|
|
|
};
|
|
|
|
|
} // namespace cricket
|
|
|
|
|
|
2019-01-11 09:11:00 -08:00
|
|
|
#endif // MEDIA_ENGINE_WEBRTC_VOICE_ENGINE_H_
|