summaryrefslogtreecommitdiffstats
path: root/ppapi/api
diff options
context:
space:
mode:
authorjchuang <jchuang@chromium.org>2015-02-05 10:00:59 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-05 18:01:55 +0000
commite04cb0a6d89e5757d05e663a264e4059c0197e83 (patch)
tree9a09ee1fe441280c5d624462e5de406968987de3 /ppapi/api
parentb8fc9d2f40acbfc24ce00a6e139b61c6e6b0740e (diff)
downloadchromium_src-e04cb0a6d89e5757d05e663a264e4059c0197e83.zip
chromium_src-e04cb0a6d89e5757d05e663a264e4059c0197e83.tar.gz
chromium_src-e04cb0a6d89e5757d05e663a264e4059c0197e83.tar.bz2
Image Capture PPAPI: remove unused APIs
1. Remove ppb_image_capture_config_private. 2. Remove PPB_ImageCapture_Private.{Set|Get}Config 3. Remove PPB_ImageCapture_Private.CaptureStillImage BUG=387547 TEST=None Review URL: https://codereview.chromium.org/884483007 Cr-Commit-Position: refs/heads/master@{#314834}
Diffstat (limited to 'ppapi/api')
-rw-r--r--ppapi/api/private/ppb_image_capture_config_private.idl101
-rw-r--r--ppapi/api/private/ppb_image_capture_private.idl175
2 files changed, 5 insertions, 271 deletions
diff --git a/ppapi/api/private/ppb_image_capture_config_private.idl b/ppapi/api/private/ppb_image_capture_config_private.idl
deleted file mode 100644
index 95bded3..0000000
--- a/ppapi/api/private/ppb_image_capture_config_private.idl
+++ /dev/null
@@ -1,101 +0,0 @@
-/* Copyright 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 PPB_ImageCaptureConfig_Private interface for
- * establishing an image capture configuration resource within the browser.
- */
-
-[generate_thunk]
-
-label Chrome {
- M39 = 0.1
-};
-
-/**
- * The <code>PPB_ImageCaptureConfig_Private</code> interface contains pointers
- * to several functions for establishing image capture configuration within the
- * browser. The new configuration will take effect after <code>
- * PPB_ImageCapture_Private.SetConfig</code> is called.
- */
-[version=0.1]
-interface PPB_ImageCaptureConfig_Private {
- /**
- * Creates a PPB_ImageCaptureConfig_Private resource.
- *
- * @param[in] instance A <code>PP_Instance</code> identifying one instance of
- * a module.
- *
- * @return A <code>PP_Resource</code> corresponding to a
- * PPB_ImageCaptureConfig_Private resource if successful, 0 if failed.
- */
- PP_Resource Create([in] PP_Instance instance);
-
- /**
- * IsImageCaptureConfig() determines if the given resource is a
- * <code>PPB_ImageCaptureConfig_Private</code>.
- *
- * @param[in] resource A <code>PP_Resource</code> corresponding to an image
- * capture config resource.
- *
- * @return A <code>PP_Bool</code> containing <code>PP_TRUE</code> if the given
- * resource is an <code>ImageCaptureConfig_Private</code> resource, otherwise
- * <code>PP_FALSE</code>.
- */
- PP_Bool IsImageCaptureConfig(
- [in] PP_Resource resource);
-
- /**
- * GetPreviewSize() returns the preview image size in pixels for the given
- * <code>PPB_ImageCaptureConfig_Private</code>.
- *
- * @param[in] config A <code>PP_Resource</code> corresponding to an image
- * capture config resource.
- * @param[out] preview_size A <code>PP_Size</code> that indicates the
- * requested preview image size.
- */
- void GetPreviewSize(
- [in] PP_Resource config,
- [out] PP_Size preview_size);
-
- /**
- * SetPreviewSize() sets the preview image size for the given <code>
- * PPB_ImageCaptureConfig_Private</code>.
- *
- * @param[in] config A <code>PP_Resource</code> corresponding to a
- * <code>PPB_ImageCaptureConfig_Private</code>.
- * @param[in] preview_size A <code>PP_Size</code> that indicates the requested
- * preview image size.
- */
- void SetPreviewSize(
- [in] PP_Resource config,
- [in] PP_Size preview_size);
-
- /**
- * GetJpegSize() returns the JPEG image size in pixels for the given
- * <code>PPB_ImageCaptureConfig_Private</code>.
- *
- * @param[in] config A <code>PP_Resource</code> corresponding to an image
- * capture config resource.
- * @param[out] jpeg_size A <code>PP_Size</code> that indicates the current
- * JPEG image size.
- */
- void GetJpegSize(
- [in] PP_Resource config,
- [out] PP_Size jpeg_size);
-
- /**
- * SetJpegSize() sets the JPEG image size for the given
- * <code>PPB_ImageCaptureConfig_Private</code>.
- *
- * @param[in] config A <code>PP_Resource</code> corresponding to a
- * <code>PPB_ImageCaptureConfig_Private</code>.
- * @param[in] jpeg_size A <code>PP_Size</code> that indicates the requested
- * JPEG image size.
- */
- void SetJpegSize(
- [in] PP_Resource config,
- [in] PP_Size jpeg_size);
-};
diff --git a/ppapi/api/private/ppb_image_capture_private.idl b/ppapi/api/private/ppb_image_capture_private.idl
index 28432af..36c410f 100644
--- a/ppapi/api/private/ppb_image_capture_private.idl
+++ b/ppapi/api/private/ppb_image_capture_private.idl
@@ -15,86 +15,12 @@ label Chrome {
};
/**
- * Callback function for <code>PPB_ImageCapture_Private.CaptureStillImage
- * </code> to indicate the image has been captured from the sensor. This is a
- * good opportunity to play a shutter sound or give other feedback of camera
- * operation. This will occur after the image was captured, but before the
- * actual data is available.
- *
- * Parameters:
- * |user_data| The same pointer that was passed into <code>
- * PPB_ImageCapture_Private.Create()</code>.
- * |sequence_id| The sequence ID of the image capture, same as the one from
- * CaptureStillImage.
- */
-typedef void PPB_ImageCapture_Private_ShutterCallback(
- [inout] mem_t user_data,
- [in] int64_t sequence_id);
-
-/**
- * Callback function for <code>PPB_ImageCapture_Private.CaptureStillImage
- * </code> to deliver a preview image. The client can use this to show the
- * captured image. See <code>PPB_ImageCapture_Private.CaptureStillImage
- * </code> for more information.
- *
- * Parameters:
- * |user_data| The same pointer that was passed into <code>
- * PPB_ImageCapture_Private.Create()</code>.
- * |sequence_id| The sequence ID of the image capture, same as the one from
- * CaptureStillImage.
- * |preview| A <code>PP_Resource</code> corresponding to a VideoFrame
- * resource used to store the preview image.
- */
-typedef void PPB_ImageCapture_Private_PreviewCallback(
- [inout] mem_t user_data,
- [in] int64_t sequence_id,
- [in] PP_Resource preview);
-
-/**
- * Callback function for <code>PPB_ImageCapture_Private.CaptureStillImage
- * </code> to deliver a still JPEG image. See <code>
- * PPB_ImageCapture_Private.CaptureStillImage</code> for more information.
- *
- * Parameters:
- * |user_data| The same pointer that was passed into <code>
- * PPB_ImageCapture_Private.Create()</code>.
- * |sequence_id| The sequence ID of the image capture, same as the one from
- * CaptureStillImage.
- * |jpeg| A <code>PP_Resource</code> corresponding to a VideoFrame
- * resource used to store the JPEG image.
- */
-typedef void PPB_ImageCapture_Private_JpegCallback(
- [inout] mem_t user_data,
- [in] int64_t sequence_id,
- [in] PP_Resource jpeg);
-
-/**
- * Callback function for <code>PPB_ImageCapture_Private.CaptureStillImage
- * </code> to indicate the image capture has failed.
- *
- * Parameters:
- * |user_data| The same pointer that was passed into <code>
- * PPB_ImageCapture_Private.Create()</code>.
- * |sequence_id| The sequence ID of the image capture, same as the one from
- * CaptureStillImage.
- * |int32_t| An error code from <code>pp_errors.h</code>.
- */
-typedef void PPB_ImageCapture_Private_ErrorCallback(
- [inout] mem_t user_data,
- [in] int64_t sequence_id,
- [in] int32_t pp_error);
-
-/**
- * To capture a still image with this class, use the following steps.
+ * To query camera capabilities:
* 1. Get a PPB_ImageCapture_Private object by Create().
- * 2. Call GetCameraCapabilities to get the supported preview sizes.
- * 3. For optimal performance, set one of the supported preview size as the
- * constraints of getUserMedia. Use the created MediaStreamVideoTrack for
- * camera previews.
- * 4. Set the same preview size and other settings by SetConfig.
- * 5. Call CaptureStillImage to capture a still image. Play the shutter sound in
- * the shutter callback. The image from the preview callback can be used for
- * display. JPEG image will be returned to the JPEG callback.
+ * 2. Open() camera device with track id of MediaStream video track.
+ * 3. Call GetCameraCapabilities() to get a
+ * <code>PPB_CameraCapabilities_Private</code> object, which can be used to
+ * query camera capabilities.
*/
interface PPB_ImageCapture_Private {
/**
@@ -117,7 +43,6 @@ interface PPB_ImageCapture_Private {
*/
PP_Resource Create([in] PP_Instance instance,
[in] PP_Var camera_source_id,
- [in] PPB_ImageCapture_Private_ErrorCallback error_callback,
[inout] mem_t user_data);
/**
@@ -149,42 +74,6 @@ interface PPB_ImageCapture_Private {
[in] PP_CompletionCallback callback);
/**
- * Sets the configuration of the image capture.
- * If <code>SetConfig()</code> is not called, default settings will be used.
- *
- * @param[in] image_capture A <code>PP_Resource</code> corresponding to an
- * image capture resource.
- * @param[in] config A <code>PP_ImageCaptureConfig_Private</code> object.
- * @param[in] callback <code>PP_CompletionCallback</code> to be called upon
- * completion of <code>SetConfig()</code>.
- *
- * @return An int32_t containing a result code from <code>pp_errors.h</code>.
- * Returns <code>PP_ERROR_INPROGRESS</code> if there is a pending call of
- * <code>SetConfig()</code> or <code>CaptureStillImage()</code>.
- * If an error is returned, the configuration will not be changed.
- */
- int32_t SetConfig([in] PP_Resource image_capture,
- [in] PP_Resource config,
- [in] PP_CompletionCallback callback);
-
- /**
- * Gets the configuration of the image capture.
- *
- * @param[in] image_capture A <code>PP_Resource</code> corresponding to an
- * image capture resource.
- * @param[out] config A <code>PP_ImageCaptureConfig_Private</code> for storing
- * the current image capture config on success. Otherwise, the values will not
- * be changed.
- * @param[in] callback <code>PP_CompletionCallback</code> to be called upon
- * completion of <code>GetConfig()</code>.
- *
- * @return An int32_t containing a result code from <code>pp_errors.h</code>.
- */
- int32_t GetConfig([in] PP_Resource image_capture,
- [out] PP_Resource config,
- [in] PP_CompletionCallback callback);
-
- /**
* Gets the camera capabilities.
*
* The camera capabilities do not change for a given camera source.
@@ -202,58 +91,4 @@ interface PPB_ImageCapture_Private {
int32_t GetCameraCapabilities([in] PP_Resource image_capture,
[out] PP_Resource capabilities,
[in] PP_CompletionCallback callback);
-
- /**
- * Captures a still JPEG image from the camera.
- *
- * Triggers an asynchronous image capture. The camera will initiate a series
- * of callbacks to the application as the image capture progresses. The
- * callbacks will be invoked in the order of shutter callback, preview
- * callback, and JPEG callback. The shutter callback occurs after the image is
- * captured. This can be used to trigger a sound to let the user know that
- * image has been captured. The preview callback occurs when a scaled, fully
- * processed preview image is available. The JPEG callback occurs when the
- * compressed image is available. If there is an error after the capture is in
- * progress, the error callback passed to <code>
- * PPB_ImageCapture_Private.Create()</code> will be invoked. All the callbacks
- * are invoked by the thread that calls this function.
- *
- * The size of the preview image in preview callback is determined by
- * <code>PPB_ImageCaptureConfig_Private.SetPreviewSize</code>. The format is
- * decided by the camera and can be got from <code>PPB_VideoFrame.GetFormat
- * </code>. The size of the JPEG image is determined by <code>
- * PPB_ImageCaptureConfig_Private.SetJpegSize</code>.
- *
- * The camera may need to stop and re-start streaming during image capture. If
- * some MediaStreamVideoTrack are associated with the camera source, they will
- * receive mute and unmute events. The mute event will be received before all
- * the callbacks. The unmute event will be received after all the callbacks.
- * The preview image will not be sent to the video tracks associated with the
- * camera.
- *
- * @param[in] image_capture A <code>PP_Resource</code> corresponding to an
- * image capture resource.
- * @param[in] shutter_callback A <code>
- * PPB_ImageCapture_Private_ShutterCallback</code> callback to indicate the
- * image has been taken.
- * @param[in] preview_callback A <code>
- * PPB_ImageCapture_Private_PreviewCallback</code> callback to return a
- * preview of the captured image.
- * @param[in] jpeg_callback A <code>
- * PPB_ImageCapture_Private_JpegCallback</code> callback to return captured
- * JPEG image.
- * @param[out] sequence_id The sequence ID is a unique monotonically
- * increasing value starting from 0, incremented every time a new request like
- * image capture is submitted.
- *
- * @return An int32_t containing a result code from <code>pp_errors.h</code>.
- * PP_OK means the callbacks will be triggered. Other values mean the
- * callbacks will not be triggered.
- */
- int32_t CaptureStillImage(
- [in] PP_Resource image_capture,
- [in] PPB_ImageCapture_Private_ShutterCallback shutter_callback,
- [in] PPB_ImageCapture_Private_PreviewCallback preview_callback,
- [in] PPB_ImageCapture_Private_JpegCallback jpeg_callback,
- [out] int64_t sequence_id);
};