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

Side by Side Diff: content/renderer/media/external_media_stream_audio_source.h

Issue 2767963002: Revert of Remove |remote| and |readonly| members of MediaStreamTrack. (Closed)
Patch Set: rebase Created 3 years, 9 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 CONTENT_RENDERER_MEDIA_EXTERNAL_MEDIA_STREAM_AUDIO_SOURCE_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_EXTERNAL_MEDIA_STREAM_AUDIO_SOURCE_H_
6 #define CONTENT_RENDERER_MEDIA_EXTERNAL_MEDIA_STREAM_AUDIO_SOURCE_H_ 6 #define CONTENT_RENDERER_MEDIA_EXTERNAL_MEDIA_STREAM_AUDIO_SOURCE_H_
7 7
8 #include "content/renderer/media/media_stream_audio_source.h" 8 #include "content/renderer/media/media_stream_audio_source.h"
9 9
10 #include "media/base/audio_capturer_source.h" 10 #include "media/base/audio_capturer_source.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 // Represents an externally-provided local or remote source of audio data. This 14 // Represents an externally-provided local or remote source of audio data. This
15 // allows users of the public content::MediaStreamApi to provide a 15 // allows users of the public content::MediaStreamApi to provide a
16 // media::AudioCapturerSource to be used as the source of audio data in the 16 // media::AudioCapturerSource to be used as the source of audio data in the
17 // MediaStream framework. Audio data is transported directly to the tracks 17 // MediaStream framework. Audio data is transported directly to the tracks
18 // (i.e., there is no audio processing). 18 // (i.e., there is no audio processing).
19 class CONTENT_EXPORT ExternalMediaStreamAudioSource final 19 class CONTENT_EXPORT ExternalMediaStreamAudioSource final
20 : NON_EXPORTED_BASE(public MediaStreamAudioSource), 20 : NON_EXPORTED_BASE(public MediaStreamAudioSource),
21 NON_EXPORTED_BASE(public media::AudioCapturerSource::CaptureCallback) { 21 NON_EXPORTED_BASE(public media::AudioCapturerSource::CaptureCallback) {
22 public: 22 public:
23 ExternalMediaStreamAudioSource( 23 ExternalMediaStreamAudioSource(
24 scoped_refptr<media::AudioCapturerSource> source, 24 scoped_refptr<media::AudioCapturerSource> source,
25 int sample_rate, 25 int sample_rate,
26 media::ChannelLayout channel_layout, 26 media::ChannelLayout channel_layout,
27 int frames_per_buffer); 27 int frames_per_buffer,
28 bool is_remote);
28 29
29 ~ExternalMediaStreamAudioSource() final; 30 ~ExternalMediaStreamAudioSource() final;
30 31
31 private: 32 private:
32 // MediaStreamAudioSource implementation. 33 // MediaStreamAudioSource implementation.
33 bool EnsureSourceIsStarted() final; 34 bool EnsureSourceIsStarted() final;
34 void EnsureSourceIsStopped() final; 35 void EnsureSourceIsStopped() final;
35 36
36 // media::AudioCapturerSource::CaptureCallback implementation. 37 // media::AudioCapturerSource::CaptureCallback implementation.
37 void Capture(const media::AudioBus* audio_bus, 38 void Capture(const media::AudioBus* audio_bus,
(...skipping 11 matching lines...) Expand all
49 50
50 // True once the source has been started successfully. 51 // True once the source has been started successfully.
51 bool was_started_; 52 bool was_started_;
52 53
53 DISALLOW_COPY_AND_ASSIGN(ExternalMediaStreamAudioSource); 54 DISALLOW_COPY_AND_ASSIGN(ExternalMediaStreamAudioSource);
54 }; 55 };
55 56
56 } // namespace content 57 } // namespace content
57 58
58 #endif // CONTENT_RENDERER_MEDIA_EXTERNAL_MEDIA_STREAM_AUDIO_SOURCE_H_ 59 #endif // CONTENT_RENDERER_MEDIA_EXTERNAL_MEDIA_STREAM_AUDIO_SOURCE_H_
OLDNEW
« no previous file with comments | « content/public/renderer/media_stream_utils.cc ('k') | content/renderer/media/external_media_stream_audio_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698