| 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 #if BUILDFLAG(RTC_USE_H264) | 43 #if BUILDFLAG(RTC_USE_H264) |
| 44 case VideoTrackRecorder::CodecId::H264: | 44 case VideoTrackRecorder::CodecId::H264: |
| 45 return media::kCodecH264; | 45 return media::kCodecH264; |
| 46 #endif | 46 #endif |
| 47 } | 47 } |
| 48 NOTREACHED() << "Unsupported codec"; | 48 NOTREACHED() << "Unsupported codec"; |
| 49 return media::kUnknownVideoCodec; | 49 return media::kUnknownVideoCodec; |
| 50 } | 50 } |
| 51 | 51 |
| 52 } // anonymous namespace | 52 } // anonymous namespace |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 recorder->OnData(audio_bus, timestamp); | 306 recorder->OnData(audio_bus, timestamp); |
| 307 } | 307 } |
| 308 | 308 |
| 309 void MediaRecorderHandler::SetAudioFormatForTesting( | 309 void MediaRecorderHandler::SetAudioFormatForTesting( |
| 310 const media::AudioParameters& params) { | 310 const media::AudioParameters& params) { |
| 311 for (auto* recorder : audio_recorders_) | 311 for (auto* recorder : audio_recorders_) |
| 312 recorder->OnSetFormat(params); | 312 recorder->OnSetFormat(params); |
| 313 } | 313 } |
| 314 | 314 |
| 315 } // namespace content | 315 } // namespace content |
| OLD | NEW |