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

Side by Side Diff: content/renderer/pepper_platform_video_decoder_impl.cc

Issue 7545014: Implement PPAPI VideoDecode out-of-process support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: responding to brettw Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_platform_video_decoder_impl.h" 5 #include "content/renderer/pepper_platform_video_decoder_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "content/common/child_process.h" 11 #include "content/common/child_process.h"
12 #include "content/renderer/gpu/gpu_channel_host.h" 12 #include "content/renderer/gpu/gpu_channel_host.h"
13 #include "content/renderer/render_thread.h" 13 #include "content/renderer/render_thread.h"
14 14
15 using media::BitstreamBuffer; 15 using media::BitstreamBuffer;
16 16
17 PlatformVideoDecoderImpl::PlatformVideoDecoderImpl( 17 PlatformVideoDecoderImpl::PlatformVideoDecoderImpl(
18 VideoDecodeAccelerator::Client* client, 18 VideoDecodeAccelerator::Client* client,
19 int32 command_buffer_route_id) 19 int32 command_buffer_route_id)
20 : client_(client), 20 : client_(client),
21 command_buffer_route_id_(command_buffer_route_id) { 21 command_buffer_route_id_(command_buffer_route_id) {
22 DCHECK(client); 22 DCHECK(client);
23 } 23 }
24 24
25 PlatformVideoDecoderImpl::~PlatformVideoDecoderImpl() {} 25 PlatformVideoDecoderImpl::~PlatformVideoDecoderImpl() {}
26 26
27 bool PlatformVideoDecoderImpl::Initialize(const std::vector<uint32>& configs) { 27 bool PlatformVideoDecoderImpl::Initialize(const std::vector<int32>& configs) {
28 // TODO(vrk): Support multiple decoders. 28 // TODO(vrk): Support multiple decoders.
29 if (decoder_) 29 if (decoder_)
30 return true; 30 return true;
31 31
32 RenderThread* render_thread = RenderThread::current(); 32 RenderThread* render_thread = RenderThread::current();
33 DCHECK(render_thread); 33 DCHECK(render_thread);
34 34
35 // This is not synchronous, but subsequent IPC messages will be buffered, so 35 // This is not synchronous, but subsequent IPC messages will be buffered, so
36 // it is okay to immediately send IPC messages through the returned channel. 36 // it is okay to immediately send IPC messages through the returned channel.
37 GpuChannelHost* channel = 37 GpuChannelHost* channel =
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 void PlatformVideoDecoderImpl::NotifyFlushDone() { 124 void PlatformVideoDecoderImpl::NotifyFlushDone() {
125 DCHECK_EQ(RenderThread::current()->message_loop(), MessageLoop::current()); 125 DCHECK_EQ(RenderThread::current()->message_loop(), MessageLoop::current());
126 client_->NotifyFlushDone(); 126 client_->NotifyFlushDone();
127 } 127 }
128 128
129 void PlatformVideoDecoderImpl::NotifyResetDone() { 129 void PlatformVideoDecoderImpl::NotifyResetDone() {
130 DCHECK_EQ(RenderThread::current()->message_loop(), MessageLoop::current()); 130 DCHECK_EQ(RenderThread::current()->message_loop(), MessageLoop::current());
131 client_->NotifyResetDone(); 131 client_->NotifyResetDone();
132 } 132 }
OLDNEW
« no previous file with comments | « content/renderer/pepper_platform_video_decoder_impl.h ('k') | media/video/video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698