| OLD | NEW | 
|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "content/renderer/media/media_recorder_handler.h" | 5 #include "content/renderer/media/media_recorder_handler.h" | 
| 6 | 6 | 
| 7 #include "base/bind.h" | 7 #include "base/bind.h" | 
| 8 #include "base/location.h" | 8 #include "base/location.h" | 
| 9 #include "base/logging.h" | 9 #include "base/logging.h" | 
| 10 #include "base/strings/string_tokenizer.h" | 10 #include "base/strings/string_tokenizer.h" | 
| 11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" | 
| 12 #include "content/renderer/media/audio_track_recorder.h" | 12 #include "content/renderer/media/audio_track_recorder.h" | 
| 13 #include "content/renderer/media/video_track_recorder.h" | 13 #include "content/renderer/media/video_track_recorder.h" | 
| 14 #include "content/renderer/media/webrtc_uma_histograms.h" | 14 #include "content/renderer/media/webrtc_uma_histograms.h" | 
| 15 #include "media/audio/audio_parameters.h" | 15 #include "media/audio/audio_parameters.h" | 
| 16 #include "media/base/audio_bus.h" | 16 #include "media/base/audio_bus.h" | 
| 17 #include "media/base/bind_to_current_loop.h" | 17 #include "media/base/bind_to_current_loop.h" | 
| 18 #include "media/base/video_frame.h" | 18 #include "media/base/video_frame.h" | 
|  | 19 #include "media/capture/webm_muxer.h" | 
| 19 #include "third_party/WebKit/public/platform/WebMediaRecorderHandlerClient.h" | 20 #include "third_party/WebKit/public/platform/WebMediaRecorderHandlerClient.h" | 
| 20 #include "third_party/WebKit/public/platform/WebString.h" | 21 #include "third_party/WebKit/public/platform/WebString.h" | 
| 21 | 22 | 
| 22 #if !defined(MEDIA_DISABLE_LIBWEBM) |  | 
| 23 #include "media/capture/webm_muxer.h" |  | 
| 24 #endif |  | 
| 25 |  | 
| 26 using base::TimeDelta; | 23 using base::TimeDelta; | 
| 27 using base::TimeTicks; | 24 using base::TimeTicks; | 
| 28 | 25 | 
| 29 namespace content { | 26 namespace content { | 
| 30 | 27 | 
| 31 MediaRecorderHandler::MediaRecorderHandler() | 28 MediaRecorderHandler::MediaRecorderHandler() | 
| 32     : use_vp9_(false), | 29     : use_vp9_(false), | 
| 33       recording_(false), | 30       recording_(false), | 
| 34       client_(nullptr), | 31       client_(nullptr), | 
| 35       weak_factory_(this) {} | 32       weak_factory_(this) {} | 
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 244     recorder->OnData(audio_bus, timestamp); | 241     recorder->OnData(audio_bus, timestamp); | 
| 245 } | 242 } | 
| 246 | 243 | 
| 247 void MediaRecorderHandler::SetAudioFormatForTesting( | 244 void MediaRecorderHandler::SetAudioFormatForTesting( | 
| 248     const media::AudioParameters& params) { | 245     const media::AudioParameters& params) { | 
| 249   for (auto* recorder : audio_recorders_) | 246   for (auto* recorder : audio_recorders_) | 
| 250     recorder->OnSetFormat(params); | 247     recorder->OnSetFormat(params); | 
| 251 } | 248 } | 
| 252 | 249 | 
| 253 }  // namespace content | 250 }  // namespace content | 
| OLD | NEW | 
|---|