summaryrefslogtreecommitdiffstats
path: root/media/base/data_buffer.cc
diff options
context:
space:
mode:
authorralphl@chromium.org <ralphl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 23:53:16 +0000
committerralphl@chromium.org <ralphl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 23:53:16 +0000
commita28e0e48a6d0f1e8b25a45a8e6d7089c276f3c44 (patch)
tree17f9ade0447bf18ec387c7f5489d883c959bf656 /media/base/data_buffer.cc
parent24062acc468ac7c21b0dde801c02d6b72a2330e1 (diff)
downloadchromium_src-a28e0e48a6d0f1e8b25a45a8e6d7089c276f3c44.zip
chromium_src-a28e0e48a6d0f1e8b25a45a8e6d7089c276f3c44.tar.gz
chromium_src-a28e0e48a6d0f1e8b25a45a8e6d7089c276f3c44.tar.bz2
Added IsEndOfStream and IsDiscontiguous flags to buffers.
Review URL: http://codereview.chromium.org/27120 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10406 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/data_buffer.cc')
-rwxr-xr-xmedia/base/data_buffer.cc24
1 files changed, 4 insertions, 20 deletions
diff --git a/media/base/data_buffer.cc b/media/base/data_buffer.cc
index ae5314a..cdad4d7 100755
--- a/media/base/data_buffer.cc
+++ b/media/base/data_buffer.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2008-2009 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.
@@ -12,34 +12,18 @@ DataBuffer::DataBuffer(char* data, size_t buffer_size, size_t data_size,
const base::TimeDelta& duration)
: data_(data),
buffer_size_(buffer_size),
- data_size_(data_size),
- timestamp_(timestamp),
- duration_(duration) {
+ data_size_(data_size) {
DCHECK(data);
DCHECK(buffer_size >= 0);
DCHECK(data_size <= buffer_size);
+ SetTimestamp(timestamp);
+ SetDuration(duration);
}
DataBuffer::~DataBuffer() {
delete [] data_;
}
-base::TimeDelta DataBuffer::GetTimestamp() const {
- return timestamp_;
-}
-
-void DataBuffer::SetTimestamp(const base::TimeDelta& timestamp) {
- timestamp_ = timestamp;
-}
-
-base::TimeDelta DataBuffer::GetDuration() const {
- return duration_;
-}
-
-void DataBuffer::SetDuration(const base::TimeDelta& duration) {
- duration_ = duration;
-}
-
const char* DataBuffer::GetData() const {
return data_;
}