| 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/video_track_recorder.h" | 5 #include "content/renderer/media/video_track_recorder.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 media::H264PROFILE_MAX}}; | 70 media::H264PROFILE_MAX}}; |
| 71 | 71 |
| 72 // Returns the corresponding codec profile from VEA supported codecs. If no | 72 // Returns the corresponding codec profile from VEA supported codecs. If no |
| 73 // profile is found, returns VIDEO_CODEC_PROFILE_UNKNOWN. | 73 // profile is found, returns VIDEO_CODEC_PROFILE_UNKNOWN. |
| 74 media::VideoCodecProfile CodecIdToVEAProfile( | 74 media::VideoCodecProfile CodecIdToVEAProfile( |
| 75 content::VideoTrackRecorder::CodecId codec) { | 75 content::VideoTrackRecorder::CodecId codec) { |
| 76 // See https://crbug.com/616659. | 76 // See https://crbug.com/616659. |
| 77 #if defined(OS_CHROMEOS) | 77 #if defined(OS_CHROMEOS) |
| 78 return media::VIDEO_CODEC_PROFILE_UNKNOWN; | 78 return media::VIDEO_CODEC_PROFILE_UNKNOWN; |
| 79 #endif // defined(OS_CHROMEOS) | 79 #endif // defined(OS_CHROMEOS) |
| 80 |
| 81 // See https://crbug.com/653864. |
| 82 #if defined(OS_ANDROID) |
| 83 return media::VIDEO_CODEC_PROFILE_UNKNOWN; |
| 84 #endif // defined(OS_ANDROID) |
| 85 |
| 80 content::RenderThreadImpl* const render_thread_impl = | 86 content::RenderThreadImpl* const render_thread_impl = |
| 81 content::RenderThreadImpl::current(); | 87 content::RenderThreadImpl::current(); |
| 82 if (!render_thread_impl) { | 88 if (!render_thread_impl) { |
| 83 DVLOG(3) << "Couldn't access the render thread"; | 89 DVLOG(3) << "Couldn't access the render thread"; |
| 84 return media::VIDEO_CODEC_PROFILE_UNKNOWN; | 90 return media::VIDEO_CODEC_PROFILE_UNKNOWN; |
| 85 } | 91 } |
| 86 | 92 |
| 87 media::GpuVideoAcceleratorFactories* const gpu_factories = | 93 media::GpuVideoAcceleratorFactories* const gpu_factories = |
| 88 render_thread_impl->GetGpuFactories(); | 94 render_thread_impl->GetGpuFactories(); |
| 89 if (!gpu_factories || !gpu_factories->IsGpuVideoAcceleratorEnabled()) { | 95 if (!gpu_factories || !gpu_factories->IsGpuVideoAcceleratorEnabled()) { |
| (...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1149 encoder_->SetPaused(paused_before_init_); | 1155 encoder_->SetPaused(paused_before_init_); |
| 1150 | 1156 |
| 1151 // StartFrameEncode() will be called on Render IO thread. | 1157 // StartFrameEncode() will be called on Render IO thread. |
| 1152 MediaStreamVideoSink::ConnectToTrack( | 1158 MediaStreamVideoSink::ConnectToTrack( |
| 1153 track_, | 1159 track_, |
| 1154 base::Bind(&VideoTrackRecorder::Encoder::StartFrameEncode, encoder_), | 1160 base::Bind(&VideoTrackRecorder::Encoder::StartFrameEncode, encoder_), |
| 1155 false); | 1161 false); |
| 1156 } | 1162 } |
| 1157 | 1163 |
| 1158 } // namespace content | 1164 } // namespace content |
| OLD | NEW |