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

Side by Side Diff: content/renderer/pepper/ppb_video_decoder_impl.cc

Issue 2351723004: Don't attempt to use NV12 with hardware decoding in Flash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/pepper/ppb_video_decoder_impl.h" 5 #include "content/renderer/pepper/ppb_video_decoder_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 if (!command_buffer) 124 if (!command_buffer)
125 return false; 125 return false;
126 126
127 InitCommon(graphics_context, graphics_3d->gles2_impl()); 127 InitCommon(graphics_context, graphics_3d->gles2_impl());
128 FlushCommandBuffer(); 128 FlushCommandBuffer();
129 129
130 // This is not synchronous, but subsequent IPC messages will be buffered, so 130 // This is not synchronous, but subsequent IPC messages will be buffered, so
131 // it is okay to immediately send IPC messages. 131 // it is okay to immediately send IPC messages.
132 if (command_buffer->channel()) { 132 if (command_buffer->channel()) {
133 decoder_.reset(new media::GpuVideoDecodeAcceleratorHost(command_buffer)); 133 decoder_.reset(new media::GpuVideoDecodeAcceleratorHost(command_buffer));
134 return decoder_->Initialize(PPToMediaProfile(profile), this); 134 media::VideoDecodeAccelerator::Config config(PPToMediaProfile(profile));
135 config.supported_output_formats.assign(
136 {media::PIXEL_FORMAT_XRGB, media::PIXEL_FORMAT_ARGB});
137 return decoder_->Initialize(config, this);
135 } 138 }
136 return false; 139 return false;
137 } 140 }
138 141
139 const PPP_VideoDecoder_Dev* PPB_VideoDecoder_Impl::GetPPP() { 142 const PPP_VideoDecoder_Dev* PPB_VideoDecoder_Impl::GetPPP() {
140 if (!ppp_videodecoder_) { 143 if (!ppp_videodecoder_) {
141 PluginModule* plugin_module = 144 PluginModule* plugin_module =
142 HostGlobals::Get()->GetInstance(pp_instance())->module(); 145 HostGlobals::Get()->GetInstance(pp_instance())->module();
143 if (plugin_module) { 146 if (plugin_module) {
144 ppp_videodecoder_ = static_cast<const PPP_VideoDecoder_Dev*>( 147 ppp_videodecoder_ = static_cast<const PPP_VideoDecoder_Dev*>(
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 DCHECK(RenderThreadImpl::current()); 300 DCHECK(RenderThreadImpl::current());
298 RunBitstreamBufferCallback(bitstream_buffer_id, PP_OK); 301 RunBitstreamBufferCallback(bitstream_buffer_id, PP_OK);
299 } 302 }
300 303
301 void PPB_VideoDecoder_Impl::NotifyFlushDone() { 304 void PPB_VideoDecoder_Impl::NotifyFlushDone() {
302 DCHECK(RenderThreadImpl::current()); 305 DCHECK(RenderThreadImpl::current());
303 RunFlushCallback(PP_OK); 306 RunFlushCallback(PP_OK);
304 } 307 }
305 308
306 } // namespace content 309 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698