| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 media::VP9PROFILE_MIN, | 59 media::VP9PROFILE_MIN, |
| 60 media::VP9PROFILE_MAX}, | 60 media::VP9PROFILE_MAX}, |
| 61 {VideoTrackRecorder::CodecId::H264, | 61 {VideoTrackRecorder::CodecId::H264, |
| 62 media::H264PROFILE_MIN, | 62 media::H264PROFILE_MIN, |
| 63 media::H264PROFILE_MAX}}; | 63 media::H264PROFILE_MAX}}; |
| 64 | 64 |
| 65 // Returns the corresponding codec profile from VEA supported codecs. If no | 65 // Returns the corresponding codec profile from VEA supported codecs. If no |
| 66 // profile is found, returns VIDEO_CODEC_PROFILE_UNKNOWN. | 66 // profile is found, returns VIDEO_CODEC_PROFILE_UNKNOWN. |
| 67 media::VideoCodecProfile CodecIdToVEAProfile( | 67 media::VideoCodecProfile CodecIdToVEAProfile( |
| 68 content::VideoTrackRecorder::CodecId codec) { | 68 content::VideoTrackRecorder::CodecId codec) { |
| 69 // See https://crbug.com/616659. |
| 70 #if defined(OS_CHROMEOS) |
| 71 return media::VIDEO_CODEC_PROFILE_UNKNOWN; |
| 72 #endif // defined(OS_CHROMEOS) |
| 69 content::RenderThreadImpl* render_thread_impl = | 73 content::RenderThreadImpl* render_thread_impl = |
| 70 content::RenderThreadImpl::current(); | 74 content::RenderThreadImpl::current(); |
| 71 if (!render_thread_impl) | 75 if (!render_thread_impl) |
| 72 return media::VIDEO_CODEC_PROFILE_UNKNOWN; | 76 return media::VIDEO_CODEC_PROFILE_UNKNOWN; |
| 73 | 77 |
| 74 media::GpuVideoAcceleratorFactories* gpu_factories = | 78 media::GpuVideoAcceleratorFactories* gpu_factories = |
| 75 content::RenderThreadImpl::current()->GetGpuFactories(); | 79 content::RenderThreadImpl::current()->GetGpuFactories(); |
| 76 if (!gpu_factories || !gpu_factories->IsGpuVideoAcceleratorEnabled()) { | 80 if (!gpu_factories || !gpu_factories->IsGpuVideoAcceleratorEnabled()) { |
| 77 DVLOG(3) << "Couldn't initialize GpuVideoAcceleratorFactories"; | 81 DVLOG(3) << "Couldn't initialize GpuVideoAcceleratorFactories"; |
| 78 return media::VIDEO_CODEC_PROFILE_UNKNOWN; | 82 return media::VIDEO_CODEC_PROFILE_UNKNOWN; |
| (...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 encoder_->SetPaused(false); | 987 encoder_->SetPaused(false); |
| 984 } | 988 } |
| 985 | 989 |
| 986 void VideoTrackRecorder::OnVideoFrameForTesting( | 990 void VideoTrackRecorder::OnVideoFrameForTesting( |
| 987 const scoped_refptr<media::VideoFrame>& frame, | 991 const scoped_refptr<media::VideoFrame>& frame, |
| 988 base::TimeTicks timestamp) { | 992 base::TimeTicks timestamp) { |
| 989 encoder_->StartFrameEncode(frame, timestamp); | 993 encoder_->StartFrameEncode(frame, timestamp); |
| 990 } | 994 } |
| 991 | 995 |
| 992 } // namespace content | 996 } // namespace content |
| OLD | NEW |