Remove webrtc::Config from ViEChannelGroup.
Also removing webrtc/experiments.h which is no longer used. BUG=webrtc:1695 R=stefan@webrtc.org TBR=mflodman@webrtc.org Review URL: https://codereview.webrtc.org/1250513006 Cr-Commit-Position: refs/heads/master@{#9642}
This commit is contained in:
@ -171,7 +171,6 @@ source_set("webrtc") {
|
||||
sources = [
|
||||
"call.h",
|
||||
"config.h",
|
||||
"experiments.h",
|
||||
"frame_callback.h",
|
||||
"transport.h",
|
||||
]
|
||||
|
||||
@ -1,33 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_EXPERIMENTS_H_
|
||||
#define WEBRTC_EXPERIMENTS_H_
|
||||
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
namespace webrtc {
|
||||
struct RemoteBitrateEstimatorMinRate {
|
||||
RemoteBitrateEstimatorMinRate() : min_rate(30000) {}
|
||||
RemoteBitrateEstimatorMinRate(uint32_t min_rate) : min_rate(min_rate) {}
|
||||
|
||||
uint32_t min_rate;
|
||||
};
|
||||
|
||||
struct AimdRemoteRateControl {
|
||||
AimdRemoteRateControl() : enabled(false) {}
|
||||
explicit AimdRemoteRateControl(bool set_enabled)
|
||||
: enabled(set_enabled) {}
|
||||
virtual ~AimdRemoteRateControl() {}
|
||||
|
||||
const bool enabled;
|
||||
};
|
||||
} // namespace webrtc
|
||||
#endif // WEBRTC_EXPERIMENTS_H_
|
||||
@ -17,7 +17,6 @@
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/common.h"
|
||||
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
|
||||
#include "webrtc/experiments.h"
|
||||
#include "webrtc/modules/video_coding/codecs/interface/mock/mock_video_codec_interface.h"
|
||||
#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
|
||||
#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h"
|
||||
|
||||
@ -23,7 +23,6 @@
|
||||
#include "webrtc/common.h"
|
||||
#include "webrtc/common_types.h"
|
||||
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
|
||||
#include "webrtc/experiments.h"
|
||||
#include "webrtc/modules/interface/module_common_types.h"
|
||||
#include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
|
||||
#include "webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h"
|
||||
|
||||
@ -31,7 +31,7 @@ namespace webrtc {
|
||||
class MockVieEncoder : public ViEEncoder {
|
||||
public:
|
||||
explicit MockVieEncoder(ProcessThread* process_thread, PacedSender* pacer)
|
||||
: ViEEncoder(1, 1, config_, *process_thread, pacer, NULL, NULL, false) {}
|
||||
: ViEEncoder(1, 1, *process_thread, pacer, NULL, NULL, false) {}
|
||||
~MockVieEncoder() {}
|
||||
|
||||
MOCK_METHOD1(OnReceivedIntraFrameRequest,
|
||||
@ -42,8 +42,6 @@ class MockVieEncoder : public ViEEncoder {
|
||||
void(uint32_t ssrc, uint64_t picture_id));
|
||||
MOCK_METHOD2(OnLocalSsrcChanged,
|
||||
void(uint32_t old_ssrc, uint32_t new_ssrc));
|
||||
|
||||
const Config config_;
|
||||
};
|
||||
|
||||
class VieKeyRequestTest : public ::testing::Test {
|
||||
|
||||
@ -17,7 +17,6 @@
|
||||
#include "webrtc/common.h"
|
||||
#include "webrtc/common_video/interface/incoming_video_stream.h"
|
||||
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
|
||||
#include "webrtc/experiments.h"
|
||||
#include "webrtc/frame_callback.h"
|
||||
#include "webrtc/modules/pacing/include/paced_sender.h"
|
||||
#include "webrtc/modules/pacing/include/packet_router.h"
|
||||
@ -81,7 +80,6 @@ class ViEChannelProtectionCallback : public VCMProtectionCallback {
|
||||
ViEChannel::ViEChannel(int32_t channel_id,
|
||||
int32_t engine_id,
|
||||
uint32_t number_of_cores,
|
||||
const Config& config,
|
||||
Transport* transport,
|
||||
ProcessThread* module_process_thread,
|
||||
RtcpIntraFrameObserver* intra_frame_observer,
|
||||
|
||||
@ -99,7 +99,6 @@ class ViEChannel : public VCMFrameTypeCallback,
|
||||
ViEChannel(int32_t channel_id,
|
||||
int32_t engine_id,
|
||||
uint32_t number_of_cores,
|
||||
const Config& config,
|
||||
Transport* transport,
|
||||
ProcessThread* module_process_thread,
|
||||
RtcpIntraFrameObserver* intra_frame_observer,
|
||||
|
||||
@ -13,7 +13,6 @@
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/thread_annotations.h"
|
||||
#include "webrtc/common.h"
|
||||
#include "webrtc/experiments.h"
|
||||
#include "webrtc/modules/pacing/include/paced_sender.h"
|
||||
#include "webrtc/modules/pacing/include/packet_router.h"
|
||||
#include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h"
|
||||
@ -34,16 +33,15 @@ namespace webrtc {
|
||||
namespace {
|
||||
|
||||
static const uint32_t kTimeOffsetSwitchThreshold = 30;
|
||||
static const uint32_t kMinBitrateBps = 30000;
|
||||
|
||||
class WrappingBitrateEstimator : public RemoteBitrateEstimator {
|
||||
public:
|
||||
WrappingBitrateEstimator(RemoteBitrateObserver* observer,
|
||||
Clock* clock,
|
||||
const Config& config)
|
||||
WrappingBitrateEstimator(RemoteBitrateObserver* observer, Clock* clock)
|
||||
: observer_(observer),
|
||||
clock_(clock),
|
||||
crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
|
||||
min_bitrate_bps_(config.Get<RemoteBitrateEstimatorMinRate>().min_rate),
|
||||
min_bitrate_bps_(kMinBitrateBps),
|
||||
rbe_(new RemoteBitrateEstimatorSingleStream(observer_,
|
||||
clock_,
|
||||
min_bitrate_bps_)),
|
||||
@ -153,7 +151,6 @@ ChannelGroup::ChannelGroup(ProcessThread* process_thread)
|
||||
PacedSender::kDefaultPaceMultiplier *
|
||||
BitrateController::kDefaultStartBitrateKbps,
|
||||
0)),
|
||||
config_(new Config),
|
||||
process_thread_(process_thread),
|
||||
pacer_thread_(ProcessThread::Create()),
|
||||
// Constructed last as this object calls the provided callback on
|
||||
@ -162,7 +159,7 @@ ChannelGroup::ChannelGroup(ProcessThread* process_thread)
|
||||
BitrateController::CreateBitrateController(Clock::GetRealTimeClock(),
|
||||
this)) {
|
||||
remote_bitrate_estimator_.reset(new WrappingBitrateEstimator(
|
||||
remb_.get(), Clock::GetRealTimeClock(), *config_.get()));
|
||||
remb_.get(), Clock::GetRealTimeClock()));
|
||||
|
||||
call_stats_->RegisterStatsObserver(remote_bitrate_estimator_.get());
|
||||
|
||||
@ -194,10 +191,9 @@ bool ChannelGroup::CreateSendChannel(int channel_id,
|
||||
// TODO(pbos): Remove checks for empty ssrcs and add this check when there's
|
||||
// no base channel.
|
||||
// DCHECK(!ssrcs.empty());
|
||||
rtc::scoped_ptr<ViEEncoder> vie_encoder(
|
||||
new ViEEncoder(channel_id, number_of_cores, *config_.get(),
|
||||
*process_thread_, pacer_.get(), bitrate_allocator_.get(),
|
||||
bitrate_controller_.get(), false));
|
||||
rtc::scoped_ptr<ViEEncoder> vie_encoder(new ViEEncoder(
|
||||
channel_id, number_of_cores, *process_thread_, pacer_.get(),
|
||||
bitrate_allocator_.get(), bitrate_controller_.get(), false));
|
||||
if (!vie_encoder->Init()) {
|
||||
return false;
|
||||
}
|
||||
@ -236,8 +232,8 @@ bool ChannelGroup::CreateChannel(int channel_id,
|
||||
size_t max_rtp_streams,
|
||||
bool sender) {
|
||||
rtc::scoped_ptr<ViEChannel> channel(new ViEChannel(
|
||||
channel_id, engine_id, number_of_cores, *config_.get(), transport,
|
||||
process_thread_, encoder_state_feedback_->GetRtcpIntraFrameObserver(),
|
||||
channel_id, engine_id, number_of_cores, transport, process_thread_,
|
||||
encoder_state_feedback_->GetRtcpIntraFrameObserver(),
|
||||
bitrate_controller_->CreateRtcpBandwidthObserver(),
|
||||
remote_bitrate_estimator_.get(), call_stats_->rtcp_rtt_stats(),
|
||||
pacer_.get(), packet_router_.get(), max_rtp_streams, sender));
|
||||
|
||||
@ -95,8 +95,6 @@ class ChannelGroup : public BitrateObserver {
|
||||
mutable rtc::CriticalSection encoder_map_crit_;
|
||||
EncoderMap vie_encoder_map_ GUARDED_BY(encoder_map_crit_);
|
||||
|
||||
const rtc::scoped_ptr<Config> config_;
|
||||
|
||||
// Registered at construct time and assumed to outlive this class.
|
||||
ProcessThread* process_thread_;
|
||||
rtc::scoped_ptr<ProcessThread> pacer_thread_;
|
||||
|
||||
@ -103,7 +103,6 @@ class ViEBitrateObserver : public BitrateObserver {
|
||||
|
||||
ViEEncoder::ViEEncoder(int32_t channel_id,
|
||||
uint32_t number_of_cores,
|
||||
const Config& config,
|
||||
ProcessThread& module_process_thread,
|
||||
PacedSender* pacer,
|
||||
BitrateAllocator* bitrate_allocator,
|
||||
|
||||
@ -73,7 +73,6 @@ class ViEEncoder : public RtcpIntraFrameObserver,
|
||||
|
||||
ViEEncoder(int32_t channel_id,
|
||||
uint32_t number_of_cores,
|
||||
const Config& config,
|
||||
ProcessThread& module_process_thread,
|
||||
PacedSender* pacer,
|
||||
BitrateAllocator* bitrate_allocator,
|
||||
|
||||
@ -68,7 +68,6 @@
|
||||
'audio_send_stream.h',
|
||||
'call.h',
|
||||
'config.h',
|
||||
'experiments.h',
|
||||
'frame_callback.h',
|
||||
'stream.h',
|
||||
'transport.h',
|
||||
|
||||
Reference in New Issue
Block a user