Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: chrome/renderer/media/cast_rtp_stream.cc

Issue 1337243003: Extracted hardcoded constants from cast_rtp_stream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/cast/cast_defines.h » ('j') | media/cast/cast_defines.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | media/cast/cast_defines.h » ('j') | media/cast/cast_defines.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698