OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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/base/data_buffer.h" |
| 6 |
5 #include "base/logging.h" | 7 #include "base/logging.h" |
6 #include "media/base/data_buffer.h" | |
7 | 8 |
8 namespace media { | 9 namespace media { |
9 | 10 |
10 DataBuffer::DataBuffer(scoped_array<uint8> buffer, int buffer_size) | 11 DataBuffer::DataBuffer(scoped_array<uint8> buffer, int buffer_size) |
11 : Buffer(base::TimeDelta(), base::TimeDelta()), | 12 : Buffer(base::TimeDelta(), base::TimeDelta()), |
12 data_(buffer.Pass()), | 13 data_(buffer.Pass()), |
13 buffer_size_(buffer_size), | 14 buffer_size_(buffer_size), |
14 data_size_(buffer_size) { | 15 data_size_(buffer_size) { |
15 } | 16 } |
16 | 17 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 void DataBuffer::SetDataSize(int data_size) { | 63 void DataBuffer::SetDataSize(int data_size) { |
63 DCHECK_LE(data_size, buffer_size_); | 64 DCHECK_LE(data_size, buffer_size_); |
64 data_size_ = data_size; | 65 data_size_ = data_size; |
65 } | 66 } |
66 | 67 |
67 int DataBuffer::GetBufferSize() const { | 68 int DataBuffer::GetBufferSize() const { |
68 return buffer_size_; | 69 return buffer_size_; |
69 } | 70 } |
70 | 71 |
71 } // namespace media | 72 } // namespace media |
OLD | NEW |