| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 namespace content { | 33 namespace content { |
| 34 | 34 |
| 35 namespace { | 35 namespace { |
| 36 | 36 |
| 37 media::VideoCodec CodecIdToMediaVideoCodec(VideoTrackRecorder::CodecId id) { | 37 media::VideoCodec CodecIdToMediaVideoCodec(VideoTrackRecorder::CodecId id) { |
| 38 switch (id) { | 38 switch (id) { |
| 39 case VideoTrackRecorder::CodecId::VP8: | 39 case VideoTrackRecorder::CodecId::VP8: |
| 40 return media::kCodecVP8; | 40 return media::kCodecVP8; |
| 41 case VideoTrackRecorder::CodecId::VP9: | 41 case VideoTrackRecorder::CodecId::VP9: |
| 42 return media::kCodecVP8; | 42 return media::kCodecVP9; |
| 43 case VideoTrackRecorder::CodecId::H264: | 43 case VideoTrackRecorder::CodecId::H264: |
| 44 return media::kCodecH264; | 44 return media::kCodecH264; |
| 45 } | 45 } |
| 46 NOTREACHED() << "Unsupported codec"; | 46 NOTREACHED() << "Unsupported codec"; |
| 47 return media::kUnknownVideoCodec; | 47 return media::kUnknownVideoCodec; |
| 48 } | 48 } |
| 49 | 49 |
| 50 } // anonymous namespace | 50 } // anonymous namespace |
| 51 | 51 |
| 52 MediaRecorderHandler::MediaRecorderHandler() | 52 MediaRecorderHandler::MediaRecorderHandler() |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 recorder->OnData(audio_bus, timestamp); | 309 recorder->OnData(audio_bus, timestamp); |
| 310 } | 310 } |
| 311 | 311 |
| 312 void MediaRecorderHandler::SetAudioFormatForTesting( | 312 void MediaRecorderHandler::SetAudioFormatForTesting( |
| 313 const media::AudioParameters& params) { | 313 const media::AudioParameters& params) { |
| 314 for (auto* recorder : audio_recorders_) | 314 for (auto* recorder : audio_recorders_) |
| 315 recorder->OnSetFormat(params); | 315 recorder->OnSetFormat(params); |
| 316 } | 316 } |
| 317 | 317 |
| 318 } // namespace content | 318 } // namespace content |
| OLD | NEW |