| OLD | NEW |
| 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_WEBRTC_AUDIO_RENDERER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 std::string output_device_id_; | 243 std::string output_device_id_; |
| 244 url::Origin security_origin_; | 244 url::Origin security_origin_; |
| 245 | 245 |
| 246 // Maps audio sources to a list of active audio renderers. | 246 // Maps audio sources to a list of active audio renderers. |
| 247 // Pointers to PlayingState objects are only kept in this map while the | 247 // Pointers to PlayingState objects are only kept in this map while the |
| 248 // associated renderer is actually playing the stream. Ownership of the | 248 // associated renderer is actually playing the stream. Ownership of the |
| 249 // state objects lies with the renderers and they must leave the playing state | 249 // state objects lies with the renderers and they must leave the playing state |
| 250 // before being destructed (PlayingState object goes out of scope). | 250 // before being destructed (PlayingState object goes out of scope). |
| 251 SourcePlayingStates source_playing_states_; | 251 SourcePlayingStates source_playing_states_; |
| 252 | 252 |
| 253 // Used for triggering new UMA histogram. Counts number of render | 253 // Used for logging UMA data periodically. |
| 254 // callbacks modulo |kNumCallbacksBetweenRenderTimeHistograms|. | |
| 255 int render_callback_count_; | 254 int render_callback_count_; |
| 256 | 255 |
| 256 // Accumulated time spent waiting for render data from the source. Used for |
| 257 // logging UMA data for average time spent waiting. |
| 258 base::TimeDelta accumulated_render_time_; |
| 259 |
| 260 // Stores the maximum time spent waiting for render data from the source. Used |
| 261 // for logging UMA data. Logged and reset when Stop() is called. |
| 262 base::TimeDelta max_render_time_; |
| 263 |
| 257 DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioRenderer); | 264 DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioRenderer); |
| 258 }; | 265 }; |
| 259 | 266 |
| 260 } // namespace content | 267 } // namespace content |
| 261 | 268 |
| 262 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_ | 269 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_ |
| OLD | NEW |