| OLD | NEW |
| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 // Returns true if the source of audio is local to the application (e.g., | 72 // Returns true if the source of audio is local to the application (e.g., |
| 73 // microphone input or loopback audio capture) as opposed to audio being | 73 // microphone input or loopback audio capture) as opposed to audio being |
| 74 // streamed-in from outside the application. | 74 // streamed-in from outside the application. |
| 75 bool is_local_source() const { return is_local_source_; } | 75 bool is_local_source() const { return is_local_source_; } |
| 76 | 76 |
| 77 // Connects this source to the given |track|, creating the appropriate | 77 // Connects this source to the given |track|, creating the appropriate |
| 78 // implementation of the content::MediaStreamAudioTrack interface, which | 78 // implementation of the content::MediaStreamAudioTrack interface, which |
| 79 // becomes associated with and owned by |track|. Returns true if the source | 79 // becomes associated with and owned by |track|. Returns true if the source |
| 80 // was successfully started. | 80 // was successfully started. |
| 81 bool ConnectToTrack(const blink::WebMediaStreamTrack& track); | 81 bool ConnectToTrack(const blink::WebMediaStreamTrack& track) override; |
| 82 | 82 |
| 83 // Returns the current format of the audio passing through this source to the | 83 // Returns the current format of the audio passing through this source to the |
| 84 // sinks. This can return invalid parameters if the source has not yet been | 84 // sinks. This can return invalid parameters if the source has not yet been |
| 85 // started. This method is thread-safe. | 85 // started. This method is thread-safe. |
| 86 media::AudioParameters GetAudioParameters() const; | 86 media::AudioParameters GetAudioParameters() const; |
| 87 | 87 |
| 88 // Returns a unique class identifier. Some subclasses override and use this | 88 // Returns a unique class identifier. Some subclasses override and use this |
| 89 // method to provide safe down-casting to their type. | 89 // method to provide safe down-casting to their type. |
| 90 virtual void* GetClassIdentifier() const; | 90 virtual void* GetClassIdentifier() const; |
| 91 | 91 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 // Provides weak pointers so that MediaStreamAudioTracks won't call | 149 // Provides weak pointers so that MediaStreamAudioTracks won't call |
| 150 // StopAudioDeliveryTo() if this instance dies first. | 150 // StopAudioDeliveryTo() if this instance dies first. |
| 151 base::WeakPtrFactory<MediaStreamAudioSource> weak_factory_; | 151 base::WeakPtrFactory<MediaStreamAudioSource> weak_factory_; |
| 152 | 152 |
| 153 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioSource); | 153 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioSource); |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 } // namespace content | 156 } // namespace content |
| 157 | 157 |
| 158 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_ | 158 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_ |
| OLD | NEW |