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_ |