Bug 1376873 - Remove CPULoadStateObserver; r=ng

We went through a lot of trouble to plumb the CPULoadState down to
MediaOptimization, but the value is not actually used for anything, at least
since the Branch 57 update. This removes the plumbing, since it seems we are
getting along ok without it.

Differential Revision: https://phabricator.services.mozilla.com/D7443

--HG--
extra : rebase_source : e8f7c8b313d37ea3383a9eb16a6cc573844762cd
This commit is contained in:
Dan Minor 2018-04-19 13:37:51 -04:00
Родитель c1294214c2
Коммит 9bc0e6b1c6
9 изменённых файлов: 0 добавлений и 40 удалений

Просмотреть файл

@ -69,11 +69,6 @@ public:
void SetSource(rtc::VideoSourceInterface<webrtc::VideoFrame>* source,
const DegradationPreference& degradation_preference) override {}
CPULoadStateObserver* LoadStateObserver() override
{
return nullptr;
}
void ReconfigureVideoEncoder(VideoEncoderConfig config) override
{
mEncoderConfig = config.Copy();

Просмотреть файл

@ -265,10 +265,6 @@ class VideoSendStream {
rtc::VideoSourceInterface<webrtc::VideoFrame>* source,
const DegradationPreference& degradation_preference) = 0;
// Gets interface used to signal the current CPU work level to the encoder.
// Valid as long as the VideoSendStream is valid.
virtual CPULoadStateObserver* LoadStateObserver() = 0;
// Set which streams to send. Must have at least as many SSRCs as configured
// in the config. Encoder settings are passed on to the encoder instance along
// with the VideoStream settings.

Просмотреть файл

@ -409,9 +409,6 @@ class VideoCodingModule : public Module {
// Setting a desired delay to the VCM receiver. Video rendering will be
// delayed by at least desired_delay_ms.
virtual int SetMinReceiverDelay(int desired_delay_ms) = 0;
// Set current load state of the CPU
virtual void SetCPULoadState(CPULoadState state) = 0;
virtual void RegisterPostEncodeImageCallback(
EncodedImageCallback* post_encode_callback) = 0;

Просмотреть файл

@ -149,12 +149,5 @@ void MediaOptimization::ProcessIncomingFrameRate(int64_t now) {
}
}
/* TODO: Fix CpuLoadState
void MediaOptimization::SetCPULoadState(CPULoadState state) {
CriticalSectionScoped lock(crit_sect_.get());
loadstate_ = state;
}
*/
} // namespace media_optimization
} // namespace webrtc

Просмотреть файл

@ -242,12 +242,6 @@ class VideoCodingModuleImpl : public VideoCodingModule {
return receiver_.SetDecodeErrorMode(decode_error_mode);
}
virtual void SetCPULoadState(CPULoadState state) override {
/* TODO: fix CPULoadState stuff...
return sender_.SetCPULoadState(state);
*/
}
int SetMinReceiverDelay(int desired_delay_ms) override {
return receiver_.SetMinReceiverDelay(desired_delay_ms);
}

Просмотреть файл

@ -185,8 +185,6 @@ class VideoReceiver : public Module {
int32_t SetReceiveChannelParameters(int64_t rtt);
int32_t SetVideoProtection(VCMVideoProtection videoProtection, bool enable);
void SetCPULoadState(CPULoadState state);
int64_t TimeUntilNextProcess() override;
void Process() override;

Просмотреть файл

@ -393,11 +393,5 @@ int32_t VideoSender::EnableFrameDropper(bool enable) {
return VCM_OK;
}
/* TODO: Fixup SetCPULoadState
void VideoSender::SetCPULoadState(CPULoadState state) {
rtc::CritScope lock(&encoder_crit_);
_mediaOpt.SetCPULoadState(state);
}
*/
} // namespace vcm
} // namespace webrtc

Просмотреть файл

@ -595,11 +595,6 @@ VideoSendStream::~VideoSendStream() {
RTC_DCHECK(!send_stream_);
}
CPULoadStateObserver* VideoSendStream::LoadStateObserver() {
//TODO: figure out CPULoadStateObserver stuff
return nullptr;
}
void VideoSendStream::Start() {
RTC_DCHECK_RUN_ON(&thread_checker_);
RTC_LOG(LS_INFO) << "VideoSendStream::Start";

Просмотреть файл

@ -74,8 +74,6 @@ class VideoSendStream : public webrtc::VideoSendStream {
void SetSource(rtc::VideoSourceInterface<webrtc::VideoFrame>* source,
const DegradationPreference& degradation_preference) override;
CPULoadStateObserver* LoadStateObserver() override;
void ReconfigureVideoEncoder(VideoEncoderConfig) override;
Stats GetStats() override;