Removed old code and default implementations.
R=mflodman@webrtc.org Review URL: https://webrtc-codereview.appspot.com/21689004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6588 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
9c89e932c9
commit
dfdaeb92d8
@ -43,29 +43,11 @@ class CpuOveruseObserver {
|
||||
virtual ~CpuOveruseObserver() {}
|
||||
};
|
||||
|
||||
// Limits on standard deviation for under/overuse.
|
||||
#ifdef WEBRTC_ANDROID
|
||||
const float kOveruseStdDevMs = 32.0f;
|
||||
const float kNormalUseStdDevMs = 27.0f;
|
||||
#elif WEBRTC_LINUX
|
||||
const float kOveruseStdDevMs = 20.0f;
|
||||
const float kNormalUseStdDevMs = 14.0f;
|
||||
#elif WEBRTC_MAC
|
||||
const float kOveruseStdDevMs = 27.0f;
|
||||
const float kNormalUseStdDevMs = 21.0f;
|
||||
#elif WEBRTC_WIN
|
||||
const float kOveruseStdDevMs = 20.0f;
|
||||
const float kNormalUseStdDevMs = 14.0f;
|
||||
#else
|
||||
const float kOveruseStdDevMs = 30.0f;
|
||||
const float kNormalUseStdDevMs = 20.0f;
|
||||
#endif
|
||||
|
||||
struct CpuOveruseOptions {
|
||||
CpuOveruseOptions()
|
||||
: enable_capture_jitter_method(true),
|
||||
low_capture_jitter_threshold_ms(kNormalUseStdDevMs),
|
||||
high_capture_jitter_threshold_ms(kOveruseStdDevMs),
|
||||
low_capture_jitter_threshold_ms(20.0f),
|
||||
high_capture_jitter_threshold_ms(30.0f),
|
||||
enable_encode_usage_method(false),
|
||||
low_encode_usage_threshold_percent(60),
|
||||
high_encode_usage_threshold_percent(90),
|
||||
@ -216,26 +198,11 @@ class WEBRTC_DLLEXPORT ViEBase {
|
||||
CpuOveruseObserver* observer) = 0;
|
||||
|
||||
// Sets options for cpu overuse detector.
|
||||
// TODO(asapersson): Remove default implementation.
|
||||
virtual int SetCpuOveruseOptions(int channel,
|
||||
const CpuOveruseOptions& options) {
|
||||
return -1;
|
||||
}
|
||||
const CpuOveruseOptions& options) = 0;
|
||||
|
||||
// Gets cpu overuse measures.
|
||||
// TODO(asapersson): Remove default implementation.
|
||||
virtual int GetCpuOveruseMetrics(int channel,
|
||||
CpuOveruseMetrics* metrics) {
|
||||
return -1;
|
||||
}
|
||||
// TODO(asapersson): Remove this function when libjingle has been updated.
|
||||
virtual int CpuOveruseMeasures(int channel,
|
||||
int* capture_jitter_ms,
|
||||
int* avg_encode_time_ms,
|
||||
int* encode_usage_percent,
|
||||
int* capture_queue_delay_ms_per_s) {
|
||||
return -1;
|
||||
}
|
||||
virtual int GetCpuOveruseMetrics(int channel, CpuOveruseMetrics* metrics) = 0;
|
||||
|
||||
// Specifies the VoiceEngine and VideoEngine channel pair to use for
|
||||
// audio/video synchronization.
|
||||
|
@ -261,8 +261,7 @@ class WEBRTC_DLLEXPORT ViERTP_RTCP {
|
||||
|
||||
// Enables/disables RTCP Receiver Reference Time Report Block extension/
|
||||
// DLRR Report Block extension (RFC 3611).
|
||||
// TODO(asapersson): Remove default implementation.
|
||||
virtual int SetRtcpXrRrtrStatus(int video_channel, bool enable) { return -1; }
|
||||
virtual int SetRtcpXrRrtrStatus(int video_channel, bool enable) = 0;
|
||||
|
||||
// Enables transmission smoothening, i.e. packets belonging to the same frame
|
||||
// will be sent over a longer period of time instead of sending them
|
||||
|
@ -121,37 +121,6 @@ int ViEBaseImpl::SetCpuOveruseOptions(int video_channel,
|
||||
return -1;
|
||||
}
|
||||
|
||||
int ViEBaseImpl::CpuOveruseMeasures(int video_channel,
|
||||
int* capture_jitter_ms,
|
||||
int* avg_encode_time_ms,
|
||||
int* encode_usage_percent,
|
||||
int* capture_queue_delay_ms_per_s) {
|
||||
ViEChannelManagerScoped cs(*(shared_data_.channel_manager()));
|
||||
ViEChannel* vie_channel = cs.Channel(video_channel);
|
||||
if (!vie_channel) {
|
||||
shared_data_.SetLastError(kViEBaseInvalidChannelId);
|
||||
return -1;
|
||||
}
|
||||
ViEEncoder* vie_encoder = cs.Encoder(video_channel);
|
||||
assert(vie_encoder);
|
||||
|
||||
ViEInputManagerScoped is(*(shared_data_.input_manager()));
|
||||
ViEFrameProviderBase* provider = is.FrameProvider(vie_encoder);
|
||||
if (provider) {
|
||||
ViECapturer* capturer = is.Capture(provider->Id());
|
||||
if (capturer) {
|
||||
CpuOveruseMetrics metrics;
|
||||
capturer->GetCpuOveruseMetrics(&metrics);
|
||||
*capture_jitter_ms = metrics.capture_jitter_ms;
|
||||
*avg_encode_time_ms = metrics.avg_encode_time_ms;
|
||||
*encode_usage_percent = metrics.encode_usage_percent;
|
||||
*capture_queue_delay_ms_per_s = metrics.capture_queue_delay_ms_per_s;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int ViEBaseImpl::GetCpuOveruseMetrics(int video_channel,
|
||||
CpuOveruseMetrics* metrics) {
|
||||
ViEChannelManagerScoped cs(*(shared_data_.channel_manager()));
|
||||
|
@ -37,11 +37,6 @@ class ViEBaseImpl
|
||||
const CpuOveruseOptions& options);
|
||||
virtual int GetCpuOveruseMetrics(int channel,
|
||||
CpuOveruseMetrics* metrics);
|
||||
virtual int CpuOveruseMeasures(int channel,
|
||||
int* capture_jitter_ms,
|
||||
int* avg_encode_time_ms,
|
||||
int* encode_usage_percent,
|
||||
int* capture_queue_delay_ms_per_s);
|
||||
virtual int CreateChannel(int& video_channel); // NOLINT
|
||||
virtual int CreateChannel(int& video_channel, // NOLINT
|
||||
const Config* config);
|
||||
|
Loading…
Reference in New Issue
Block a user