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

Unified Diff: webkit/media/crypto/ppapi/video_frame.h

Issue 10899021: Add CDM video decoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Maybe sorta could work... Created 8 years, 2 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: webkit/media/crypto/ppapi/video_frame.h
diff --git a/webkit/media/crypto/ppapi/video_frame.h b/webkit/media/crypto/ppapi/video_frame.h
new file mode 100644
index 0000000000000000000000000000000000000000..e05ded8d4512d87e0396eae50a10643edcff388e
--- /dev/null
+++ b/webkit/media/crypto/ppapi/video_frame.h
@@ -0,0 +1,52 @@
+// 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 WEBKIT_MEDIA_CRYPTO_PPAPI_VIDEO_FRAME_H_
+#define WEBKIT_MEDIA_CRYPTO_PPAPI_VIDEO_FRAME_H_
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "webkit/media/crypto/ppapi/content_decryption_module.h"
+
+namespace webkit_media {
+
+class VideoFrame {
ddorwin 2012/10/13 03:54:42 What is the purpose of this class?
Tom Finegan 2012/10/13 23:47:26 If you meant, "where's the comment", done. Other
+ public:
+ ~VideoFrame();
+ // Returns a pointer to VideoFrame of the specified |format| and |size|.
+ // Returns NULL on failure.
+ static VideoFrame* Create(cdm::Allocator* allocator,
+ cdm::VideoFormat format,
+ const cdm::Size& size,
+ int64_t timestamp);
ddorwin 2012/10/13 03:54:42 timestamp is not used.
Tom Finegan 2012/10/13 23:47:26 Removed.
+
+ uint8_t* buffer() const;
+ cdm::Size size() const;
+ cdm::VideoFormat format() const;
+ cdm::VideoFrame* frame();
+
+ // Releases ownership of |frame_|.
+ void ReleaseCdmVideoFrame();
+
+ private:
+ // Clients must use the static Create() method to create a new frame.
+ VideoFrame(cdm::VideoFormat format,
+ const cdm::Size& size,
+ int64_t timestamp);
+
+ // Allocates a YUV video frame buffer of type |format_| using |size_|.
+ // Returns true when the frame buffer is successfully allocated. Returns
+ // false otherwise.
+ bool AllocateYUV(cdm::Allocator* allocator);
+
+ cdm::Size size_;
+ cdm::VideoFormat format_;
+ cdm::VideoFrame* frame_;
ddorwin 2012/10/13 03:54:42 Who owns this?
Tom Finegan 2012/10/13 23:47:26 Added comment.
+
+ DISALLOW_COPY_AND_ASSIGN(VideoFrame);
+};
+
+} // namespace webkit_media
+
+#endif // WEBKIT_MEDIA_CRYPTO_PPAPI_VIDEO_FRAME_H_

Powered by Google App Engine
This is Rietveld 408576698