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 = [
|
sources = [
|
||||||
"call.h",
|
"call.h",
|
||||||
"config.h",
|
"config.h",
|
||||||
"experiments.h",
|
|
||||||
"frame_callback.h",
|
"frame_callback.h",
|
||||||
"transport.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/base/scoped_ptr.h"
|
||||||
#include "webrtc/common.h"
|
#include "webrtc/common.h"
|
||||||
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.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/interface/mock/mock_video_codec_interface.h"
|
||||||
#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
|
#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
|
||||||
#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h"
|
#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h"
|
||||||
|
|||||||
@ -23,7 +23,6 @@
|
|||||||
#include "webrtc/common.h"
|
#include "webrtc/common.h"
|
||||||
#include "webrtc/common_types.h"
|
#include "webrtc/common_types.h"
|
||||||
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.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/interface/module_common_types.h"
|
||||||
#include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
|
#include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
|
||||||
#include "webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h"
|
#include "webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h"
|
||||||
|
|||||||
@ -31,7 +31,7 @@ namespace webrtc {
|
|||||||
class MockVieEncoder : public ViEEncoder {
|
class MockVieEncoder : public ViEEncoder {
|
||||||
public:
|
public:
|
||||||
explicit MockVieEncoder(ProcessThread* process_thread, PacedSender* pacer)
|
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() {}
|
~MockVieEncoder() {}
|
||||||
|
|
||||||
MOCK_METHOD1(OnReceivedIntraFrameRequest,
|
MOCK_METHOD1(OnReceivedIntraFrameRequest,
|
||||||
@ -42,8 +42,6 @@ class MockVieEncoder : public ViEEncoder {
|
|||||||
void(uint32_t ssrc, uint64_t picture_id));
|
void(uint32_t ssrc, uint64_t picture_id));
|
||||||
MOCK_METHOD2(OnLocalSsrcChanged,
|
MOCK_METHOD2(OnLocalSsrcChanged,
|
||||||
void(uint32_t old_ssrc, uint32_t new_ssrc));
|
void(uint32_t old_ssrc, uint32_t new_ssrc));
|
||||||
|
|
||||||
const Config config_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class VieKeyRequestTest : public ::testing::Test {
|
class VieKeyRequestTest : public ::testing::Test {
|
||||||
|
|||||||
@ -17,7 +17,6 @@
|
|||||||
#include "webrtc/common.h"
|
#include "webrtc/common.h"
|
||||||
#include "webrtc/common_video/interface/incoming_video_stream.h"
|
#include "webrtc/common_video/interface/incoming_video_stream.h"
|
||||||
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
|
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
|
||||||
#include "webrtc/experiments.h"
|
|
||||||
#include "webrtc/frame_callback.h"
|
#include "webrtc/frame_callback.h"
|
||||||
#include "webrtc/modules/pacing/include/paced_sender.h"
|
#include "webrtc/modules/pacing/include/paced_sender.h"
|
||||||
#include "webrtc/modules/pacing/include/packet_router.h"
|
#include "webrtc/modules/pacing/include/packet_router.h"
|
||||||
@ -81,7 +80,6 @@ class ViEChannelProtectionCallback : public VCMProtectionCallback {
|
|||||||
ViEChannel::ViEChannel(int32_t channel_id,
|
ViEChannel::ViEChannel(int32_t channel_id,
|
||||||
int32_t engine_id,
|
int32_t engine_id,
|
||||||
uint32_t number_of_cores,
|
uint32_t number_of_cores,
|
||||||
const Config& config,
|
|
||||||
Transport* transport,
|
Transport* transport,
|
||||||
ProcessThread* module_process_thread,
|
ProcessThread* module_process_thread,
|
||||||
RtcpIntraFrameObserver* intra_frame_observer,
|
RtcpIntraFrameObserver* intra_frame_observer,
|
||||||
|
|||||||
@ -99,7 +99,6 @@ class ViEChannel : public VCMFrameTypeCallback,
|
|||||||
ViEChannel(int32_t channel_id,
|
ViEChannel(int32_t channel_id,
|
||||||
int32_t engine_id,
|
int32_t engine_id,
|
||||||
uint32_t number_of_cores,
|
uint32_t number_of_cores,
|
||||||
const Config& config,
|
|
||||||
Transport* transport,
|
Transport* transport,
|
||||||
ProcessThread* module_process_thread,
|
ProcessThread* module_process_thread,
|
||||||
RtcpIntraFrameObserver* intra_frame_observer,
|
RtcpIntraFrameObserver* intra_frame_observer,
|
||||||
|
|||||||
@ -13,7 +13,6 @@
|
|||||||
#include "webrtc/base/checks.h"
|
#include "webrtc/base/checks.h"
|
||||||
#include "webrtc/base/thread_annotations.h"
|
#include "webrtc/base/thread_annotations.h"
|
||||||
#include "webrtc/common.h"
|
#include "webrtc/common.h"
|
||||||
#include "webrtc/experiments.h"
|
|
||||||
#include "webrtc/modules/pacing/include/paced_sender.h"
|
#include "webrtc/modules/pacing/include/paced_sender.h"
|
||||||
#include "webrtc/modules/pacing/include/packet_router.h"
|
#include "webrtc/modules/pacing/include/packet_router.h"
|
||||||
#include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h"
|
#include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h"
|
||||||
@ -34,16 +33,15 @@ namespace webrtc {
|
|||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
static const uint32_t kTimeOffsetSwitchThreshold = 30;
|
static const uint32_t kTimeOffsetSwitchThreshold = 30;
|
||||||
|
static const uint32_t kMinBitrateBps = 30000;
|
||||||
|
|
||||||
class WrappingBitrateEstimator : public RemoteBitrateEstimator {
|
class WrappingBitrateEstimator : public RemoteBitrateEstimator {
|
||||||
public:
|
public:
|
||||||
WrappingBitrateEstimator(RemoteBitrateObserver* observer,
|
WrappingBitrateEstimator(RemoteBitrateObserver* observer, Clock* clock)
|
||||||
Clock* clock,
|
|
||||||
const Config& config)
|
|
||||||
: observer_(observer),
|
: observer_(observer),
|
||||||
clock_(clock),
|
clock_(clock),
|
||||||
crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
|
crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
|
||||||
min_bitrate_bps_(config.Get<RemoteBitrateEstimatorMinRate>().min_rate),
|
min_bitrate_bps_(kMinBitrateBps),
|
||||||
rbe_(new RemoteBitrateEstimatorSingleStream(observer_,
|
rbe_(new RemoteBitrateEstimatorSingleStream(observer_,
|
||||||
clock_,
|
clock_,
|
||||||
min_bitrate_bps_)),
|
min_bitrate_bps_)),
|
||||||
@ -153,7 +151,6 @@ ChannelGroup::ChannelGroup(ProcessThread* process_thread)
|
|||||||
PacedSender::kDefaultPaceMultiplier *
|
PacedSender::kDefaultPaceMultiplier *
|
||||||
BitrateController::kDefaultStartBitrateKbps,
|
BitrateController::kDefaultStartBitrateKbps,
|
||||||
0)),
|
0)),
|
||||||
config_(new Config),
|
|
||||||
process_thread_(process_thread),
|
process_thread_(process_thread),
|
||||||
pacer_thread_(ProcessThread::Create()),
|
pacer_thread_(ProcessThread::Create()),
|
||||||
// Constructed last as this object calls the provided callback on
|
// Constructed last as this object calls the provided callback on
|
||||||
@ -162,7 +159,7 @@ ChannelGroup::ChannelGroup(ProcessThread* process_thread)
|
|||||||
BitrateController::CreateBitrateController(Clock::GetRealTimeClock(),
|
BitrateController::CreateBitrateController(Clock::GetRealTimeClock(),
|
||||||
this)) {
|
this)) {
|
||||||
remote_bitrate_estimator_.reset(new WrappingBitrateEstimator(
|
remote_bitrate_estimator_.reset(new WrappingBitrateEstimator(
|
||||||
remb_.get(), Clock::GetRealTimeClock(), *config_.get()));
|
remb_.get(), Clock::GetRealTimeClock()));
|
||||||
|
|
||||||
call_stats_->RegisterStatsObserver(remote_bitrate_estimator_.get());
|
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
|
// TODO(pbos): Remove checks for empty ssrcs and add this check when there's
|
||||||
// no base channel.
|
// no base channel.
|
||||||
// DCHECK(!ssrcs.empty());
|
// DCHECK(!ssrcs.empty());
|
||||||
rtc::scoped_ptr<ViEEncoder> vie_encoder(
|
rtc::scoped_ptr<ViEEncoder> vie_encoder(new ViEEncoder(
|
||||||
new ViEEncoder(channel_id, number_of_cores, *config_.get(),
|
channel_id, number_of_cores, *process_thread_, pacer_.get(),
|
||||||
*process_thread_, pacer_.get(), bitrate_allocator_.get(),
|
bitrate_allocator_.get(), bitrate_controller_.get(), false));
|
||||||
bitrate_controller_.get(), false));
|
|
||||||
if (!vie_encoder->Init()) {
|
if (!vie_encoder->Init()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -236,8 +232,8 @@ bool ChannelGroup::CreateChannel(int channel_id,
|
|||||||
size_t max_rtp_streams,
|
size_t max_rtp_streams,
|
||||||
bool sender) {
|
bool sender) {
|
||||||
rtc::scoped_ptr<ViEChannel> channel(new ViEChannel(
|
rtc::scoped_ptr<ViEChannel> channel(new ViEChannel(
|
||||||
channel_id, engine_id, number_of_cores, *config_.get(), transport,
|
channel_id, engine_id, number_of_cores, transport, process_thread_,
|
||||||
process_thread_, encoder_state_feedback_->GetRtcpIntraFrameObserver(),
|
encoder_state_feedback_->GetRtcpIntraFrameObserver(),
|
||||||
bitrate_controller_->CreateRtcpBandwidthObserver(),
|
bitrate_controller_->CreateRtcpBandwidthObserver(),
|
||||||
remote_bitrate_estimator_.get(), call_stats_->rtcp_rtt_stats(),
|
remote_bitrate_estimator_.get(), call_stats_->rtcp_rtt_stats(),
|
||||||
pacer_.get(), packet_router_.get(), max_rtp_streams, sender));
|
pacer_.get(), packet_router_.get(), max_rtp_streams, sender));
|
||||||
|
|||||||
@ -95,8 +95,6 @@ class ChannelGroup : public BitrateObserver {
|
|||||||
mutable rtc::CriticalSection encoder_map_crit_;
|
mutable rtc::CriticalSection encoder_map_crit_;
|
||||||
EncoderMap vie_encoder_map_ GUARDED_BY(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.
|
// Registered at construct time and assumed to outlive this class.
|
||||||
ProcessThread* process_thread_;
|
ProcessThread* process_thread_;
|
||||||
rtc::scoped_ptr<ProcessThread> pacer_thread_;
|
rtc::scoped_ptr<ProcessThread> pacer_thread_;
|
||||||
|
|||||||
@ -103,7 +103,6 @@ class ViEBitrateObserver : public BitrateObserver {
|
|||||||
|
|
||||||
ViEEncoder::ViEEncoder(int32_t channel_id,
|
ViEEncoder::ViEEncoder(int32_t channel_id,
|
||||||
uint32_t number_of_cores,
|
uint32_t number_of_cores,
|
||||||
const Config& config,
|
|
||||||
ProcessThread& module_process_thread,
|
ProcessThread& module_process_thread,
|
||||||
PacedSender* pacer,
|
PacedSender* pacer,
|
||||||
BitrateAllocator* bitrate_allocator,
|
BitrateAllocator* bitrate_allocator,
|
||||||
|
|||||||
@ -73,7 +73,6 @@ class ViEEncoder : public RtcpIntraFrameObserver,
|
|||||||
|
|
||||||
ViEEncoder(int32_t channel_id,
|
ViEEncoder(int32_t channel_id,
|
||||||
uint32_t number_of_cores,
|
uint32_t number_of_cores,
|
||||||
const Config& config,
|
|
||||||
ProcessThread& module_process_thread,
|
ProcessThread& module_process_thread,
|
||||||
PacedSender* pacer,
|
PacedSender* pacer,
|
||||||
BitrateAllocator* bitrate_allocator,
|
BitrateAllocator* bitrate_allocator,
|
||||||
|
|||||||
@ -68,7 +68,6 @@
|
|||||||
'audio_send_stream.h',
|
'audio_send_stream.h',
|
||||||
'call.h',
|
'call.h',
|
||||||
'config.h',
|
'config.h',
|
||||||
'experiments.h',
|
|
||||||
'frame_callback.h',
|
'frame_callback.h',
|
||||||
'stream.h',
|
'stream.h',
|
||||||
'transport.h',
|
'transport.h',
|
||||||
|
|||||||
Reference in New Issue
Block a user