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() {}
|
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 {
|
struct CpuOveruseOptions {
|
||||||
CpuOveruseOptions()
|
CpuOveruseOptions()
|
||||||
: enable_capture_jitter_method(true),
|
: enable_capture_jitter_method(true),
|
||||||
low_capture_jitter_threshold_ms(kNormalUseStdDevMs),
|
low_capture_jitter_threshold_ms(20.0f),
|
||||||
high_capture_jitter_threshold_ms(kOveruseStdDevMs),
|
high_capture_jitter_threshold_ms(30.0f),
|
||||||
enable_encode_usage_method(false),
|
enable_encode_usage_method(false),
|
||||||
low_encode_usage_threshold_percent(60),
|
low_encode_usage_threshold_percent(60),
|
||||||
high_encode_usage_threshold_percent(90),
|
high_encode_usage_threshold_percent(90),
|
||||||
@ -216,26 +198,11 @@ class WEBRTC_DLLEXPORT ViEBase {
|
|||||||
CpuOveruseObserver* observer) = 0;
|
CpuOveruseObserver* observer) = 0;
|
||||||
|
|
||||||
// Sets options for cpu overuse detector.
|
// Sets options for cpu overuse detector.
|
||||||
// TODO(asapersson): Remove default implementation.
|
|
||||||
virtual int SetCpuOveruseOptions(int channel,
|
virtual int SetCpuOveruseOptions(int channel,
|
||||||
const CpuOveruseOptions& options) {
|
const CpuOveruseOptions& options) = 0;
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Gets cpu overuse measures.
|
// Gets cpu overuse measures.
|
||||||
// TODO(asapersson): Remove default implementation.
|
virtual int GetCpuOveruseMetrics(int channel, CpuOveruseMetrics* metrics) = 0;
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Specifies the VoiceEngine and VideoEngine channel pair to use for
|
// Specifies the VoiceEngine and VideoEngine channel pair to use for
|
||||||
// audio/video synchronization.
|
// audio/video synchronization.
|
||||||
|
@ -261,8 +261,7 @@ class WEBRTC_DLLEXPORT ViERTP_RTCP {
|
|||||||
|
|
||||||
// Enables/disables RTCP Receiver Reference Time Report Block extension/
|
// Enables/disables RTCP Receiver Reference Time Report Block extension/
|
||||||
// DLRR Report Block extension (RFC 3611).
|
// DLRR Report Block extension (RFC 3611).
|
||||||
// TODO(asapersson): Remove default implementation.
|
virtual int SetRtcpXrRrtrStatus(int video_channel, bool enable) = 0;
|
||||||
virtual int SetRtcpXrRrtrStatus(int video_channel, bool enable) { return -1; }
|
|
||||||
|
|
||||||
// Enables transmission smoothening, i.e. packets belonging to the same frame
|
// Enables transmission smoothening, i.e. packets belonging to the same frame
|
||||||
// will be sent over a longer period of time instead of sending them
|
// 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;
|
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,
|
int ViEBaseImpl::GetCpuOveruseMetrics(int video_channel,
|
||||||
CpuOveruseMetrics* metrics) {
|
CpuOveruseMetrics* metrics) {
|
||||||
ViEChannelManagerScoped cs(*(shared_data_.channel_manager()));
|
ViEChannelManagerScoped cs(*(shared_data_.channel_manager()));
|
||||||
|
@ -37,11 +37,6 @@ class ViEBaseImpl
|
|||||||
const CpuOveruseOptions& options);
|
const CpuOveruseOptions& options);
|
||||||
virtual int GetCpuOveruseMetrics(int channel,
|
virtual int GetCpuOveruseMetrics(int channel,
|
||||||
CpuOveruseMetrics* metrics);
|
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
|
||||||
virtual int CreateChannel(int& video_channel, // NOLINT
|
virtual int CreateChannel(int& video_channel, // NOLINT
|
||||||
const Config* config);
|
const Config* config);
|
||||||
|
Loading…
Reference in New Issue
Block a user