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

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

Issue 2941773002: Added initial muted state to stream creation callback, to avoid races. (Closed)
Patch Set: Added mute information to DoCompleteCreation log message. Created 3 years, 6 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_AUDIO_INPUT_MESSAGE_FILTER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_AUDIO_INPUT_MESSAGE_FILTER_H_
6 #define CONTENT_RENDERER_MEDIA_AUDIO_INPUT_MESSAGE_FILTER_H_ 6 #define CONTENT_RENDERER_MEDIA_AUDIO_INPUT_MESSAGE_FILTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 // Received when browser process has created an audio input stream. 67 // Received when browser process has created an audio input stream.
68 void OnStreamCreated(int stream_id, 68 void OnStreamCreated(int stream_id,
69 base::SharedMemoryHandle handle, 69 base::SharedMemoryHandle handle,
70 #if defined(OS_WIN) 70 #if defined(OS_WIN)
71 base::SyncSocket::Handle socket_handle, 71 base::SyncSocket::Handle socket_handle,
72 #else 72 #else
73 base::FileDescriptor socket_descriptor, 73 base::FileDescriptor socket_descriptor,
74 #endif 74 #endif
75 uint32_t length, 75 uint32_t length,
76 uint32_t total_segments); 76 uint32_t total_segments,
77 bool initially_muted);
77 78
78 // Received when internal state of browser process' audio input stream has 79 // Received when internal state of browser process' audio input stream has
79 // encountered an error. 80 // encountered an error.
80 void OnStreamError(int stream_id); 81 void OnStreamError(int stream_id);
81 82
82 // Received when a stream is muted or unmuted. 83 // Received when a stream is muted or unmuted.
83 void OnStreamMuted(int stream_id, bool is_muted); 84 void OnStreamMuted(int stream_id, bool is_muted);
84 85
85 // A map of stream ids to delegates. 86 // A map of stream ids to delegates.
86 IDMap<media::AudioInputIPCDelegate*> delegates_; 87 IDMap<media::AudioInputIPCDelegate*> delegates_;
87 88
88 // IPC sender for Send(), must only be accesed on |io_task_runner_|. 89 // IPC sender for Send(), must only be accesed on |io_task_runner_|.
89 IPC::Sender* sender_; 90 IPC::Sender* sender_;
90 91
91 // Task runner on which IPC calls are executed. 92 // Task runner on which IPC calls are executed.
92 const scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; 93 const scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
93 94
94 // The singleton instance for this filter. 95 // The singleton instance for this filter.
95 static AudioInputMessageFilter* g_filter; 96 static AudioInputMessageFilter* g_filter;
96 97
97 DISALLOW_COPY_AND_ASSIGN(AudioInputMessageFilter); 98 DISALLOW_COPY_AND_ASSIGN(AudioInputMessageFilter);
98 }; 99 };
99 100
100 } // namespace content 101 } // namespace content
101 102
102 #endif // CONTENT_RENDERER_MEDIA_AUDIO_INPUT_MESSAGE_FILTER_H_ 103 #endif // CONTENT_RENDERER_MEDIA_AUDIO_INPUT_MESSAGE_FILTER_H_
OLDNEW
« no previous file with comments | « content/common/media/audio_messages.h ('k') | content/renderer/media/audio_input_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698