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

Side by Side Diff: content/renderer/media/media_stream_audio_sink_owner.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 2013 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_MEDIA_STREAM_AUDIO_SINK_OWNER_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SINK_OWNER_H_
7
8 #include <vector>
9
10 #include "base/macros.h"
11 #include "base/synchronization/lock.h"
12 #include "content/renderer/media/media_stream_audio_track_sink.h"
13
14 namespace content {
15
16 class MediaStreamAudioSink;
17
18 // Reference counted holder of MediaStreamAudioSink sinks.
19 class MediaStreamAudioSinkOwner : public MediaStreamAudioTrackSink {
20 public:
21 explicit MediaStreamAudioSinkOwner(MediaStreamAudioSink* sink);
22
23 // MediaStreamAudioTrackSink implementation.
24 void OnData(const media::AudioBus& audio_bus,
25 base::TimeTicks estimated_capture_time) override;
26 void OnSetFormat(const media::AudioParameters& params) override;
27 void OnReadyStateChanged(
28 blink::WebMediaStreamSource::ReadyState state) override;
29 void Reset() override;
30 bool IsEqual(const MediaStreamAudioSink* other) const override;
31
32 protected:
33 ~MediaStreamAudioSinkOwner() override {}
34
35 private:
36 mutable base::Lock lock_;
37
38 // Raw pointer to the delegate, the client need to call Reset() to set the
39 // pointer to NULL before the delegate goes away.
40 MediaStreamAudioSink* delegate_;
41
42 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioSinkOwner);
43 };
44
45 } // namespace content
46
47 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SINK_OWNER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_audio_processor.cc ('k') | content/renderer/media/media_stream_audio_sink_owner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698