Index: ppapi/c/ppp_video_encoder.h |
diff --git a/ppapi/c/ppp_video_encoder.h b/ppapi/c/ppp_video_encoder.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5642466afe3ab8f5c151c36836032ae177e1b6a6 |
--- /dev/null |
+++ b/ppapi/c/ppp_video_encoder.h |
@@ -0,0 +1,86 @@ |
+/* 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. |
+ */ |
+ |
+/* From ppp_video_encoder.idl modified Mon Jul 14 13:52:37 2014. */ |
+ |
+#ifndef PPAPI_C_PPP_VIDEO_ENCODER_H_ |
+#define PPAPI_C_PPP_VIDEO_ENCODER_H_ |
+ |
+#include "ppapi/c/pp_bool.h" |
+#include "ppapi/c/pp_instance.h" |
+#include "ppapi/c/pp_macros.h" |
+#include "ppapi/c/pp_resource.h" |
+#include "ppapi/c/pp_stdint.h" |
+ |
+#define PPP_VIDEOENCODER_INTERFACE_0_1 "PPP_VideoEncoder;0.1" /* dev */ |
+/** |
+ * @file |
+ * This file defines the API for receiving video bitstream buffers from the |
+ * browser's video encoder. |
+ */ |
+ |
+ |
+/** |
+ * @addtogroup Structs |
+ * @{ |
+ */ |
+/** |
+ * Struct describing a video bitstream buffer. The plugin can determine which |
+ * Encode call generated the buffer using |encode_id|. |
+ */ |
+struct PP_VideoEncoderBitstreamBuffer { /* dev */ |
+ /** |
+ * |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. |
+ */ |
+ void* buffer; |
+ /** |
+ * Buffer size in bytes. |
+ */ |
+ uint32_t size; |
+ /** |
+ * Whether the buffer contains a key frame. |
+ */ |
+ PP_Bool key_frame; |
+}; |
+/** |
+ * @} |
+ */ |
+ |
+/** |
+ * @addtogroup Interfaces |
+ * @{ |
+ */ |
+struct PPP_VideoEncoder_0_1 { /* dev */ |
+ /** |
+ * 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)( |
+ PP_Instance instance, |
+ PP_Resource encoder, |
+ const struct PP_VideoEncoderBitstreamBuffer* buffer); |
+}; |
+/** |
+ * @} |
+ */ |
+ |
+#endif /* PPAPI_C_PPP_VIDEO_ENCODER_H_ */ |
+ |