Index: chrome/renderer/media/cast_rtp_stream.cc |
diff --git a/chrome/renderer/media/cast_rtp_stream.cc b/chrome/renderer/media/cast_rtp_stream.cc |
index 1b9d2da7b055d32dfe99a87b7fd11399fa83e1c7..042d0fb943a659e077ac88d93ec0f1e1919e316c 100644 |
--- a/chrome/renderer/media/cast_rtp_stream.cc |
+++ b/chrome/renderer/media/cast_rtp_stream.cc |
@@ -26,6 +26,7 @@ |
#include "media/base/audio_converter.h" |
#include "media/base/audio_fifo.h" |
#include "media/base/bind_to_current_loop.h" |
+#include "media/base/limits.h" |
#include "media/base/video_frame.h" |
#include "media/cast/cast_config.h" |
#include "media/cast/cast_defines.h" |
@@ -181,7 +182,7 @@ bool ToAudioSenderConfig(const CastRtpParams& params, |
config->rtp_payload_type = params.payload.payload_type; |
config->use_external_encoder = false; |
config->frequency = params.payload.clock_rate; |
- if (config->frequency < 8000) |
+ if (config->frequency < media::cast::kMinSampleRateForEncoding) |
mcasas
2015/09/15 16:59:39
If |kMinSampleRateForEncoding| is only used in thi
miu
2015/09/15 22:05:22
I disagree with this one. IMO, the constant belon
|
return false; |
config->channels = params.payload.channels; |
if (config->channels < 1) |
@@ -222,7 +223,7 @@ bool ToVideoSenderConfig(const CastRtpParams& params, |
config->start_bitrate = config->min_bitrate; |
config->max_frame_rate = static_cast<int>( |
std::max(1.0, params.payload.max_frame_rate) + 0.5); |
- if (config->max_frame_rate > 120) |
+ if (config->max_frame_rate > media::limits::kMaxFramesPerSecond) |
return false; |
if (params.payload.codec_name == kCodecNameVp8) { |
config->use_external_encoder = IsHardwareVP8EncodingSupported(); |