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

Side by Side Diff: remoting/protocol/webrtc_audio_sink_adapter.h

Issue 2653563004: Revert 25680c62320767f590d037d301edfe15e9c55650 (Closed)
Patch Set: . Created 3 years, 11 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 REMOTING_PROTOCOL_WEBRTC_AUDIO_SINK_ADAPTER_H_ 5 #ifndef REMOTING_PROTOCOL_WEBRTC_AUDIO_SINK_ADAPTER_H_
6 #define REMOTING_PROTOCOL_WEBRTC_AUDIO_SINK_ADAPTER_H_ 6 #define REMOTING_PROTOCOL_WEBRTC_AUDIO_SINK_ADAPTER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/threading/thread_task_runner_handle.h"
11 #include "third_party/webrtc/api/mediastreaminterface.h" 10 #include "third_party/webrtc/api/mediastreaminterface.h"
12 11
13 namespace base {
14 class SingleThreadTaskRunner;
15 } // namespace base
16
17 namespace remoting { 12 namespace remoting {
18 namespace protocol { 13 namespace protocol {
19 14
20 class AudioStub; 15 class AudioStub;
21 16
22 class WebrtcAudioSinkAdapter : public webrtc::AudioTrackSinkInterface { 17 class WebrtcAudioSinkAdapter : public webrtc::AudioTrackSinkInterface {
23 public: 18 public:
24 WebrtcAudioSinkAdapter(scoped_refptr<webrtc::MediaStreamInterface> stream, 19 WebrtcAudioSinkAdapter(scoped_refptr<webrtc::MediaStreamInterface> stream,
25 base::WeakPtr<AudioStub> audio_stub); 20 base::WeakPtr<AudioStub> audio_stub);
26 ~WebrtcAudioSinkAdapter() override; 21 ~WebrtcAudioSinkAdapter() override;
27 22
28 void OnData(const void* audio_data, 23 void OnData(const void* audio_data,
29 int bits_per_sample, 24 int bits_per_sample,
30 int sample_rate, 25 int sample_rate,
31 size_t number_of_channels, 26 size_t number_of_channels,
32 size_t number_of_frames) override; 27 size_t number_of_frames) override;
33 28
34 private: 29 private:
35 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
36 base::WeakPtr<AudioStub> audio_stub_;
37 scoped_refptr<webrtc::MediaStreamInterface> media_stream_; 30 scoped_refptr<webrtc::MediaStreamInterface> media_stream_;
38 scoped_refptr<webrtc::AudioTrackInterface> audio_track_; 31 scoped_refptr<webrtc::AudioTrackInterface> audio_track_;
32
33 base::WeakPtr<AudioStub> audio_stub_;
39 }; 34 };
40 35
41 } // namespace protocol 36 } // namespace protocol
42 } // namespace remoting 37 } // namespace remoting
43 38
44 #endif // REMOTING_PROTOCOL_WEBRTC_AUDIO_SINK_ADAPTER_H_ 39 #endif // REMOTING_PROTOCOL_WEBRTC_AUDIO_SINK_ADAPTER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/webrtc_audio_module.cc ('k') | remoting/protocol/webrtc_audio_sink_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698