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

Unified Diff: content/renderer/pepper_platform_video_decoder_impl.cc

Issue 7260008: Implement proper synchronization between HW video decode IPC and CommandBuffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixing compilation errors from bots. Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper_platform_video_decoder_impl.cc
diff --git a/content/renderer/pepper_platform_video_decoder_impl.cc b/content/renderer/pepper_platform_video_decoder_impl.cc
index 1217bb97e2fb42a8e45d67f8ae2aa15ed353cbb4..453729b5c8d9d84a4725f0eed5003bb286fbc99b 100644
--- a/content/renderer/pepper_platform_video_decoder_impl.cc
+++ b/content/renderer/pepper_platform_video_decoder_impl.cc
@@ -17,9 +17,12 @@
using media::BitstreamBuffer;
PlatformVideoDecoderImpl::PlatformVideoDecoderImpl(
- VideoDecodeAccelerator::Client* client, uint32 command_buffer_route_id)
+ VideoDecodeAccelerator::Client* client,
+ int32 command_buffer_route_id,
+ gpu::CommandBufferHelper* cmd_buffer_helper)
: client_(client),
command_buffer_route_id_(command_buffer_route_id),
+ cmd_buffer_helper_(cmd_buffer_helper),
decoder_(NULL),
message_loop_(NULL) {
DCHECK(client);
@@ -78,15 +81,15 @@ void PlatformVideoDecoderImpl::InitializeDecoder(
}
GpuVideoServiceHost* video_service = channel_->gpu_video_service_host();
decoder_.reset(video_service->CreateVideoAccelerator(
- this, command_buffer_route_id_));
+ this, command_buffer_route_id_, cmd_buffer_helper_));
// Send IPC message to initialize decoder in GPU process.
decoder_->Initialize(configs);
}
-bool PlatformVideoDecoderImpl::Decode(const BitstreamBuffer& bitstream_buffer) {
+void PlatformVideoDecoderImpl::Decode(const BitstreamBuffer& bitstream_buffer) {
DCHECK(decoder_.get());
- return decoder_->Decode(bitstream_buffer);
+ decoder_->Decode(bitstream_buffer);
}
void PlatformVideoDecoderImpl::AssignGLESBuffers(
@@ -107,14 +110,14 @@ void PlatformVideoDecoderImpl::ReusePictureBuffer(
decoder_->ReusePictureBuffer(picture_buffer_id);
}
-bool PlatformVideoDecoderImpl::Flush() {
+void PlatformVideoDecoderImpl::Flush() {
DCHECK(decoder_.get());
- return decoder_->Flush();
+ decoder_->Flush();
}
-bool PlatformVideoDecoderImpl::Abort() {
+void PlatformVideoDecoderImpl::Abort() {
DCHECK(decoder_.get());
- return decoder_->Abort();
+ decoder_->Abort();
}
void PlatformVideoDecoderImpl::NotifyEndOfStream() {

Powered by Google App Engine
This is Rietveld 408576698