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

Side by Side Diff: content/common/gpu/client/gpu_video_encode_accelerator_host.cc

Issue 668633002: Duplicate VideoEncodeAccelerator::SupportedProfile in gpu_info.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/common/gpu/client/gpu_video_encode_accelerator_host.h" 5 #include "content/common/gpu/client/gpu_video_encode_accelerator_host.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/message_loop/message_loop_proxy.h"
9 #include "content/common/gpu/client/gpu_channel_host.h" 9 #include "content/common/gpu/client/gpu_channel_host.h"
10 #include "content/common/gpu/gpu_messages.h" 10 #include "content/common/gpu/gpu_messages.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void GpuVideoEncodeAcceleratorHost::OnChannelError() { 62 void GpuVideoEncodeAcceleratorHost::OnChannelError() {
63 DCHECK(CalledOnValidThread()); 63 DCHECK(CalledOnValidThread());
64 if (channel_) { 64 if (channel_) {
65 if (encoder_route_id_ != MSG_ROUTING_NONE) 65 if (encoder_route_id_ != MSG_ROUTING_NONE)
66 channel_->RemoveRoute(encoder_route_id_); 66 channel_->RemoveRoute(encoder_route_id_);
67 channel_ = NULL; 67 channel_ = NULL;
68 } 68 }
69 NOTIFY_ERROR(kPlatformFailureError) << "OnChannelError()"; 69 NOTIFY_ERROR(kPlatformFailureError) << "OnChannelError()";
70 } 70 }
71 71
72 std::vector<media::VideoEncodeAccelerator::SupportedProfile> 72 std::vector<gpu::VideoEncodeAcceleratorSupportedProfile>
73 GpuVideoEncodeAcceleratorHost::GetSupportedProfiles() { 73 GpuVideoEncodeAcceleratorHost::GetSupportedProfiles() {
74 DCHECK(CalledOnValidThread()); 74 DCHECK(CalledOnValidThread());
75 if (!channel_) 75 if (!channel_)
76 return std::vector<media::VideoEncodeAccelerator::SupportedProfile>(); 76 return std::vector<gpu::VideoEncodeAcceleratorSupportedProfile>();
77 return channel_->gpu_info().video_encode_accelerator_supported_profiles; 77 return channel_->gpu_info().video_encode_accelerator_supported_profiles;
78 } 78 }
79 79
80 bool GpuVideoEncodeAcceleratorHost::Initialize( 80 bool GpuVideoEncodeAcceleratorHost::Initialize(
81 media::VideoFrame::Format input_format, 81 media::VideoFrame::Format input_format,
82 const gfx::Size& input_visible_size, 82 const gfx::Size& input_visible_size,
83 media::VideoCodecProfile output_profile, 83 media::VideoCodecProfile output_profile,
84 uint32 initial_bitrate, 84 uint32 initial_bitrate,
85 Client* client) { 85 Client* client) {
86 DCHECK(CalledOnValidThread()); 86 DCHECK(CalledOnValidThread());
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 weak_this_factory_.InvalidateWeakPtrs(); 269 weak_this_factory_.InvalidateWeakPtrs();
270 270
271 // Client::NotifyError() may Destroy() |this|, so calling it needs to be the 271 // Client::NotifyError() may Destroy() |this|, so calling it needs to be the
272 // last thing done on this stack! 272 // last thing done on this stack!
273 media::VideoEncodeAccelerator::Client* client = NULL; 273 media::VideoEncodeAccelerator::Client* client = NULL;
274 std::swap(client_, client); 274 std::swap(client_, client);
275 client->NotifyError(error); 275 client->NotifyError(error);
276 } 276 }
277 277
278 } // namespace content 278 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698