Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: content/renderer/media/video_track_recorder.cc

Issue 2656183002: Change effect of flag kDisableAcceleratedVideoDecode to only affect decode
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 content::RenderThreadImpl* const render_thread_impl = 118 content::RenderThreadImpl* const render_thread_impl =
119 content::RenderThreadImpl::current(); 119 content::RenderThreadImpl::current();
120 if (!render_thread_impl) { 120 if (!render_thread_impl) {
121 DVLOG(2) << "Couldn't access the render thread"; 121 DVLOG(2) << "Couldn't access the render thread";
122 return; 122 return;
123 } 123 }
124 124
125 media::GpuVideoAcceleratorFactories* const gpu_factories = 125 media::GpuVideoAcceleratorFactories* const gpu_factories =
126 render_thread_impl->GetGpuFactories(); 126 render_thread_impl->GetGpuFactories();
127 if (!gpu_factories || !gpu_factories->IsGpuVideoAcceleratorEnabled()) { 127 if (!gpu_factories) {
128 DVLOG(2) << "Couldn't initialize GpuVideoAcceleratorFactories"; 128 DVLOG(2) << "Couldn't initialize GpuVideoAcceleratorFactories";
129 return; 129 return;
130 } 130 }
131 131
132 const auto vea_supported_profiles = 132 const auto vea_supported_profiles =
133 gpu_factories->GetVideoEncodeAcceleratorSupportedProfiles(); 133 gpu_factories->GetVideoEncodeAcceleratorSupportedProfiles();
134 for (const auto& supported_profile : vea_supported_profiles) { 134 for (const auto& supported_profile : vea_supported_profiles) {
135 for (auto& codec_id_and_profile : kPreferredCodecIdAndVEAProfiles) { 135 for (auto& codec_id_and_profile : kPreferredCodecIdAndVEAProfiles) {
136 if (supported_profile.profile >= codec_id_and_profile.min_profile && 136 if (supported_profile.profile >= codec_id_and_profile.min_profile &&
137 supported_profile.profile <= codec_id_and_profile.max_profile) { 137 supported_profile.profile <= codec_id_and_profile.max_profile) {
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 encoder_->SetPaused(paused_before_init_); 1218 encoder_->SetPaused(paused_before_init_);
1219 1219
1220 // StartFrameEncode() will be called on Render IO thread. 1220 // StartFrameEncode() will be called on Render IO thread.
1221 MediaStreamVideoSink::ConnectToTrack( 1221 MediaStreamVideoSink::ConnectToTrack(
1222 track_, 1222 track_,
1223 base::Bind(&VideoTrackRecorder::Encoder::StartFrameEncode, encoder_), 1223 base::Bind(&VideoTrackRecorder::Encoder::StartFrameEncode, encoder_),
1224 false); 1224 false);
1225 } 1225 }
1226 1226
1227 } // namespace content 1227 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698