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

Unified Diff: content/common/gpu/media/android_video_decode_accelerator.cc

Issue 1541353002: Add offset support to BitstreamBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Handle the offset with a helper class Created 5 years 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/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 00e1bb67856e14163ea5da84a6d04a37607335de..9119400014ac8d774f427d19acf52a92c9939347 100644
--- a/content/common/gpu/media/android_video_decode_accelerator.cc
+++ b/content/common/gpu/media/android_video_decode_accelerator.cc
@@ -204,10 +204,10 @@ void AndroidVideoDecodeAccelerator::QueueInput() {
return;
}
- scoped_ptr<base::SharedMemory> shm(
- new base::SharedMemory(bitstream_buffer.handle(), true));
- RETURN_ON_FAILURE(this, shm->Map(bitstream_buffer.size()),
- "Failed to SharedMemory::Map()", UNREADABLE_INPUT);
+ scoped_ptr<SharedMemoryRegion> shm(
+ new SharedMemoryRegion(bitstream_buffer, true));
+ RETURN_ON_FAILURE(this, shm->Map(), "Failed to SharedMemoryRegion::Map()",
+ UNREADABLE_INPUT);
const base::TimeDelta presentation_timestamp =
bitstream_buffer.presentation_timestamp();

Powered by Google App Engine
This is Rietveld 408576698