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

Unified Diff: ppapi/proxy/video_source_resource.cc

Issue 16335018: Add NaCl proxies for Pepper Video Source and Destination resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Create "NaCl style" image data on host side. Created 7 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: ppapi/proxy/video_source_resource.cc
diff --git a/ppapi/proxy/video_source_resource.cc b/ppapi/proxy/video_source_resource.cc
index 0c3b192fb983de754ffe414254036444d38ba489..d21aa9f639e4e62a3cac166aa6b517cc29b751f3 100644
--- a/ppapi/proxy/video_source_resource.cc
+++ b/ppapi/proxy/video_source_resource.cc
@@ -98,7 +98,7 @@ void VideoSourceResource::OnPluginMsgGetFrameComplete(
const ResourceMessageReplyParams& reply_params,
const HostResource& image_data,
const PP_ImageDataDesc& image_desc,
- int fd,
+ int shmem_key,
PP_TimeTicks timestamp) {
// The callback may have been aborted by Close().
if (TrackedCallback::IsPending(get_frame_callback_)) {
@@ -107,12 +107,10 @@ void VideoSourceResource::OnPluginMsgGetFrameComplete(
PPB_ImageData_Shared::IsImageDataDescValid(image_desc)) {
frame->timestamp = timestamp;
-#if defined(OS_ANDROID)
- frame->image_data = 0;
-#elif defined(TOOLKIT_GTK)
+#if defined(TOOLKIT_GTK)
dmichael (off chromium) 2013/06/05 01:54:42 What's this case for? Can you just use the SharedM
bbudge 2013/06/05 02:05:03 The difficulty is that the ImageData constructor t
bbudge 2013/06/19 00:22:32 This issue was solved by the recent ImageData refa
frame->image_data =
- (new ImageData(image_data, image_desc, fd))->GetReference();
-#elif defined(OS_LINUX) || defined(OS_WIN) || defined(OS_MACOSX)
+ (new ImageData(image_data, image_desc, shmem_key))->GetReference();
+#elif defined(OS_POSIX) || defined(OS_WIN)
base::SharedMemoryHandle handle;
if (!reply_params.TakeSharedMemoryHandleAtIndex(0, &handle))
frame->image_data = 0;

Powered by Google App Engine
This is Rietveld 408576698