Index: content/common/gpu/media/android_video_decode_accelerator.cc |
diff --git a/content/common/gpu/media/android_video_decode_accelerator.cc b/content/common/gpu/media/android_video_decode_accelerator.cc |
index dfe0fc52895fcc9d70e0624f5b89132dfe6d6df7..a31aa0d68c8fb32eebb5d470913b58e70a021d5d 100644 |
--- a/content/common/gpu/media/android_video_decode_accelerator.cc |
+++ b/content/common/gpu/media/android_video_decode_accelerator.cc |
@@ -17,6 +17,7 @@ |
#include "content/common/gpu/gpu_channel.h" |
#include "content/common/gpu/media/android_copying_backing_strategy.h" |
#include "content/common/gpu/media/android_deferred_rendering_backing_strategy.h" |
+#include "content/common/gpu/media/shared_memory_region.h" |
#include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
#include "media/base/bind_to_current_loop.h" |
#include "media/base/bitstream_buffer.h" |
@@ -346,17 +347,17 @@ bool AndroidVideoDecodeAccelerator::QueueInput() { |
return true; |
} |
- scoped_ptr<base::SharedMemory> shm; |
+ scoped_ptr<SharedMemoryRegion> shm; |
if (pending_input_buf_index_ != -1) { |
// The buffer is already dequeued from MediaCodec, filled with data and |
// bitstream_buffer.handle() is closed. |
- shm.reset(new base::SharedMemory()); |
+ shm.reset(new SharedMemoryRegion(base::SharedMemoryHandle(), 0, 0, false)); |
} else { |
- shm.reset(new base::SharedMemory(bitstream_buffer.handle(), true)); |
+ shm.reset(new SharedMemoryRegion(bitstream_buffer, true)); |
- if (!shm->Map(bitstream_buffer.size())) { |
- POST_ERROR(UNREADABLE_INPUT, "Failed to SharedMemory::Map()"); |
+ if (!shm->Map()) { |
+ POST_ERROR(UNREADABLE_INPUT, "Failed to SharedMemoryRegion::Map()"); |
return false; |
} |
} |