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

Side by Side Diff: content/renderer/media/webrtc/webrtc_audio_sink_adapter.h

Issue 670683003: Standardize usage of virtual/override/final in content/renderer/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_AUDIO_SINK_ADAPTER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_AUDIO_SINK_ADAPTER_H_
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_AUDIO_SINK_ADAPTER_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_AUDIO_SINK_ADAPTER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/public/renderer/media_stream_audio_sink.h" 9 #include "content/public/renderer/media_stream_audio_sink.h"
10 10
11 namespace webrtc { 11 namespace webrtc {
12 class AudioTrackSinkInterface; 12 class AudioTrackSinkInterface;
13 } // namespace webrtc 13 } // namespace webrtc
14 14
15 namespace content { 15 namespace content {
16 16
17 // Adapter to the webrtc::AudioTrackSinkInterface of the audio track. 17 // Adapter to the webrtc::AudioTrackSinkInterface of the audio track.
18 // This class is used in between the MediaStreamAudioSink and 18 // This class is used in between the MediaStreamAudioSink and
19 // webrtc::AudioTrackSinkInterface. It gets data callback via the 19 // webrtc::AudioTrackSinkInterface. It gets data callback via the
20 // MediaStreamAudioSink::OnData() interface and pass the data to 20 // MediaStreamAudioSink::OnData() interface and pass the data to
21 // webrtc::AudioTrackSinkInterface. 21 // webrtc::AudioTrackSinkInterface.
22 class WebRtcAudioSinkAdapter : public MediaStreamAudioSink { 22 class WebRtcAudioSinkAdapter : public MediaStreamAudioSink {
23 public: 23 public:
24 explicit WebRtcAudioSinkAdapter( 24 explicit WebRtcAudioSinkAdapter(
25 webrtc::AudioTrackSinkInterface* sink); 25 webrtc::AudioTrackSinkInterface* sink);
26 virtual ~WebRtcAudioSinkAdapter(); 26 ~WebRtcAudioSinkAdapter() override;
27 27
28 bool IsEqual(const webrtc::AudioTrackSinkInterface* other) const; 28 bool IsEqual(const webrtc::AudioTrackSinkInterface* other) const;
29 29
30 private: 30 private:
31 // MediaStreamAudioSink implementation. 31 // MediaStreamAudioSink implementation.
32 virtual void OnData(const int16* audio_data, 32 void OnData(const int16* audio_data,
33 int sample_rate, 33 int sample_rate,
34 int number_of_channels, 34 int number_of_channels,
35 int number_of_frames) override; 35 int number_of_frames) override;
36 virtual void OnSetFormat(const media::AudioParameters& params) override; 36 void OnSetFormat(const media::AudioParameters& params) override;
37 37
38 webrtc::AudioTrackSinkInterface* const sink_; 38 webrtc::AudioTrackSinkInterface* const sink_;
39 39
40 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioSinkAdapter); 40 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioSinkAdapter);
41 }; 41 };
42 42
43 } // namespace content 43 } // namespace content
44 44
45 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_AUDIO_SINK_ADAPTER_H_ 45 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_AUDIO_SINK_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698