diff options
author | hubbe <hubbe@chromium.org> | 2015-04-29 16:25:49 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-29 23:26:28 +0000 |
commit | d9acbbebb5b391d6d190f9e2a1629f48f0fe11a0 (patch) | |
tree | e12c15d9d94f8099ce2b5a172fafcf36b0ce5e6b /media/cast/receiver | |
parent | c73fce65a5963c8013e8a0a2b0251ba7c02bfccc (diff) | |
download | chromium_src-d9acbbebb5b391d6d190f9e2a1629f48f0fe11a0.zip chromium_src-d9acbbebb5b391d6d190f9e2a1629f48f0fe11a0.tar.gz chromium_src-d9acbbebb5b391d6d190f9e2a1629f48f0fe11a0.tar.bz2 |
Cast: Change override to final wherever possible.
Should provide a modest speedup.
Review URL: https://codereview.chromium.org/1112803005
Cr-Commit-Position: refs/heads/master@{#327612}
Diffstat (limited to 'media/cast/receiver')
-rw-r--r-- | media/cast/receiver/audio_decoder.cc | 10 | ||||
-rw-r--r-- | media/cast/receiver/audio_decoder_unittest.cc | 2 | ||||
-rw-r--r-- | media/cast/receiver/cast_receiver_impl.h | 12 | ||||
-rw-r--r-- | media/cast/receiver/frame_receiver.h | 4 | ||||
-rw-r--r-- | media/cast/receiver/frame_receiver_unittest.cc | 2 | ||||
-rw-r--r-- | media/cast/receiver/video_decoder.cc | 8 | ||||
-rw-r--r-- | media/cast/receiver/video_decoder_unittest.cc | 2 |
7 files changed, 20 insertions, 20 deletions
diff --git a/media/cast/receiver/audio_decoder.cc b/media/cast/receiver/audio_decoder.cc index bc5b596..147abcf 100644 --- a/media/cast/receiver/audio_decoder.cc +++ b/media/cast/receiver/audio_decoder.cc @@ -115,9 +115,9 @@ class AudioDecoder::OpusImpl : public AudioDecoder::ImplBase { } private: - ~OpusImpl() override {} + ~OpusImpl() final {} - void RecoverBecauseFramesWereDropped() override { + void RecoverBecauseFramesWereDropped() final { // Passing NULL for the input data notifies the decoder of frame loss. const opus_int32 result = opus_decode_float( @@ -125,7 +125,7 @@ class AudioDecoder::OpusImpl : public AudioDecoder::ImplBase { DCHECK_GE(result, 0); } - scoped_ptr<AudioBus> Decode(uint8* data, int len) override { + scoped_ptr<AudioBus> Decode(uint8* data, int len) final { scoped_ptr<AudioBus> audio_bus; const opus_int32 num_samples_decoded = opus_decode_float( opus_decoder_, data, len, buffer_.get(), max_samples_per_frame_, 0); @@ -174,9 +174,9 @@ class AudioDecoder::Pcm16Impl : public AudioDecoder::ImplBase { } private: - ~Pcm16Impl() override {} + ~Pcm16Impl() final {} - scoped_ptr<AudioBus> Decode(uint8* data, int len) override { + scoped_ptr<AudioBus> Decode(uint8* data, int len) final { scoped_ptr<AudioBus> audio_bus; const int num_samples = len / sizeof(int16) / num_channels_; if (num_samples <= 0) diff --git a/media/cast/receiver/audio_decoder_unittest.cc b/media/cast/receiver/audio_decoder_unittest.cc index 6cd4f4e..5059ebc 100644 --- a/media/cast/receiver/audio_decoder_unittest.cc +++ b/media/cast/receiver/audio_decoder_unittest.cc @@ -41,7 +41,7 @@ class AudioDecoderTest : public ::testing::TestWithParam<TestScenario> { } protected: - void SetUp() override { + void SetUp() final { audio_decoder_.reset(new AudioDecoder(cast_environment_, GetParam().num_channels, GetParam().sampling_rate, diff --git a/media/cast/receiver/cast_receiver_impl.h b/media/cast/receiver/cast_receiver_impl.h index bc1bf67..6cd6ba3 100644 --- a/media/cast/receiver/cast_receiver_impl.h +++ b/media/cast/receiver/cast_receiver_impl.h @@ -29,18 +29,18 @@ class CastReceiverImpl : public CastReceiver { const FrameReceiverConfig& video_config, CastTransportSender* const transport); - ~CastReceiverImpl() override; + ~CastReceiverImpl() final; // CastReceiver implementation. - void ReceivePacket(scoped_ptr<Packet> packet) override; + void ReceivePacket(scoped_ptr<Packet> packet) final; void RequestDecodedAudioFrame( - const AudioFrameDecodedCallback& callback) override; + const AudioFrameDecodedCallback& callback) final; void RequestEncodedAudioFrame( - const ReceiveEncodedFrameCallback& callback) override; + const ReceiveEncodedFrameCallback& callback) final; void RequestDecodedVideoFrame( - const VideoFrameDecodedCallback& callback) override; + const VideoFrameDecodedCallback& callback) final; void RequestEncodedVideoFrame( - const ReceiveEncodedFrameCallback& callback) override; + const ReceiveEncodedFrameCallback& callback) final; private: // Feeds an EncodedFrame into |audio_decoder_|. RequestDecodedAudioFrame() diff --git a/media/cast/receiver/frame_receiver.h b/media/cast/receiver/frame_receiver.h index 2ff8f0f..f4037dd 100644 --- a/media/cast/receiver/frame_receiver.h +++ b/media/cast/receiver/frame_receiver.h @@ -52,7 +52,7 @@ class FrameReceiver : public RtpPayloadFeedback, EventMediaType event_media_type, CastTransportSender* const transport); - ~FrameReceiver() override; + ~FrameReceiver() final; // Request an encoded frame. // @@ -72,7 +72,7 @@ class FrameReceiver : public RtpPayloadFeedback, size_t payload_size); // RtpPayloadFeedback implementation. - void CastFeedback(const RtcpCastMessage& cast_message) override; + void CastFeedback(const RtcpCastMessage& cast_message) final; private: // Processes ready-to-consume packets from |framer_|, decrypting each packet's diff --git a/media/cast/receiver/frame_receiver_unittest.cc b/media/cast/receiver/frame_receiver_unittest.cc index cce59f9..f50ce93 100644 --- a/media/cast/receiver/frame_receiver_unittest.cc +++ b/media/cast/receiver/frame_receiver_unittest.cc @@ -80,7 +80,7 @@ class FrameReceiverTest : public ::testing::Test { ~FrameReceiverTest() override {} - void SetUp() override { + void SetUp() final { payload_.assign(kPacketSize, 0); // Always start with a key frame. diff --git a/media/cast/receiver/video_decoder.cc b/media/cast/receiver/video_decoder.cc index a30394c..b2a2e3e 100644 --- a/media/cast/receiver/video_decoder.cc +++ b/media/cast/receiver/video_decoder.cc @@ -113,12 +113,12 @@ class VideoDecoder::Vp8Impl : public VideoDecoder::ImplBase { } private: - ~Vp8Impl() override { + ~Vp8Impl() final { if (ImplBase::operational_status_ == STATUS_INITIALIZED) CHECK_EQ(VPX_CODEC_OK, vpx_codec_destroy(&context_)); } - scoped_refptr<VideoFrame> Decode(uint8* data, int len) override { + scoped_refptr<VideoFrame> Decode(uint8* data, int len) final { if (len <= 0 || vpx_codec_decode(&context_, data, static_cast<unsigned int>(len), @@ -180,9 +180,9 @@ class VideoDecoder::FakeImpl : public VideoDecoder::ImplBase { } private: - ~FakeImpl() override {} + ~FakeImpl() final {} - scoped_refptr<VideoFrame> Decode(uint8* data, int len) override { + scoped_refptr<VideoFrame> Decode(uint8* data, int len) final { // Make sure this is a JSON string. if (!len || data[0] != '{') return NULL; diff --git a/media/cast/receiver/video_decoder_unittest.cc b/media/cast/receiver/video_decoder_unittest.cc index a51ea1d..29a5b51 100644 --- a/media/cast/receiver/video_decoder_unittest.cc +++ b/media/cast/receiver/video_decoder_unittest.cc @@ -50,7 +50,7 @@ class VideoDecoderTest : public ::testing::TestWithParam<Codec> { } protected: - void SetUp() override { + void SetUp() final { video_decoder_.reset(new VideoDecoder(cast_environment_, GetParam())); CHECK_EQ(STATUS_INITIALIZED, video_decoder_->InitializationResult()); |