summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2015-04-29 12:28:27 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-29 19:28:54 +0000
commitfc58da521f25f9aeeeb9a59e89a9ce87dc78143f (patch)
tree345e3b456c66943e2340a34b12cea84744053b6f /media
parentbcd27760a955350e271093ef5a85883c27304c5c (diff)
downloadchromium_src-fc58da521f25f9aeeeb9a59e89a9ce87dc78143f.zip
chromium_src-fc58da521f25f9aeeeb9a59e89a9ce87dc78143f.tar.gz
chromium_src-fc58da521f25f9aeeeb9a59e89a9ce87dc78143f.tar.bz2
Apply automated fixits for Chrome clang plugin to media.
Working on trimming down plugin warnings on the Windows clang build. BUG=467287 TBR=dalecurtis@chromium.org Review URL: https://codereview.chromium.org/1118573002 Cr-Commit-Position: refs/heads/master@{#327545}
Diffstat (limited to 'media')
-rw-r--r--media/audio/win/audio_low_latency_input_win_unittest.cc12
-rw-r--r--media/audio/win/audio_low_latency_output_win_unittest.cc7
-rw-r--r--media/audio/win/audio_output_win_unittest.cc18
-rw-r--r--media/audio/win/core_audio_util_win_unittest.cc2
4 files changed, 16 insertions, 23 deletions
diff --git a/media/audio/win/audio_low_latency_input_win_unittest.cc b/media/audio/win/audio_low_latency_input_win_unittest.cc
index e2e7a03..976c462 100644
--- a/media/audio/win/audio_low_latency_input_win_unittest.cc
+++ b/media/audio/win/audio_low_latency_input_win_unittest.cc
@@ -104,7 +104,7 @@ class WriteToFileAudioSink : public AudioInputStream::AudioInputCallback {
VLOG(0) << "bits_per_sample_:" << bits_per_sample_;
}
- virtual ~WriteToFileAudioSink() {
+ ~WriteToFileAudioSink() override {
size_t bytes_written = 0;
while (bytes_written < bytes_to_write_) {
const uint8* chunk;
@@ -123,10 +123,10 @@ class WriteToFileAudioSink : public AudioInputStream::AudioInputCallback {
}
// AudioInputStream::AudioInputCallback implementation.
- virtual void OnData(AudioInputStream* stream,
- const AudioBus* src,
- uint32 hardware_delay_bytes,
- double volume) {
+ void OnData(AudioInputStream* stream,
+ const AudioBus* src,
+ uint32 hardware_delay_bytes,
+ double volume) override {
EXPECT_EQ(bits_per_sample_, 16);
const int num_samples = src->frames() * src->channels();
scoped_ptr<int16> interleaved(new int16[num_samples]);
@@ -142,7 +142,7 @@ class WriteToFileAudioSink : public AudioInputStream::AudioInputCallback {
}
}
- virtual void OnError(AudioInputStream* stream) {}
+ void OnError(AudioInputStream* stream) override {}
private:
int bits_per_sample_;
diff --git a/media/audio/win/audio_low_latency_output_win_unittest.cc b/media/audio/win/audio_low_latency_output_win_unittest.cc
index afd565a..9482f61 100644
--- a/media/audio/win/audio_low_latency_output_win_unittest.cc
+++ b/media/audio/win/audio_low_latency_output_win_unittest.cc
@@ -81,7 +81,7 @@ class ReadFromFileAudioSource : public AudioOutputStream::AudioSourceCallback {
delta_times_.reset(new int[kMaxDeltaSamples]);
}
- virtual ~ReadFromFileAudioSource() {
+ ~ReadFromFileAudioSource() override {
// Get complete file path to output file in directory containing
// media_unittests.exe.
base::FilePath file_name;
@@ -103,8 +103,7 @@ class ReadFromFileAudioSource : public AudioOutputStream::AudioSourceCallback {
}
// AudioOutputStream::AudioSourceCallback implementation.
- virtual int OnMoreData(AudioBus* audio_bus,
- uint32 total_bytes_delay) {
+ int OnMoreData(AudioBus* audio_bus, uint32 total_bytes_delay) override {
// Store time difference between two successive callbacks in an array.
// These values will be written to a file in the destructor.
const base::TimeTicks now_time = base::TimeTicks::Now();
@@ -131,7 +130,7 @@ class ReadFromFileAudioSource : public AudioOutputStream::AudioSourceCallback {
return frames;
}
- virtual void OnError(AudioOutputStream* stream) {}
+ void OnError(AudioOutputStream* stream) override {}
int file_size() { return file_->data_size(); }
diff --git a/media/audio/win/audio_output_win_unittest.cc b/media/audio/win/audio_output_win_unittest.cc
index 93454fc..973df61 100644
--- a/media/audio/win/audio_output_win_unittest.cc
+++ b/media/audio/win/audio_output_win_unittest.cc
@@ -51,17 +51,14 @@ class TestSourceBasic : public AudioOutputStream::AudioSourceCallback {
had_error_(0) {
}
// AudioSourceCallback::OnMoreData implementation:
- virtual int OnMoreData(AudioBus* audio_bus,
- uint32 total_bytes_delay) {
+ int OnMoreData(AudioBus* audio_bus, uint32 total_bytes_delay) override {
++callback_count_;
// Touch the channel memory value to make sure memory is good.
audio_bus->Zero();
return audio_bus->frames();
}
// AudioSourceCallback::OnError implementation:
- virtual void OnError(AudioOutputStream* stream) {
- ++had_error_;
- }
+ void OnError(AudioOutputStream* stream) override { ++had_error_; }
// Returns how many times OnMoreData() has been called.
int callback_count() const {
return callback_count_;
@@ -88,8 +85,7 @@ class TestSourceLaggy : public TestSourceBasic {
TestSourceLaggy(int laggy_after_buffer, int lag_in_ms)
: laggy_after_buffer_(laggy_after_buffer), lag_in_ms_(lag_in_ms) {
}
- virtual int OnMoreData(AudioBus* audio_bus,
- uint32 total_bytes_delay) {
+ int OnMoreData(AudioBus* audio_bus, uint32 total_bytes_delay) override {
// Call the base, which increments the callback_count_.
TestSourceBasic::OnMoreData(audio_bus, total_bytes_delay);
if (callback_count() > kMaxNumBuffers) {
@@ -524,11 +520,10 @@ class SyncSocketSource : public AudioOutputStream::AudioSourceCallback {
base::AlignedAlloc(data_size_, AudioBus::kChannelAlignment)));
audio_bus_ = AudioBus::WrapMemory(params, data_.get());
}
- ~SyncSocketSource() {}
+ ~SyncSocketSource() override {}
// AudioSourceCallback::OnMoreData implementation:
- virtual int OnMoreData(AudioBus* audio_bus,
- uint32 total_bytes_delay) {
+ int OnMoreData(AudioBus* audio_bus, uint32 total_bytes_delay) override {
socket_->Send(&total_bytes_delay, sizeof(total_bytes_delay));
uint32 size = socket_->Receive(data_.get(), data_size_);
DCHECK_EQ(static_cast<size_t>(size) % sizeof(*audio_bus_->channel(0)), 0U);
@@ -537,8 +532,7 @@ class SyncSocketSource : public AudioOutputStream::AudioSourceCallback {
}
// AudioSourceCallback::OnError implementation:
- virtual void OnError(AudioOutputStream* stream) {
- }
+ void OnError(AudioOutputStream* stream) override {}
private:
base::SyncSocket* socket_;
diff --git a/media/audio/win/core_audio_util_win_unittest.cc b/media/audio/win/core_audio_util_win_unittest.cc
index 31f91e9..d3dc85e 100644
--- a/media/audio/win/core_audio_util_win_unittest.cc
+++ b/media/audio/win/core_audio_util_win_unittest.cc
@@ -26,7 +26,7 @@ class CoreAudioUtilWinTest : public ::testing::Test {
: com_init_(ScopedCOMInitializer::kMTA) {
DCHECK(com_init_.succeeded());
}
- virtual ~CoreAudioUtilWinTest() {}
+ ~CoreAudioUtilWinTest() override {}
bool DevicesAvailable() {
if (!CoreAudioUtil::IsSupported())