summaryrefslogtreecommitdiffstats
path: root/media/cast/receiver
diff options
context:
space:
mode:
authormiu <miu@chromium.org>2015-11-30 19:21:57 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-01 03:22:59 +0000
commitfa74f9ec45ee08266fee12c7f7f0146894b1a2f4 (patch)
tree72245291dcb0db4f812944a8a761232c3ccd087e /media/cast/receiver
parent893532781d65e749d083909953eb7693d6cb958a (diff)
downloadchromium_src-fa74f9ec45ee08266fee12c7f7f0146894b1a2f4.zip
chromium_src-fa74f9ec45ee08266fee12c7f7f0146894b1a2f4.tar.gz
chromium_src-fa74f9ec45ee08266fee12c7f7f0146894b1a2f4.tar.bz2
Cast Housekeeping: Unwind the cast_defines.h dumping-ground.
Historically, lots of code was dumped into media/cast/cast_defines.h, and then the header included in every file. This caused difficulty in code management, increased build times, etc. This change moves nearly everything out of cast_defines.h and places it close to where it's used. At the same time, minor changes have been made on touched LOC to help further other Cast Housekeeping efforts. Soon-upcoming changes will eliminate all the remaining code in cast_defines.h and perform similar surgery/obliteration of the other "*defines.h" dumping-ground header files in media/cast. Stay tuned. BUG=530839 Review URL: https://codereview.chromium.org/1469353009 Cr-Commit-Position: refs/heads/master@{#362330}
Diffstat (limited to 'media/cast/receiver')
-rw-r--r--media/cast/receiver/audio_decoder.cc1
-rw-r--r--media/cast/receiver/audio_decoder.h8
-rw-r--r--media/cast/receiver/cast_receiver_impl.h1
-rw-r--r--media/cast/receiver/frame_receiver.cc5
-rw-r--r--media/cast/receiver/frame_receiver.h1
-rw-r--r--media/cast/receiver/frame_receiver_unittest.cc2
-rw-r--r--media/cast/receiver/video_decoder.cc1
-rw-r--r--media/cast/receiver/video_decoder.h8
8 files changed, 13 insertions, 14 deletions
diff --git a/media/cast/receiver/audio_decoder.cc b/media/cast/receiver/audio_decoder.cc
index 929deb5..1956ace 100644
--- a/media/cast/receiver/audio_decoder.cc
+++ b/media/cast/receiver/audio_decoder.cc
@@ -9,7 +9,6 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/sys_byteorder.h"
-#include "media/cast/cast_defines.h"
#include "third_party/opus/src/include/opus.h"
namespace media {
diff --git a/media/cast/receiver/audio_decoder.h b/media/cast/receiver/audio_decoder.h
index a68b6fb..d437069 100644
--- a/media/cast/receiver/audio_decoder.h
+++ b/media/cast/receiver/audio_decoder.h
@@ -8,8 +8,8 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "media/base/audio_bus.h"
-#include "media/cast/cast_config.h"
#include "media/cast/cast_environment.h"
+#include "media/cast/constants.h"
#include "media/cast/net/cast_transport_config.h"
namespace media {
@@ -32,9 +32,9 @@ class AudioDecoder {
Codec codec);
virtual ~AudioDecoder();
- // Returns STATUS_INITIALIZED if the decoder was successfully constructed from
- // the given FrameReceiverConfig. If this method returns any other value,
- // calls to DecodeFrame() will not succeed.
+ // Returns STATUS_INITIALIZED if the decoder was successfully constructed. If
+ // this method returns any other value, calls to DecodeFrame() will not
+ // succeed.
OperationalStatus InitializationResult() const;
// Decode the payload in |encoded_frame| asynchronously. |callback| will be
diff --git a/media/cast/receiver/cast_receiver_impl.h b/media/cast/receiver/cast_receiver_impl.h
index 6cd6ba3..6a6592a 100644
--- a/media/cast/receiver/cast_receiver_impl.h
+++ b/media/cast/receiver/cast_receiver_impl.h
@@ -7,7 +7,6 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "media/cast/cast_config.h"
#include "media/cast/cast_environment.h"
#include "media/cast/cast_receiver.h"
#include "media/cast/net/pacing/paced_sender.h"
diff --git a/media/cast/receiver/frame_receiver.cc b/media/cast/receiver/frame_receiver.cc
index 3d89594..b9d5a6e 100644
--- a/media/cast/receiver/frame_receiver.cc
+++ b/media/cast/receiver/frame_receiver.cc
@@ -10,7 +10,10 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
+#include "media/cast/cast_config.h"
+#include "media/cast/cast_defines.h"
#include "media/cast/cast_environment.h"
+#include "media/cast/constants.h"
namespace {
const int kMinSchedulingDelayMs = 1;
@@ -336,7 +339,7 @@ void FrameReceiver::ScheduleNextRtcpReport() {
CastEnvironment::MAIN, FROM_HERE,
base::Bind(&FrameReceiver::SendNextRtcpReport,
weak_factory_.GetWeakPtr()),
- base::TimeDelta::FromMilliseconds(kDefaultRtcpIntervalMs));
+ base::TimeDelta::FromMilliseconds(kRtcpReportIntervalMs));
}
void FrameReceiver::SendNextRtcpReport() {
diff --git a/media/cast/receiver/frame_receiver.h b/media/cast/receiver/frame_receiver.h
index 96f29f4..ec3175f 100644
--- a/media/cast/receiver/frame_receiver.h
+++ b/media/cast/receiver/frame_receiver.h
@@ -11,7 +11,6 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
-#include "media/cast/cast_config.h"
#include "media/cast/cast_receiver.h"
#include "media/cast/common/clock_drift_smoother.h"
#include "media/cast/common/transport_encryption_handler.h"
diff --git a/media/cast/receiver/frame_receiver_unittest.cc b/media/cast/receiver/frame_receiver_unittest.cc
index 79a6ef2..6e6a3915 100644
--- a/media/cast/receiver/frame_receiver_unittest.cc
+++ b/media/cast/receiver/frame_receiver_unittest.cc
@@ -9,11 +9,11 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/test/simple_test_tick_clock.h"
-#include "media/cast/cast_defines.h"
#include "media/cast/cast_environment.h"
#include "media/cast/logging/simple_event_subscriber.h"
#include "media/cast/net/cast_transport_sender_impl.h"
#include "media/cast/net/mock_cast_transport_sender.h"
+#include "media/cast/net/rtcp/rtcp_utility.h"
#include "media/cast/net/rtcp/test_rtcp_packet_builder.h"
#include "media/cast/receiver/frame_receiver.h"
#include "media/cast/test/fake_single_thread_task_runner.h"
diff --git a/media/cast/receiver/video_decoder.cc b/media/cast/receiver/video_decoder.cc
index dca038c..e942380 100644
--- a/media/cast/receiver/video_decoder.cc
+++ b/media/cast/receiver/video_decoder.cc
@@ -12,7 +12,6 @@
#include "base/values.h"
#include "media/base/video_frame_pool.h"
#include "media/base/video_util.h"
-#include "media/cast/cast_defines.h"
#include "media/cast/cast_environment.h"
// VPX_CODEC_DISABLE_COMPAT excludes parts of the libvpx API that provide
// backwards compatibility for legacy applications using the library.
diff --git a/media/cast/receiver/video_decoder.h b/media/cast/receiver/video_decoder.h
index 2b6c859..97dfa2a 100644
--- a/media/cast/receiver/video_decoder.h
+++ b/media/cast/receiver/video_decoder.h
@@ -9,7 +9,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "media/base/video_frame.h"
-#include "media/cast/cast_config.h"
+#include "media/cast/constants.h"
#include "media/cast/net/cast_transport_config.h"
namespace media {
@@ -31,9 +31,9 @@ class VideoDecoder {
Codec codec);
virtual ~VideoDecoder();
- // Returns STATUS_INITIALIZED if the decoder was successfully constructed from
- // the given FrameReceiverConfig. If this method returns any other value,
- // calls to DecodeFrame() will not succeed.
+ // Returns STATUS_INITIALIZED if the decoder was successfully constructed. If
+ // this method returns any other value, calls to DecodeFrame() will not
+ // succeed.
OperationalStatus InitializationResult() const;
// Decode the payload in |encoded_frame| asynchronously. |callback| will be