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

Unified Diff: ppapi/cpp/video_encoder_client.h

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/cpp/video_encoder.cc ('k') | ppapi/cpp/video_encoder_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/video_encoder_client.h
diff --git a/ppapi/cpp/video_encoder_client.h b/ppapi/cpp/video_encoder_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..3163535b7be5e9ddeea68f63675632ae484c36e7
--- /dev/null
+++ b/ppapi/cpp/video_encoder_client.h
@@ -0,0 +1,38 @@
+// Copyright (c) 2012 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_CPP_VIDEO_ENCODER_CLIENT_H_
+#define PPAPI_CPP_VIDEO_ENCODER_CLIENT_H_
+
+#include "ppapi/c/pp_resource.h"
+#include "ppapi/c/ppp_video_encoder.h"
+#include "ppapi/c/ppp_video_encoder.h"
+#include "ppapi/cpp/instance_handle.h"
+
+namespace pp {
+
+class Instance;
+class VideoEncoder;
+
+// This class provides a C++ interface for callbacks related to video encoding.
+// It is the C++ counterpart to PPP_VideoEncoder.
+// You would normally use multiple inheritance to derive from this class in your
+// instance.
+class VideoEncoderClient {
+ public:
+ VideoEncoderClient(Instance* instance);
+ virtual ~VideoEncoderClient();
+
+ // Callback to notify about bitstream buffers.
+ virtual void HandleBitstreamBuffer(
+ VideoEncoder encoder,
+ const PP_VideoEncoderBitstreamBuffer& buffer) = 0;
+
+ private:
+ InstanceHandle associated_instance_;
+};
+
+} // namespace pp
+
+#endif // PPAPI_CPP_VIDEO_ENCODER_CLIENT_H_
« no previous file with comments | « ppapi/cpp/video_encoder.cc ('k') | ppapi/cpp/video_encoder_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698