diff options
author | Torne (Richard Coles) <torne@google.com> | 2013-03-28 15:31:22 +0000 |
---|---|---|
committer | Torne (Richard Coles) <torne@google.com> | 2013-03-28 15:31:22 +0000 |
commit | 2a99a7e74a7f215066514fe81d2bfa6639d9eddd (patch) | |
tree | 7c2d04841fcd599fd83b0f0bb1100e1c89a35bae /media/base/buffers.h | |
parent | 61c449bbbb53310a8c041d8cefdd6b01a126cc7e (diff) | |
download | chromium_org-2a99a7e74a7f215066514fe81d2bfa6639d9eddd.tar.gz |
Merge from Chromium at DEPS revision r190564
This commit was generated by merge_to_master.py.
Change-Id: Icadecbce29854b8fa25fd335b2c1949b5ca5d170
Diffstat (limited to 'media/base/buffers.h')
-rw-r--r-- | media/base/buffers.h | 44 |
1 files changed, 2 insertions, 42 deletions
diff --git a/media/base/buffers.h b/media/base/buffers.h index d14f4db515..7eecd5bdf9 100644 --- a/media/base/buffers.h +++ b/media/base/buffers.h @@ -2,11 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Defines a base class for representing timestamped media data. Every buffer -// contains a timestamp in microseconds describing the relative position of -// the buffer within the media stream, and the duration in microseconds for -// the length of time the buffer will be rendered. -// // Timestamps are derived directly from the encoded media file and are commonly // known as the presentation timestamp (PTS). Durations are a best-guess and // are usually derived from the sample/frame rate of the media file. @@ -33,6 +28,8 @@ namespace media { +// TODO(scherkus): Move the contents of this file elsewhere. + // Indicates an invalid or missing timestamp. MEDIA_EXPORT extern inline base::TimeDelta kNoTimestamp() { return base::TimeDelta::FromMicroseconds(kint64min); @@ -43,43 +40,6 @@ MEDIA_EXPORT extern inline base::TimeDelta kInfiniteDuration() { return base::TimeDelta::FromMicroseconds(kint64max); } -class MEDIA_EXPORT Buffer : public base::RefCountedThreadSafe<Buffer> { - public: - // Returns a read only pointer to the buffer data. - virtual const uint8* GetData() const = 0; - - // Returns the size of valid data in bytes. - virtual int GetDataSize() const = 0; - - // If there's no data in this buffer, it represents end of stream. - bool IsEndOfStream() const; - - base::TimeDelta GetTimestamp() const { - return timestamp_; - } - void SetTimestamp(const base::TimeDelta& timestamp) { - timestamp_ = timestamp; - } - - base::TimeDelta GetDuration() const { - return duration_; - } - void SetDuration(const base::TimeDelta& duration) { - duration_ = duration; - } - - protected: - friend class base::RefCountedThreadSafe<Buffer>; - Buffer(base::TimeDelta timestamp, base::TimeDelta duration); - virtual ~Buffer(); - - private: - base::TimeDelta timestamp_; - base::TimeDelta duration_; - - DISALLOW_COPY_AND_ASSIGN(Buffer); -}; - } // namespace media #endif // MEDIA_BASE_BUFFERS_H_ |