Index: chromecast/media/cma/pipeline/media_pipeline_impl.cc |
diff --git a/chromecast/media/cma/pipeline/media_pipeline_impl.cc b/chromecast/media/cma/pipeline/media_pipeline_impl.cc |
index 14ced50a4d383c37ea7f16eac46266c695ab54b9..c68bffc4c28078aabd97f488be4759f54f9e6589 100644 |
--- a/chromecast/media/cma/pipeline/media_pipeline_impl.cc |
+++ b/chromecast/media/cma/pipeline/media_pipeline_impl.cc |
@@ -32,19 +32,25 @@ namespace media { |
namespace { |
// Buffering parameters when load_type is kLoadTypeUrl. |
-const base::TimeDelta kLowBufferThresholdURL( |
+constexpr base::TimeDelta kLowBufferThresholdURL( |
base::TimeDelta::FromMilliseconds(2000)); |
-const base::TimeDelta kHighBufferThresholdURL( |
+constexpr base::TimeDelta kHighBufferThresholdURL( |
base::TimeDelta::FromMilliseconds(6000)); |
// Buffering parameters when load_type is kLoadTypeMediaSource. |
-const base::TimeDelta kLowBufferThresholdMediaSource( |
+constexpr base::TimeDelta kLowBufferThresholdMediaSource( |
base::TimeDelta::FromMilliseconds(0)); |
const base::TimeDelta kHighBufferThresholdMediaSource( |
kmackay
2017/02/24 18:03:55
constexpr here too
bshaya
2017/02/27 17:00:15
Done.
|
base::TimeDelta::FromMilliseconds(300)); |
+// Buffering parameters when load_type is kLoadTypeCommunication. |
+constexpr base::TimeDelta kLowBufferThresholdCommunication( |
+ base::TimeDelta::FromMilliseconds(0)); |
+constexpr base::TimeDelta kHighBufferThresholdCommunication( |
+ base::TimeDelta::FromMilliseconds(20)); |
+ |
// Interval between two updates of the media time. |
-const base::TimeDelta kTimeUpdateInterval( |
+constexpr base::TimeDelta kTimeUpdateInterval( |
base::TimeDelta::FromMilliseconds(250)); |
// Interval between two updates of the statistics is equal to: |
@@ -123,6 +129,9 @@ void MediaPipelineImpl::Initialize( |
if (load_type == kLoadTypeMediaSource) { |
low_threshold = kLowBufferThresholdMediaSource; |
high_threshold = kHighBufferThresholdMediaSource; |
+ } else if (load_type == kLoadTypeCommunication) { |
+ low_threshold = kLowBufferThresholdCommunication; |
+ high_threshold = kHighBufferThresholdCommunication; |
} |
scoped_refptr<BufferingConfig> buffering_config( |
new BufferingConfig(low_threshold, high_threshold)); |