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

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

Issue 1314803003: Include default communication devices in audio device enumerations. This removes heuristic that pic… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comment Created 5 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_DISPATCHER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 void CloseDevice(const std::string& label); 79 void CloseDevice(const std::string& label);
80 80
81 // Check if the label is a valid stream. 81 // Check if the label is a valid stream.
82 virtual bool IsStream(const std::string& label); 82 virtual bool IsStream(const std::string& label);
83 // Get the video session_id given a label. The label identifies a stream. 83 // Get the video session_id given a label. The label identifies a stream.
84 // index is the index in the video_device_array of the stream. 84 // index is the index in the video_device_array of the stream.
85 virtual int video_session_id(const std::string& label, int index); 85 virtual int video_session_id(const std::string& label, int index);
86 // Returns an audio session_id given a label and an index. 86 // Returns an audio session_id given a label and an index.
87 virtual int audio_session_id(const std::string& label, int index); 87 virtual int audio_session_id(const std::string& label, int index);
88 88
89 // Returns true if an audio input stream is currently active that was opened
90 // with audio ducking enabled. This is information is used when playing out
91 // audio so that rendered audio can be excluded from the ducking operation.
92 bool IsAudioDuckingActive() const;
93
94 protected: 89 protected:
95 int GetNextIpcIdForTest() { return next_ipc_id_; } 90 int GetNextIpcIdForTest() { return next_ipc_id_; }
96 91
97 private: 92 private:
98 FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, BasicVideoDevice); 93 FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, BasicVideoDevice);
99 FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, TestFailure); 94 FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, TestFailure);
100 FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, CancelGenerateStream); 95 FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, CancelGenerateStream);
101 FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, CheckDuckingState);
102 96
103 struct Request; 97 struct Request;
104 98
105 // Private class for keeping track of opened devices and who have 99 // Private class for keeping track of opened devices and who have
106 // opened it. 100 // opened it.
107 struct Stream; 101 struct Stream;
108 102
109 // RenderFrameObserver override. 103 // RenderFrameObserver override.
110 void OnDestruct() override; 104 void OnDestruct() override;
111 bool Send(IPC::Message* message) override; 105 bool Send(IPC::Message* message) override;
(...skipping 30 matching lines...) Expand all
142 // been canceled. 136 // been canceled.
143 typedef std::list<Request> RequestList; 137 typedef std::list<Request> RequestList;
144 RequestList requests_; 138 RequestList requests_;
145 139
146 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcher); 140 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcher);
147 }; 141 };
148 142
149 } // namespace content 143 } // namespace content
150 144
151 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_ 145 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_audio_processor_unittest.cc ('k') | content/renderer/media/media_stream_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698