summaryrefslogtreecommitdiffstats
path: root/ppapi/thunk
diff options
context:
space:
mode:
authorlionel.g.landwerlin <lionel.g.landwerlin@intel.com>2015-02-06 04:15:23 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-06 12:16:54 +0000
commit377c2e7f1c22253804a1aa3810a687a31c493757 (patch)
tree9705706eaf544a1da3c352eea694956de1e0706c /ppapi/thunk
parent1ae0930d2a6f0c8ecfe6bf60bbd2140303b122a2 (diff)
downloadchromium_src-377c2e7f1c22253804a1aa3810a687a31c493757.zip
chromium_src-377c2e7f1c22253804a1aa3810a687a31c493757.tar.gz
chromium_src-377c2e7f1c22253804a1aa3810a687a31c493757.tar.bz2
ppapi: VideoEncoder: Add proxy boilerplate
BUG=455409 TEST=none Review URL: https://codereview.chromium.org/887223009 Cr-Commit-Position: refs/heads/master@{#315007}
Diffstat (limited to 'ppapi/thunk')
-rw-r--r--ppapi/thunk/interfaces_ppb_public_dev_channel.h1
-rw-r--r--ppapi/thunk/ppb_video_encoder_api.h53
-rw-r--r--ppapi/thunk/resource_creation_api.h1
3 files changed, 55 insertions, 0 deletions
diff --git a/ppapi/thunk/interfaces_ppb_public_dev_channel.h b/ppapi/thunk/interfaces_ppb_public_dev_channel.h
index a91d112..8899206 100644
--- a/ppapi/thunk/interfaces_ppb_public_dev_channel.h
+++ b/ppapi/thunk/interfaces_ppb_public_dev_channel.h
@@ -14,6 +14,7 @@ PROXIED_IFACE(PPB_FILEMAPPING_INTERFACE_0_1, PPB_FileMapping_0_1)
PROXIED_IFACE(PPB_MESSAGING_INTERFACE_1_1_DEPRECATED,
PPB_Messaging_1_1_Deprecated)
PROXIED_IFACE(PPB_VIDEODECODER_INTERFACE_0_1, PPB_VideoDecoder_0_1)
+PROXIED_IFACE(PPB_VIDEOENCODER_INTERFACE_0_1, PPB_VideoEncoder_0_1)
// Note, PPB_TraceEvent is special. We don't want to actually make it stable,
// but we want developers to be able to leverage it when running Chrome Dev or
diff --git a/ppapi/thunk/ppb_video_encoder_api.h b/ppapi/thunk/ppb_video_encoder_api.h
new file mode 100644
index 0000000..7050d6a
--- /dev/null
+++ b/ppapi/thunk/ppb_video_encoder_api.h
@@ -0,0 +1,53 @@
+// Copyright 2015 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.
+
+#ifndef PPAPI_THUNK_PPB_VIDEO_ENCODER_API_H_
+#define PPAPI_THUNK_PPB_VIDEO_ENCODER_API_H_
+
+#include "ppapi/c/pp_codecs.h"
+#include "ppapi/c/ppb_video_encoder.h"
+#include "ppapi/thunk/ppapi_thunk_export.h"
+
+namespace ppapi {
+
+class TrackedCallback;
+
+namespace thunk {
+
+class PPAPI_THUNK_EXPORT PPB_VideoEncoder_API {
+ public:
+ virtual ~PPB_VideoEncoder_API() {}
+
+ virtual int32_t GetSupportedProfiles(
+ const PP_ArrayOutput& output,
+ const scoped_refptr<TrackedCallback>& callback) = 0;
+ virtual int32_t Initialize(
+ PP_VideoFrame_Format input_format,
+ const PP_Size* input_visible_size,
+ PP_VideoProfile output_profile,
+ uint32_t initial_bitrate,
+ PP_HardwareAcceleration acceleration,
+ const scoped_refptr<TrackedCallback>& callback) = 0;
+ virtual int32_t GetFramesRequired() = 0;
+ virtual int32_t GetFrameCodedSize(PP_Size* size) = 0;
+ virtual int32_t GetVideoFrame(
+ PP_Resource* video_frame,
+ const scoped_refptr<TrackedCallback>& callback) = 0;
+ virtual int32_t Encode(PP_Resource video_frame,
+ PP_Bool force_keyframe,
+ const scoped_refptr<TrackedCallback>& callback) = 0;
+ virtual int32_t GetBitstreamBuffer(
+ PP_BitstreamBuffer* bitstream_buffer,
+ const scoped_refptr<TrackedCallback>& callback) = 0;
+ virtual void RecycleBitstreamBuffer(
+ const PP_BitstreamBuffer* bitstream_buffer) = 0;
+ virtual void RequestEncodingParametersChange(uint32_t bitrate,
+ uint32_t framerate) = 0;
+ virtual void Close() = 0;
+};
+
+} // namespace thunk
+} // namespace ppapi
+
+#endif // PPAPI_THUNK_PPB_VIDEO_ENCODER_API_H_
diff --git a/ppapi/thunk/resource_creation_api.h b/ppapi/thunk/resource_creation_api.h
index 11dcc82..fa2a781 100644
--- a/ppapi/thunk/resource_creation_api.h
+++ b/ppapi/thunk/resource_creation_api.h
@@ -171,6 +171,7 @@ class ResourceCreationAPI {
virtual PP_Resource CreateUDPSocketPrivate(PP_Instance instace) = 0;
virtual PP_Resource CreateVideoDecoder(PP_Instance instance) = 0;
virtual PP_Resource CreateVideoDestination(PP_Instance instance) = 0;
+ virtual PP_Resource CreateVideoEncoder(PP_Instance instance) = 0;
virtual PP_Resource CreateVideoSource(PP_Instance instance) = 0;
virtual PP_Resource CreateWebSocket(PP_Instance instance) = 0;
virtual PP_Resource CreateX509CertificatePrivate(PP_Instance instance) = 0;