Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / ppapi / api / ppb_video_decoder.idl
index b450633..848543c 100644 (file)
@@ -10,7 +10,9 @@
 [generate_thunk]
 
 label Chrome {
-  [channel=dev] M36 = 0.1
+  /** Though not labeled 'channel=dev', 0.1 is a still a 'Dev' only API. */
+  M36 = 0.1,
+  M39 = 0.2
 };
 
 /**
@@ -90,6 +92,34 @@ interface PPB_VideoDecoder {
       [in] PP_CompletionCallback callback);
 
   /**
+   * Initializes a video decoder resource. This should be called after Create()
+   * and before any other functions.
+   *
+   * @param[in] video_decoder A <code>PP_Resource</code> identifying the video
+   * decoder.
+   * @param[in] graphics3d_context A <code>PPB_Graphics3D</code> resource to use
+   * during decoding.
+   * @param[in] profile A <code>PP_VideoProfile</code> specifying the video
+   * codec profile.
+   * @param[in] acceleration A <code>PP_HardwareAcceleration</code> specifying
+   * whether to use a hardware accelerated or a software implementation.
+   * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
+   * completion.
+   *
+   * @return An int32_t containing an error code from <code>pp_errors.h</code>.
+   * Returns PP_ERROR_NOTSUPPORTED if video decoding is not available, or the
+   * requested profile is not supported. In this case, the client may call
+   * Initialize() again with different parameters to find a good configuration.
+   */
+  [version = 0.2]
+  int32_t Initialize(
+      [in] PP_Resource video_decoder,
+      [in] PP_Resource graphics3d_context,
+      [in] PP_VideoProfile profile,
+      [in] PP_HardwareAcceleration acceleration,
+      [in] PP_CompletionCallback callback);
+
+  /**
    * Decodes a bitstream buffer. Copies |size| bytes of data from the plugin's
    * |buffer|. The plugin should wait until the decoder signals completion by
    * returning PP_OK or by running |callback| before calling Decode() again.