Index: media/cdm/cdm_helpers.h |
diff --git a/media/cdm/cdm_helpers.h b/media/cdm/cdm_helpers.h |
index ea813767938bf12a109d35a1e43085d60f8e7021..8604eb1eed5533e6fa02be5bb0b87e0f92c9d5e1 100644 |
--- a/media/cdm/cdm_helpers.h |
+++ b/media/cdm/cdm_helpers.h |
@@ -10,8 +10,15 @@ |
#include "base/macros.h" |
#include "media/cdm/api/content_decryption_module.h" |
+#if !defined(USE_PPAPI_CDM_ADAPTER) |
+#include "base/memory/ref_counted.h" |
+#include "ui/gfx/geometry/size.h" |
+#endif |
+ |
namespace media { |
+class VideoFrame; |
+ |
class DecryptedBlockImpl : public cdm::DecryptedBlock { |
public: |
DecryptedBlockImpl(); |
@@ -33,7 +40,7 @@ class DecryptedBlockImpl : public cdm::DecryptedBlock { |
class VideoFrameImpl : public cdm::VideoFrame { |
public: |
VideoFrameImpl(); |
- ~VideoFrameImpl() final; |
+ ~VideoFrameImpl() override; |
// cdm::VideoFrame implementation. |
void SetFormat(cdm::VideoFormat format) final; |
@@ -49,7 +56,17 @@ class VideoFrameImpl : public cdm::VideoFrame { |
void SetTimestamp(int64_t timestamp) final; |
int64_t Timestamp() const final; |
- private: |
+#if !defined(USE_PPAPI_CDM_ADAPTER) |
+ // Create a media::VideoFrame based on the data contained in this object. |
+ // The returned object will own the memory in FrameBuffer and will be |
xhwang
2016/02/12 08:45:30
nit: s/the memory in FrameBuffer/|frame_buffer_| ?
jrummell
2016/02/12 23:14:20
Done.
|
+ // responsible for calling Destroy() on it when the media::VideoFrame no |
+ // longer needs it. After CreateVideoFrame() is called the VideoFrameImpl |
+ // will no longer have a reference to the memory. |
xhwang
2016/02/12 08:45:30
nit: s/the VideoFrameImpl will no longer have a re
jrummell
2016/02/12 23:14:20
Removed the whole sentence since it simply restate
|
+ virtual scoped_refptr<media::VideoFrame> CreateVideoFrame( |
+ gfx::Size natural_size) = 0; |
xhwang
2016/02/12 08:45:30
nit: Actually, this is not a typical "Create" call
jrummell
2016/02/12 23:14:20
Done.
|
+#endif |
+ |
+ protected: |
// The video buffer format. |
cdm::VideoFormat format_; |
@@ -70,6 +87,7 @@ class VideoFrameImpl : public cdm::VideoFrame { |
// Presentation timestamp in microseconds. |
int64_t timestamp_; |
+ private: |
DISALLOW_COPY_AND_ASSIGN(VideoFrameImpl); |
}; |