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

Unified Diff: media/base/video_frame.cc

Issue 859313002: Pepper: Define PPB_VideoEncoder API + Implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « media/base/video_frame.h ('k') | native_client_sdk/src/libraries/ppapi/library.dsc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame.cc
diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc
index 32c203ceadb8b0bf67c368899a21129b28507517..8ea65796448b830c9f52cd25f55e72dbff87ea15 100644
--- a/media/base/video_frame.cc
+++ b/media/base/video_frame.cc
@@ -279,6 +279,7 @@ scoped_refptr<VideoFrame> VideoFrame::WrapExternalPackedMemory(
uint8* data,
size_t data_size,
base::SharedMemoryHandle handle,
+ size_t data_offset,
base::TimeDelta timestamp,
const base::Closure& no_longer_needed_cb) {
const gfx::Size new_coded_size = AdjustCodedSize(format, coded_size);
@@ -299,6 +300,7 @@ scoped_refptr<VideoFrame> VideoFrame::WrapExternalPackedMemory(
timestamp,
false));
frame->shared_memory_handle_ = handle;
+ frame->shared_memory_offset_ = data_offset;
frame->strides_[kYPlane] = new_coded_size.width();
frame->strides_[kUPlane] = new_coded_size.width() / 2;
frame->strides_[kVPlane] = new_coded_size.width() / 2;
@@ -676,6 +678,7 @@ VideoFrame::VideoFrame(VideoFrame::Format format,
natural_size_(natural_size),
mailbox_holder_(mailbox_holder.Pass()),
shared_memory_handle_(base::SharedMemory::NULLHandle()),
+ shared_memory_offset_(0),
timestamp_(timestamp),
release_sync_point_(0),
end_of_stream_(end_of_stream) {
@@ -781,6 +784,10 @@ base::SharedMemoryHandle VideoFrame::shared_memory_handle() const {
return shared_memory_handle_;
}
+size_t VideoFrame::shared_memory_offset() const {
+ return shared_memory_offset_;
+}
+
void VideoFrame::UpdateReleaseSyncPoint(SyncPointClient* client) {
DCHECK_EQ(format_, NATIVE_TEXTURE);
base::AutoLock locker(release_sync_point_lock_);
« no previous file with comments | « media/base/video_frame.h ('k') | native_client_sdk/src/libraries/ppapi/library.dsc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698