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

Unified Diff: ppapi/api/ppp_video_encoder.idl

Issue 365153003: Pepper: add PPB_VideoEncoder interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update API to prevent the user from dealing with buffer management Created 6 years, 5 months 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
« no previous file with comments | « ppapi/api/ppb_video_encoder.idl ('k') | ppapi/c/ppb_video_encoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+};
« no previous file with comments | « ppapi/api/ppb_video_encoder.idl ('k') | ppapi/c/ppb_video_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698