Index: ppapi/api/ppp_video_encoder.idl |
diff --git a/ppapi/api/ppp_video_encoder.idl b/ppapi/api/ppp_video_encoder.idl |
new file mode 100644 |
index 0000000000000000000000000000000000000000..54e70236cf43205148bac56d21f4601d1f387a7c |
--- /dev/null |
+++ b/ppapi/api/ppp_video_encoder.idl |
@@ -0,0 +1,62 @@ |
+/* 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 API for receiving video bitstream buffers from the |
+ * browser's video encoder. |
+ */ |
+ |
+label Chrome { |
+ [channel=dev] M37 = 0.1 |
+}; |
+ |
+/** |
+ * Struct describing a video bitstream buffer. The plugin can determine which |
+ * Encode call generated the buffer using |encode_id|. |
+ */ |
+struct PP_VideoEncoderBitstreamBuffer { |
+ /** |
+ * |encode_id| parameter of the Encode call on the <code>PPB_VideoEncoder</code> |
+ * interface which generated this buffer. |
+ */ |
+ uint32_t encode_id; |
+ |
+ /** |
+ * Start address of buffer. |
+ */ |
+ mem_t buffer; |
+ |
+ /** |
+ * Buffer size in bytes. |
+ */ |
+ uint32_t size; |
+ |
+ /** |
+ * Whether the buffer contains a key frame. |
+ */ |
+ PP_Bool key_frame; |
+}; |
+ |
+[macro="PPP_VIDEOENCODER_INTERFACE"] |
+interface PPP_VideoEncoder { |
+ /** |
+ * Function for receiving bitstream buffers. |
+ * |
+ * In order to receive bitstream, you must register for them by calling |
+ * PPB_InputEvent.RequestInputEvents() or RequestFilteringInputEvents(). By |
+ * default, no events are delivered. |
+ * |
+ * @param[in] instance A <code>PP_Instance</code> identifying one instance |
+ * of a module. |
+ * @param[in] encoder A <code>PP_Resource</code> identifying the encoder |
+ * resource that produced the |buffer|. |
+ * @param[in] biffer A <code>PP_VideoEncoderBitstreamBuffer> containing the |
+ * encoder video stream. |
+ */ |
+ void HandleBitstreamBuffer( |
+ [in] PP_Instance instance, |
+ [in] PP_Resource encoder, |
+ [in] PP_VideoEncoderBitstreamBuffer buffer); |
+}; |