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

Unified Diff: ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c

Issue 13461010: Add PP_VideoFrame, PPB_VideoReader, and PPB_VideoWriter APIs to Pepper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add new files to all_cpp_includes.h. Created 7 years, 9 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
Index: ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
diff --git a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
index 4f76f47d1fe1db3a7ea9fe5e38ff1d3d5072d352..053b8ac1771ebc92a21c3065c9b19807bc72b04f 100644
--- a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
+++ b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
@@ -69,6 +69,8 @@
#include "ppapi/c/ppb_url_response_info.h"
#include "ppapi/c/ppb_var.h"
#include "ppapi/c/ppb_var_array_buffer.h"
+#include "ppapi/c/ppb_video_reader.h"
+#include "ppapi/c/ppb_video_writer.h"
#include "ppapi/c/ppb_view.h"
#include "ppapi/c/ppb_websocket.h"
#include "ppapi/c/ppp_graphics_3d.h"
@@ -163,6 +165,8 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_URLResponseInfo_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Var_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Var_1_1;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VarArrayBuffer_1_0;
+static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VideoReader_1_0;
+static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VideoWriter_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_View_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_WebSocket_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_Graphics3D_1_0;
@@ -1127,6 +1131,74 @@ void Pnacl_M18_PPB_VarArrayBuffer_Unmap(struct PP_Var array) {
/* End wrapper methods for PPB_VarArrayBuffer_1_0 */
+/* Begin wrapper methods for PPB_VideoReader_1_0 */
+
+static __attribute__((pnaclcall))
+PP_Resource Pnacl_M28_PPB_VideoReader_Create(PP_Instance instance) {
+ const struct PPB_VideoReader_1_0 *iface = Pnacl_WrapperInfo_PPB_VideoReader_1_0.real_iface;
+ return iface->Create(instance);
+}
+
+static __attribute__((pnaclcall))
+PP_Bool Pnacl_M28_PPB_VideoReader_IsVideoReader(PP_Resource resource) {
+ const struct PPB_VideoReader_1_0 *iface = Pnacl_WrapperInfo_PPB_VideoReader_1_0.real_iface;
+ return iface->IsVideoReader(resource);
+}
+
+static __attribute__((pnaclcall))
+int32_t Pnacl_M28_PPB_VideoReader_Open(PP_Resource reader, struct PP_Var stream_id, struct PP_CompletionCallback callback) {
+ const struct PPB_VideoReader_1_0 *iface = Pnacl_WrapperInfo_PPB_VideoReader_1_0.real_iface;
+ return iface->Open(reader, stream_id, callback);
+}
+
+static __attribute__((pnaclcall))
+int32_t Pnacl_M28_PPB_VideoReader_GetNextFrame(PP_Resource reader, struct PP_VideoFrame* frame, struct PP_CompletionCallback callback) {
+ const struct PPB_VideoReader_1_0 *iface = Pnacl_WrapperInfo_PPB_VideoReader_1_0.real_iface;
+ return iface->GetNextFrame(reader, frame, callback);
+}
+
+static __attribute__((pnaclcall))
+void Pnacl_M28_PPB_VideoReader_Close(PP_Resource reader) {
+ const struct PPB_VideoReader_1_0 *iface = Pnacl_WrapperInfo_PPB_VideoReader_1_0.real_iface;
+ iface->Close(reader);
+}
+
+/* End wrapper methods for PPB_VideoReader_1_0 */
+
+/* Begin wrapper methods for PPB_VideoWriter_1_0 */
+
+static __attribute__((pnaclcall))
+PP_Resource Pnacl_M28_PPB_VideoWriter_Create(PP_Instance instance) {
+ const struct PPB_VideoWriter_1_0 *iface = Pnacl_WrapperInfo_PPB_VideoWriter_1_0.real_iface;
+ return iface->Create(instance);
+}
+
+static __attribute__((pnaclcall))
+PP_Bool Pnacl_M28_PPB_VideoWriter_IsVideoWriter(PP_Resource resource) {
+ const struct PPB_VideoWriter_1_0 *iface = Pnacl_WrapperInfo_PPB_VideoWriter_1_0.real_iface;
+ return iface->IsVideoWriter(resource);
+}
+
+static __attribute__((pnaclcall))
+int32_t Pnacl_M28_PPB_VideoWriter_Open(PP_Resource writer, struct PP_Var stream_id, struct PP_CompletionCallback callback) {
+ const struct PPB_VideoWriter_1_0 *iface = Pnacl_WrapperInfo_PPB_VideoWriter_1_0.real_iface;
+ return iface->Open(writer, stream_id, callback);
+}
+
+static __attribute__((pnaclcall))
+int32_t Pnacl_M28_PPB_VideoWriter_PutNextFrame(PP_Resource writer, const struct PP_VideoFrame* frame) {
+ const struct PPB_VideoWriter_1_0 *iface = Pnacl_WrapperInfo_PPB_VideoWriter_1_0.real_iface;
+ return iface->PutNextFrame(writer, frame);
+}
+
+static __attribute__((pnaclcall))
+void Pnacl_M28_PPB_VideoWriter_Close(PP_Resource writer) {
+ const struct PPB_VideoWriter_1_0 *iface = Pnacl_WrapperInfo_PPB_VideoWriter_1_0.real_iface;
+ iface->Close(writer);
+}
+
+/* End wrapper methods for PPB_VideoWriter_1_0 */
+
/* Not generating wrapper methods for PPB_View_1_0 */
/* Begin wrapper methods for PPB_WebSocket_1_0 */
@@ -4011,6 +4083,22 @@ struct PPB_VarArrayBuffer_1_0 Pnacl_Wrappers_PPB_VarArrayBuffer_1_0 = {
.Unmap = (void (*)(struct PP_Var array))&Pnacl_M18_PPB_VarArrayBuffer_Unmap
};
+struct PPB_VideoReader_1_0 Pnacl_Wrappers_PPB_VideoReader_1_0 = {
+ .Create = (PP_Resource (*)(PP_Instance instance))&Pnacl_M28_PPB_VideoReader_Create,
+ .IsVideoReader = (PP_Bool (*)(PP_Resource resource))&Pnacl_M28_PPB_VideoReader_IsVideoReader,
+ .Open = (int32_t (*)(PP_Resource reader, struct PP_Var stream_id, struct PP_CompletionCallback callback))&Pnacl_M28_PPB_VideoReader_Open,
+ .GetNextFrame = (int32_t (*)(PP_Resource reader, struct PP_VideoFrame* frame, struct PP_CompletionCallback callback))&Pnacl_M28_PPB_VideoReader_GetNextFrame,
+ .Close = (void (*)(PP_Resource reader))&Pnacl_M28_PPB_VideoReader_Close
+};
+
+struct PPB_VideoWriter_1_0 Pnacl_Wrappers_PPB_VideoWriter_1_0 = {
+ .Create = (PP_Resource (*)(PP_Instance instance))&Pnacl_M28_PPB_VideoWriter_Create,
+ .IsVideoWriter = (PP_Bool (*)(PP_Resource resource))&Pnacl_M28_PPB_VideoWriter_IsVideoWriter,
+ .Open = (int32_t (*)(PP_Resource writer, struct PP_Var stream_id, struct PP_CompletionCallback callback))&Pnacl_M28_PPB_VideoWriter_Open,
+ .PutNextFrame = (int32_t (*)(PP_Resource writer, const struct PP_VideoFrame* frame))&Pnacl_M28_PPB_VideoWriter_PutNextFrame,
+ .Close = (void (*)(PP_Resource writer))&Pnacl_M28_PPB_VideoWriter_Close
+};
+
/* Not generating wrapper interface for PPB_View_1_0 */
struct PPB_WebSocket_1_0 Pnacl_Wrappers_PPB_WebSocket_1_0 = {
@@ -4871,6 +4959,18 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VarArrayBuffer_1_0 = {
.real_iface = NULL
};
+static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VideoReader_1_0 = {
+ .iface_macro = PPB_VIDEOREADER_INTERFACE_1_0,
+ .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_VideoReader_1_0,
+ .real_iface = NULL
+};
+
+static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VideoWriter_1_0 = {
+ .iface_macro = PPB_VIDEOWRITER_INTERFACE_1_0,
+ .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_VideoWriter_1_0,
+ .real_iface = NULL
+};
+
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_View_1_0 = {
.iface_macro = PPB_VIEW_INTERFACE_1_0,
.wrapped_iface = NULL /* Still need slot for real_iface */,
@@ -5575,6 +5675,8 @@ static struct __PnaclWrapperInfo *s_ppb_wrappers[] = {
&Pnacl_WrapperInfo_PPB_Var_1_0,
&Pnacl_WrapperInfo_PPB_Var_1_1,
&Pnacl_WrapperInfo_PPB_VarArrayBuffer_1_0,
+ &Pnacl_WrapperInfo_PPB_VideoReader_1_0,
+ &Pnacl_WrapperInfo_PPB_VideoWriter_1_0,
&Pnacl_WrapperInfo_PPB_View_1_0,
&Pnacl_WrapperInfo_PPB_WebSocket_1_0,
&Pnacl_WrapperInfo_PPB_AudioTrusted_0_6,
« ppapi/cpp/video.h ('K') | « ppapi/cpp/video.cc ('k') | ppapi/ppapi_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698