OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/cdm/simple_cdm_allocator.h" | 5 #include "media/cdm/simple_cdm_allocator.h" |
6 | 6 |
| 7 #include "base/memory/ptr_util.h" |
7 #include "media/base/video_frame.h" | 8 #include "media/base/video_frame.h" |
8 #include "media/cdm/cdm_helpers.h" | 9 #include "media/cdm/cdm_helpers.h" |
9 #include "media/cdm/simple_cdm_buffer.h" | 10 #include "media/cdm/simple_cdm_buffer.h" |
10 #include "ui/gfx/geometry/rect.h" | 11 #include "ui/gfx/geometry/rect.h" |
11 #include "ui/gfx/geometry/size.h" | 12 #include "ui/gfx/geometry/size.h" |
12 | 13 |
13 namespace media { | 14 namespace media { |
14 | 15 |
15 namespace { | 16 namespace { |
16 | 17 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // the memory allocated, so the caller is responsible for calling Destroy() | 60 // the memory allocated, so the caller is responsible for calling Destroy() |
60 // on the buffer when it is no longer needed. | 61 // on the buffer when it is no longer needed. |
61 cdm::Buffer* SimpleCdmAllocator::CreateCdmBuffer(size_t capacity) { | 62 cdm::Buffer* SimpleCdmAllocator::CreateCdmBuffer(size_t capacity) { |
62 if (!capacity) | 63 if (!capacity) |
63 return nullptr; | 64 return nullptr; |
64 | 65 |
65 return SimpleCdmBuffer::Create(capacity); | 66 return SimpleCdmBuffer::Create(capacity); |
66 } | 67 } |
67 | 68 |
68 // Creates a new SimpleCdmVideoFrame on every request. | 69 // Creates a new SimpleCdmVideoFrame on every request. |
69 scoped_ptr<VideoFrameImpl> SimpleCdmAllocator::CreateCdmVideoFrame() { | 70 std::unique_ptr<VideoFrameImpl> SimpleCdmAllocator::CreateCdmVideoFrame() { |
70 return make_scoped_ptr(new SimpleCdmVideoFrame()); | 71 return base::WrapUnique(new SimpleCdmVideoFrame()); |
71 } | 72 } |
72 | 73 |
73 } // namespace media | 74 } // namespace media |
OLD | NEW |