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

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

Issue 1647773002: MediaStream audio sourcing: Bypass audio processing for non-WebRTC cases. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NOT FOR REVIEW -- This will be broken-up across multiple CLs. Created 4 years, 10 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
(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 CONTENT_RENDERER_MEDIA_WEBRTC_PROCESSED_LOCAL_AUDIO_TRACK_H_
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_PROCESSED_LOCAL_AUDIO_TRACK_H_
7
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "content/renderer/media/media_stream_audio_track.h"
11
12 namespace content {
13
14 class WebRtcLocalAudioTrackAdapter;
15
16 // A MediaStreamAudioTrack that also holds a WebRtcLocalAudioTrackAdapter and
17 // provides an "adapter" bridge between the media stream object graph in the
18 // content namespace and the separate object graph in the webrtc namespace.
19 //
20 // This class is instantiated by ProcessLocalAudioSource.
21 class CONTENT_EXPORT ProcessedLocalAudioTrack
22 : NON_EXPORTED_BASE(public MediaStreamAudioTrack) {
23 public:
24 explicit ProcessedLocalAudioTrack(
25 const scoped_refptr<WebRtcLocalAudioTrackAdapter>& adapter);
26
27 ~ProcessedLocalAudioTrack() override;
28
29 // If |track| is an instance of ProcessedLocalAudioTrack, return a type-casted
30 // pointer to it. Otherwise, return null.
31 static ProcessedLocalAudioTrack* From(MediaStreamAudioTrack* track);
32
33 WebRtcLocalAudioTrackAdapter* adapter() const { return adapter_.get(); }
34
35 // MediaStreamTrack override.
36 void SetEnabled(bool enabled) override;
37
38 private:
39 // MediaStreamAudioTrack override.
40 void* GetClassIdentifier() const final;
41
42 // All usage of libjingle is through this adapter. The adapter holds
43 // a pointer to this object, but no reference.
44 const scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter_;
45
46 DISALLOW_COPY_AND_ASSIGN(ProcessedLocalAudioTrack);
47 };
48
49 } // namespace content
50
51 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_PROCESSED_LOCAL_AUDIO_TRACK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698