Chromium Code Reviews| 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 crbug.com/616659. | |
|
mcasas
2016/06/02 02:48:51
nit: shift this line two spaces right.
https://
emircan
2016/06/02 20:50:55
Done.
| |
| 70 #if defined(OS_CHROMEOS) | |
| 71 return media::VIDEO_CODEC_PROFILE_UNKNOWN; | |
| 72 #endif // defined(OS_CHROMEOS) | |
|
mcasas
2016/06/02 02:48:51
It might be that some compilers will complain abou
emircan
2016/06/02 20:50:55
Acknowledged.
| |
| 69 content::RenderThreadImpl* render_thread_impl = | 73 content::RenderThreadImpl* render_thread_impl = |
| 70 content::RenderThreadImpl::current(); | 74 content::RenderThreadImpl::current(); |
| 75 | |
| 71 if (!render_thread_impl) | 76 if (!render_thread_impl) |
| 72 return media::VIDEO_CODEC_PROFILE_UNKNOWN; | 77 return media::VIDEO_CODEC_PROFILE_UNKNOWN; |
| 73 | 78 |
| 74 media::GpuVideoAcceleratorFactories* gpu_factories = | 79 media::GpuVideoAcceleratorFactories* gpu_factories = |
| 75 content::RenderThreadImpl::current()->GetGpuFactories(); | 80 content::RenderThreadImpl::current()->GetGpuFactories(); |
| 76 if (!gpu_factories || !gpu_factories->IsGpuVideoAcceleratorEnabled()) { | 81 if (!gpu_factories || !gpu_factories->IsGpuVideoAcceleratorEnabled()) { |
| 77 DVLOG(3) << "Couldn't initialize GpuVideoAcceleratorFactories"; | 82 DVLOG(3) << "Couldn't initialize GpuVideoAcceleratorFactories"; |
| 78 return media::VIDEO_CODEC_PROFILE_UNKNOWN; | 83 return media::VIDEO_CODEC_PROFILE_UNKNOWN; |
| 79 } | 84 } |
| 80 | 85 |
| (...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 983 encoder_->SetPaused(false); | 988 encoder_->SetPaused(false); |
| 984 } | 989 } |
| 985 | 990 |
| 986 void VideoTrackRecorder::OnVideoFrameForTesting( | 991 void VideoTrackRecorder::OnVideoFrameForTesting( |
| 987 const scoped_refptr<media::VideoFrame>& frame, | 992 const scoped_refptr<media::VideoFrame>& frame, |
| 988 base::TimeTicks timestamp) { | 993 base::TimeTicks timestamp) { |
| 989 encoder_->StartFrameEncode(frame, timestamp); | 994 encoder_->StartFrameEncode(frame, timestamp); |
| 990 } | 995 } |
| 991 | 996 |
| 992 } // namespace content | 997 } // namespace content |
| OLD | NEW |