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

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

Issue 2371323007: Add audio support in WebrtcConnectionToHost, audio unittest (Closed)
Patch Set: more reliable test Created 4 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
« no previous file with comments | « remoting/protocol/session_config.cc ('k') | remoting/protocol/webrtc_audio_sink_adapter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_PROTOCOL_WEBRTC_AUDIO_SINK_ADAPTER_H_
6 #define REMOTING_PROTOCOL_WEBRTC_AUDIO_SINK_ADAPTER_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h"
10 #include "third_party/webrtc/api/mediastreaminterface.h"
11
12 namespace remoting {
13 namespace protocol {
14
15 class AudioStub;
16
17 class WebrtcAudioSinkAdapter : public webrtc::AudioTrackSinkInterface {
18 public:
19 WebrtcAudioSinkAdapter(scoped_refptr<webrtc::MediaStreamInterface> stream,
20 base::WeakPtr<AudioStub> audio_stub);
21 ~WebrtcAudioSinkAdapter() override;
22
23 void OnData(const void* audio_data,
24 int bits_per_sample,
25 int sample_rate,
26 size_t number_of_channels,
27 size_t number_of_frames) override;
28
29 private:
30 scoped_refptr<webrtc::MediaStreamInterface> media_stream_;
31 scoped_refptr<webrtc::AudioTrackInterface> audio_track_;
32
33 base::WeakPtr<AudioStub> audio_stub_;
34 };
35
36 } // namespace protocol
37 } // namespace remoting
38
39 #endif // REMOTING_PROTOCOL_WEBRTC_AUDIO_SINK_ADAPTER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/session_config.cc ('k') | remoting/protocol/webrtc_audio_sink_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698