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_PEPPER_PEPPER_MEDIA_STREAM_AUDIO_TRACK_HOST_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_AUDIO_TRACK_HOST_H_ |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_AUDIO_TRACK_HOST_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_AUDIO_TRACK_HOST_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // Generation of buffers. It is increased by every |InitBuffers()| call. | 121 // Generation of buffers. It is increased by every |InitBuffers()| call. |
122 int32_t buffers_generation_; | 122 int32_t buffers_generation_; |
123 | 123 |
124 // Intended size of each output buffer. | 124 // Intended size of each output buffer. |
125 int32_t output_buffer_size_; | 125 int32_t output_buffer_size_; |
126 | 126 |
127 scoped_refptr<base::MessageLoopProxy> main_message_loop_proxy_; | 127 scoped_refptr<base::MessageLoopProxy> main_message_loop_proxy_; |
128 | 128 |
129 base::ThreadChecker audio_thread_checker_; | 129 base::ThreadChecker audio_thread_checker_; |
130 | 130 |
131 base::WeakPtrFactory<AudioSink> weak_factory_; | |
132 | |
133 // Number of buffers. | 131 // Number of buffers. |
134 int32_t number_of_buffers_; | 132 int32_t number_of_buffers_; |
135 | 133 |
136 // Number of bytes per second. | 134 // Number of bytes per second. |
137 int bytes_per_second_; | 135 int bytes_per_second_; |
138 | 136 |
139 // Number of bytes per frame = channels * bytes per sample. | 137 // Number of bytes per frame = channels * bytes per sample. |
140 int bytes_per_frame_; | 138 int bytes_per_frame_; |
141 | 139 |
142 // User-configured buffer duration, in milliseconds. | 140 // User-configured buffer duration, in milliseconds. |
143 int32_t user_buffer_duration_; | 141 int32_t user_buffer_duration_; |
144 | 142 |
145 // Pending |Configure()| reply context. | 143 // Pending |Configure()| reply context. |
146 ppapi::host::ReplyMessageContext pending_configure_reply_; | 144 ppapi::host::ReplyMessageContext pending_configure_reply_; |
147 | 145 |
| 146 base::WeakPtrFactory<AudioSink> weak_factory_; |
| 147 |
148 DISALLOW_COPY_AND_ASSIGN(AudioSink); | 148 DISALLOW_COPY_AND_ASSIGN(AudioSink); |
149 }; | 149 }; |
150 | 150 |
151 virtual ~PepperMediaStreamAudioTrackHost(); | 151 virtual ~PepperMediaStreamAudioTrackHost(); |
152 | 152 |
153 // ResourceMessageHandler overrides: | 153 // ResourceMessageHandler overrides: |
154 virtual int32_t OnResourceMessageReceived( | 154 virtual int32_t OnResourceMessageReceived( |
155 const IPC::Message& msg, | 155 const IPC::Message& msg, |
156 ppapi::host::HostMessageContext* context) OVERRIDE; | 156 ppapi::host::HostMessageContext* context) OVERRIDE; |
157 | 157 |
(...skipping 18 matching lines...) Expand all Loading... |
176 bool connected_; | 176 bool connected_; |
177 | 177 |
178 AudioSink audio_sink_; | 178 AudioSink audio_sink_; |
179 | 179 |
180 DISALLOW_COPY_AND_ASSIGN(PepperMediaStreamAudioTrackHost); | 180 DISALLOW_COPY_AND_ASSIGN(PepperMediaStreamAudioTrackHost); |
181 }; | 181 }; |
182 | 182 |
183 } // namespace content | 183 } // namespace content |
184 | 184 |
185 #endif // CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_AUDIO_TRACK_HOST_H_ | 185 #endif // CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_STREAM_AUDIO_TRACK_HOST_H_ |
OLD | NEW |