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

Unified Diff: media/cast/cast_config.cc

Issue 225023010: [Cast] Refactor/clean-up VideoReceiver to match AudioReceiver as closely as possible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 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 | « media/cast/cast.gyp ('k') | media/cast/cast_defines.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/cast_config.cc
diff --git a/media/cast/cast_config.cc b/media/cast/cast_config.cc
index 7e89e1dfa40fdde65dbf8a7f7345774653caa50f..d392ca7c73a1c20a18ccff4cfb5c79db26111023 100644
--- a/media/cast/cast_config.cc
+++ b/media/cast/cast_config.cc
@@ -7,6 +7,20 @@
namespace media {
namespace cast {
+// TODO(miu): Revisit code factoring of these structs. There are a number of
+// common elements between them all, so it might be reasonable to only have one
+// or two structs; or, at least a common base class.
+
+// TODO(miu): Make sure all POD members are initialized by ctors. Policy
+// decision: Reasonable defaults or use invalid placeholder values to expose
+// unset members?
+
+// TODO(miu): Provide IsValidConfig() functions?
+
+// TODO(miu): Throughout the code, there is a lot of copy-and-paste of the same
+// calculations based on these config values. So, why don't we add methods to
+// these classes to centralize the logic?
+
VideoSenderConfig::VideoSenderConfig()
: sender_ssrc(0),
incoming_feedback_ssrc(0),
@@ -16,10 +30,15 @@ VideoSenderConfig::VideoSenderConfig()
width(0),
height(0),
congestion_control_back_off(kDefaultCongestionControlBackOff),
+ max_bitrate(5000000),
+ min_bitrate(1000000),
+ start_bitrate(5000000),
max_qp(kDefaultMaxQp),
min_qp(kDefaultMinQp),
max_frame_rate(kDefaultMaxFrameRate),
- max_number_of_video_buffers_used(kDefaultNumberOfVideoBuffers) {}
+ max_number_of_video_buffers_used(kDefaultNumberOfVideoBuffers),
+ codec(transport::kVp8),
+ number_of_cores(0) {}
AudioSenderConfig::AudioSenderConfig()
: sender_ssrc(0),
@@ -51,7 +70,8 @@ VideoReceiverConfig::VideoReceiverConfig()
rtp_payload_type(0),
use_external_decoder(false),
max_frame_rate(kDefaultMaxFrameRate),
- decoder_faster_than_max_frame_rate(true) {}
+ decoder_faster_than_max_frame_rate(true),
+ codec(transport::kVp8) {}
} // namespace cast
} // namespace media
« no previous file with comments | « media/cast/cast.gyp ('k') | media/cast/cast_defines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698