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

Unified Diff: ppapi/api/ppb_video_decoder.idl

Issue 703753002: Pepper: Expose visible_rect to PPB_VideoDecoder.GetPicture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/ppb_video_decoder.idl
diff --git a/ppapi/api/ppb_video_decoder.idl b/ppapi/api/ppb_video_decoder.idl
index 848543c10f3b5de5b93a29b414e4b7837ee28834..078f5493b9e698f40e73e3f07bf6190db79c690d 100644
--- a/ppapi/api/ppb_video_decoder.idl
+++ b/ppapi/api/ppb_video_decoder.idl
@@ -12,7 +12,8 @@
label Chrome {
/** Though not labeled 'channel=dev', 0.1 is a still a 'Dev' only API. */
M36 = 0.1,
- M39 = 0.2
+ M39 = 0.2,
+ M40 = 0.3
dmichael (off chromium) 2014/11/05 19:28:08 What do you think about calling this one 1.0?
bbudge 2014/11/05 22:41:48 A little gun-shy now, but OK. Done.
};
/**
@@ -186,6 +187,37 @@ interface PPB_VideoDecoder {
[in] PP_CompletionCallback callback);
/**
+ * Gets the next picture from the decoder. The picture is valid after the
+ * decoder signals completion by returning PP_OK or running |callback|. The
+ * plugin can call GetPicture() again after the decoder signals completion.
+ * When the plugin is finished using the picture, it should return it to the
+ * system by calling RecyclePicture().
+ *
+ * @param[in] video_decoder A <code>PP_Resource</code> identifying the video
+ * decoder.
+ * @param[out] picture A <code>PP_VideoPicture</code> to hold the decoded
+ * picture.
+ * @param[out] visible_rect A <code>PP_Rect</code> to hold the visible
+ * subrectangle of the picture. The plugin should only display the visible
+ * area of the picture.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to be called on
+ * completion.
+ *
+ * @return An int32_t containing an error code from <code>pp_errors.h</code>.
+ * Returns PP_ERROR_FAILED if the decoder isn't initialized or if a Reset()
+ * call is pending.
+ * Returns PP_ERROR_INPROGRESS if there is another GetPicture() call pending.
+ * Returns PP_ERROR_ABORTED when Reset() is called, or if a call to Flush()
+ * completes while GetPicture() is pending.
+ */
+ [version = 0.3]
+ int32_t GetPicture(
+ [in] PP_Resource video_decoder,
+ [out] PP_VideoPicture picture,
+ [out] PP_Rect visible_rect,
+ [in] PP_CompletionCallback callback);
+
+ /**
* Recycles a picture that the plugin has received from the decoder.
* The plugin should call this as soon as it has finished using the texture so
* the decoder can decode more pictures.

Powered by Google App Engine
This is Rietveld 408576698