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

Unified Diff: ppapi/api/private/ppp_image_capture_private.idl

Issue 391323002: Pepper: add Image Capture interfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move to private, add PPP_ImageCapture, and address comments Created 6 years, 5 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/api/private/ppp_image_capture_private.idl
diff --git a/ppapi/api/private/ppp_image_capture_private.idl b/ppapi/api/private/ppp_image_capture_private.idl
new file mode 100644
index 0000000000000000000000000000000000000000..26b790f5321f2a2358504f9a5a60bde1c8dc6233
--- /dev/null
+++ b/ppapi/api/private/ppp_image_capture_private.idl
@@ -0,0 +1,80 @@
+/* Copyright (c) 2014 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/**
+ * This file defines the <code>PPP_ImageCapture_Private</code> interface.
+ */
+
+[generate_thunk]
+
+label Chrome {
+ M39 = 0.1
+};
+
+/**
+ * PPP_ImageCapture_Private structure contains the function pointers that the
+ * plugin MUST implement to provide services needed by the image capture
+ * implementation.
Justin Chuang 2014/08/03 10:46:45 I am not familiar with PPAPI, but I suspect it sho
wuchengli 2014/08/06 08:14:58 Good idea. This patchset is similar to PPP_VideoDe
+ *
+ * See PPB_ImageCapture_Private for general usage tips.
+ */
+interface PPP_ImageCapture_Private {
+ /**
+ * Callback function for <code>PPB_ImageCapture_Private.TakePhoto</code>.
+ * Called as near as possible to the moment when a photo is captured from the
+ * sensor. This is a good opportunity to play a shutter sound or give other
+ * feedback of camera operation. This may be some time after the photo was
Pawel Osciak 2014/08/03 08:34:38 s/may be some time/will occur/
wuchengli 2014/08/06 08:14:58 Done.
+ * triggered, but some time before the actual data is available.
Pawel Osciak 2014/08/03 08:34:38 s/some time//
Pawel Osciak 2014/08/03 08:34:39 s/triggered/captured/ I assume?
wuchengli 2014/08/06 08:14:58 Done.
wuchengli 2014/08/06 08:14:58 Done.
+ *
+ * Parameters:
+ * |instance| the plugin instance to which the callback is responding.
+ * |image_capture| the PPB_ImageCapture_Private resource.
+ * |sequence_id| The sequence ID of the image capture, same as the one from
+ * TakePhoto.
+ */
+ void OnShutter(
+ [in] PP_Instance instance,
+ [in] PP_Resource image_capture,
+ [in] int64_t sequence_id);
+
+ /**
+ * Callback function for <code>PPB_ImageCapture_Private.TakePhoto</code>.
+ * Called for the camera to deliver a postview picture. The client can use
+ * this to show the captured photo. The format and the size are decided
+ * by the associated MediaStream video tracks. Call
+ * <code>PPB_VideoFrame</code> functions to know the exact format and size.
+ *
+ * Parameters:
+ * |instance| the plugin instance to which the callback is responding.
+ * |image_capture| the PPB_ImageCapture_Private resource.
+ * |postview| A <code>PP_Resource</code> corresponding to a VideoFrame
+ * resource used to store the postview picture.
+ * |sequence_id| The sequence ID of the image capture, same as the one from
+ * TakePhoto.
+ */
+ void OnPostviewPicture(
+ [in] PP_Instance instance,
+ [in] PP_Resource image_capture,
+ [in] PP_Resource postview,
Pawel Osciak 2014/08/03 08:34:38 What's the format? How is this returned after use?
Justin Chuang 2014/08/03 10:46:45 The format should be similar to PPB_MediaStreamVid
wuchengli 2014/08/06 08:14:58 Several media stream video tracks can be associate
Justin Chuang 2014/08/07 03:34:46 Can you elaborate the relationship between the *Pr
+ [in] int64_t sequence_id);
+
+ /**
+ * Callback function for <code>PPB_ImageCapture_Private.TakePhoto</code>.
+ * Called for the camera to deliver a Jpeg picture.
+ *
+ * Parameters:
+ * |instance| the plugin instance to which the callback is responding.
+ * |image_capture| the PPB_ImageCapture_Private resource.
+ * |jpeg| A <code>PP_Resource</code> corresponding to a VideoFrame
+ * resource used to store the postview picture.
+ * |sequence_id| The sequence ID of the image capture, same as the one from
+ * TakePhoto.
+ */
+ void OnJpegPicture(
+ [in] PP_Instance instance,
+ [in] PP_Resource image_capture,
+ [in] PP_Resource jpeg,
+ [in] int64_t sequence_id);
+};

Powered by Google App Engine
This is Rietveld 408576698