Move ownership of voe::Channel into Audio[Receive|Send]Stream.

* VoEBase contains only stub methods (until downstream code is
  updated).

* voe::Channel and ChannelProxy classes remain, but are now created
  internally to the streams. As a result,
  internal::Audio[Receive|Send]Stream can have a ChannelProxy injected
  for testing.

* Stream classes share Call::module_process_thread_ for their RtpRtcp
  modules, rather than using a separate thread shared only among audio
  streams.

* voe::Channel instances use Call::worker_queue_ for encoding packets,
  rather than having a separate queue for audio (send) streams.

Bug: webrtc:4690
Change-Id: I8059ef224ad13aa0a6ded2cafc52599c7f64d68d
Reviewed-on: https://webrtc-review.googlesource.com/34640
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21578}
This commit is contained in:
Fredrik Solenberg
2018-01-11 13:52:30 +01:00
committed by Commit Bot
parent aa6b24f23c
commit 8f5787a919
51 changed files with 506 additions and 2005 deletions

View File

@ -20,7 +20,6 @@
#include "audio/audio_receive_stream.h"
#include "audio/audio_send_stream.h"
#include "audio/audio_state.h"
#include "audio/scoped_voe_interface.h"
#include "audio/time_interval.h"
#include "call/bitrate_allocator.h"
#include "call/call.h"
@ -605,9 +604,9 @@ webrtc::AudioSendStream* Call::CreateAudioSendStream(
}
AudioSendStream* send_stream = new AudioSendStream(
config, config_.audio_state, &worker_queue_, transport_send_.get(),
bitrate_allocator_.get(), event_log_, call_stats_->rtcp_rtt_stats(),
suspended_rtp_state);
config, config_.audio_state, &worker_queue_, module_process_thread_.get(),
transport_send_.get(), bitrate_allocator_.get(), event_log_,
call_stats_->rtcp_rtt_stats(), suspended_rtp_state);
{
WriteLockScoped write_lock(*send_crit_);
RTC_DCHECK(audio_send_ssrcs_.find(config.rtp.ssrc) ==
@ -663,8 +662,8 @@ webrtc::AudioReceiveStream* Call::CreateAudioReceiveStream(
event_log_->Log(rtc::MakeUnique<RtcEventAudioReceiveStreamConfig>(
CreateRtcLogStreamConfig(config)));
AudioReceiveStream* receive_stream = new AudioReceiveStream(
&audio_receiver_controller_, transport_send_->packet_router(), config,
config_.audio_state, event_log_);
&audio_receiver_controller_, transport_send_->packet_router(),
module_process_thread_.get(), config, config_.audio_state, event_log_);
{
WriteLockScoped write_lock(*receive_crit_);
receive_rtp_config_[config.rtp.remote_ssrc] =