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

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

Issue 2777583002: Move getUserMedia finish to "when audio track configured". (Closed)
Patch Set: Fix error introduced when addressing review Created 3 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_MEDIA_STREAM_AUDIO_SOURCE_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 // Returns true if the source of audio is local to the application (e.g., 76 // Returns true if the source of audio is local to the application (e.g.,
77 // microphone input or loopback audio capture) as opposed to audio being 77 // microphone input or loopback audio capture) as opposed to audio being
78 // streamed-in from outside the application. 78 // streamed-in from outside the application.
79 bool is_local_source() const { return is_local_source_; } 79 bool is_local_source() const { return is_local_source_; }
80 80
81 // Connects this source to the given |track|, creating the appropriate 81 // Connects this source to the given |track|, creating the appropriate
82 // implementation of the content::MediaStreamAudioTrack interface, which 82 // implementation of the content::MediaStreamAudioTrack interface, which
83 // becomes associated with and owned by |track|. Returns true if the source 83 // becomes associated with and owned by |track|. Returns true if the source
84 // was successfully started. 84 // was successfully started.
85 bool ConnectToTrack(const blink::WebMediaStreamTrack& track); 85 virtual bool ConnectToTrack(const blink::WebMediaStreamTrack& track);
86 86
87 // Returns the current format of the audio passing through this source to the 87 // Returns the current format of the audio passing through this source to the
88 // sinks. This can return invalid parameters if the source has not yet been 88 // sinks. This can return invalid parameters if the source has not yet been
89 // started. This method is thread-safe. 89 // started. This method is thread-safe.
90 media::AudioParameters GetAudioParameters() const; 90 media::AudioParameters GetAudioParameters() const;
91 91
92 // Returns a unique class identifier. Some subclasses override and use this 92 // Returns a unique class identifier. Some subclasses override and use this
93 // method to provide safe down-casting to their type. 93 // method to provide safe down-casting to their type.
94 virtual void* GetClassIdentifier() const; 94 virtual void* GetClassIdentifier() const;
95 95
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // Provides weak pointers so that MediaStreamAudioTracks won't call 159 // Provides weak pointers so that MediaStreamAudioTracks won't call
160 // StopAudioDeliveryTo() if this instance dies first. 160 // StopAudioDeliveryTo() if this instance dies first.
161 base::WeakPtrFactory<MediaStreamAudioSource> weak_factory_; 161 base::WeakPtrFactory<MediaStreamAudioSource> weak_factory_;
162 162
163 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioSource); 163 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioSource);
164 }; 164 };
165 165
166 } // namespace content 166 } // namespace content
167 167
168 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_ 168 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/media_stream_audio_track.h » ('j') | content/renderer/media/user_media_client_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698