Chromium Code Reviews| Index: content/browser/media/capture/audio_mirroring_manager.h |
| diff --git a/content/browser/media/capture/audio_mirroring_manager.h b/content/browser/media/capture/audio_mirroring_manager.h |
| index a624a0824befa013d4868d12a3c75f50ac8417f6..dd1888ba964fbefce74e40c06917584b26267595 100644 |
| --- a/content/browser/media/capture/audio_mirroring_manager.h |
| +++ b/content/browser/media/capture/audio_mirroring_manager.h |
| @@ -32,6 +32,7 @@ |
| #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_AUDIO_MIRRORING_MANAGER_H_ |
| #define CONTENT_BROWSER_MEDIA_CAPTURE_AUDIO_MIRRORING_MANAGER_H_ |
| +#include <map> |
| #include <set> |
| #include <utility> |
| #include <vector> |
| @@ -41,6 +42,7 @@ |
| #include "base/threading/thread_checker.h" |
| #include "content/common/content_export.h" |
| #include "media/audio/audio_source_diverter.h" |
| +#include "media/audio/virtual_audio_sink.h" |
| namespace media { |
| class AudioOutputStream; |
| @@ -79,6 +81,11 @@ class CONTENT_EXPORT AudioMirroringManager { |
| virtual media::AudioOutputStream* AddInput( |
| const media::AudioParameters& params) = 0; |
| + virtual media::AudioPushSink* AddPushInput( |
| + const media::AudioParameters& params) = 0; |
| + |
| + virtual bool IsDuplication() = 0; |
|
miu
2016/04/21 00:15:24
I was looking at how AudioMirroringManager uses th
qiangchen
2016/04/28 00:00:56
Done.
|
| + |
| protected: |
| virtual ~MirroringDestination() {} |
| }; |
| @@ -120,6 +127,9 @@ class CONTENT_EXPORT AudioMirroringManager { |
| // destination. |
| MirroringDestination* destination; |
| + // The destinations to which audio stream is duplicated. |
| + std::map<MirroringDestination*, media::AudioPushSink*> dup_destinations; |
| + |
| StreamRoutingState(const SourceFrameRef& source_frame, |
| Diverter* stream_diverter); |
| StreamRoutingState(const StreamRoutingState& other); |
| @@ -143,6 +153,14 @@ class CONTENT_EXPORT AudioMirroringManager { |
| bool add_only, |
| const std::set<SourceFrameRef>& matches); |
| + // MirroringDestination query callback. |matches| contains all RenderFrame |
| + // sources that will be duplicated to |destination|. If |add_only| is false, |
| + // then any Diverters currently duplicating to |destination| but not found in |
| + // |matches| will be stopped. |
| + void UpdateRoutesToDupDestination(MirroringDestination* destination, |
| + bool add_only, |
| + const std::set<SourceFrameRef>& matches); |
| + |
| // Starts diverting audio to the |new_destination|, if not NULL. Otherwise, |
| // stops diverting audio. |
| static void ChangeRoute(StreamRoutingState* route, |