Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef WEBKIT_MEDIA_CRYPTO_PPAPI_VIDEO_FRAME_H_ | |
| 6 #define WEBKIT_MEDIA_CRYPTO_PPAPI_VIDEO_FRAME_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/compiler_specific.h" | |
| 10 #include "webkit/media/crypto/ppapi/content_decryption_module.h" | |
| 11 | |
| 12 namespace webkit_media { | |
| 13 | |
| 14 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
| |
| 15 public: | |
| 16 ~VideoFrame(); | |
| 17 // Returns a pointer to VideoFrame of the specified |format| and |size|. | |
| 18 // Returns NULL on failure. | |
| 19 static VideoFrame* Create(cdm::Allocator* allocator, | |
| 20 cdm::VideoFormat format, | |
| 21 const cdm::Size& size, | |
| 22 int64_t timestamp); | |
|
ddorwin
2012/10/13 03:54:42
timestamp is not used.
Tom Finegan
2012/10/13 23:47:26
Removed.
| |
| 23 | |
| 24 uint8_t* buffer() const; | |
| 25 cdm::Size size() const; | |
| 26 cdm::VideoFormat format() const; | |
| 27 cdm::VideoFrame* frame(); | |
| 28 | |
| 29 // Releases ownership of |frame_|. | |
| 30 void ReleaseCdmVideoFrame(); | |
| 31 | |
| 32 private: | |
| 33 // Clients must use the static Create() method to create a new frame. | |
| 34 VideoFrame(cdm::VideoFormat format, | |
| 35 const cdm::Size& size, | |
| 36 int64_t timestamp); | |
| 37 | |
| 38 // Allocates a YUV video frame buffer of type |format_| using |size_|. | |
| 39 // Returns true when the frame buffer is successfully allocated. Returns | |
| 40 // false otherwise. | |
| 41 bool AllocateYUV(cdm::Allocator* allocator); | |
| 42 | |
| 43 cdm::Size size_; | |
| 44 cdm::VideoFormat format_; | |
| 45 cdm::VideoFrame* frame_; | |
|
ddorwin
2012/10/13 03:54:42
Who owns this?
Tom Finegan
2012/10/13 23:47:26
Added comment.
| |
| 46 | |
| 47 DISALLOW_COPY_AND_ASSIGN(VideoFrame); | |
| 48 }; | |
| 49 | |
| 50 } // namespace webkit_media | |
| 51 | |
| 52 #endif // WEBKIT_MEDIA_CRYPTO_PPAPI_VIDEO_FRAME_H_ | |
| OLD | NEW |