Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(695)

Side by Side Diff: media/base/buffers.h

Issue 9854031: Replace size_t with int in a few media classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/audio/win/audio_low_latency_input_win_unittest.cc ('k') | media/base/buffers_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Defines a base class for representing timestamped media data. Every buffer 5 // Defines a base class for representing timestamped media data. Every buffer
6 // contains a timestamp in microseconds describing the relative position of 6 // contains a timestamp in microseconds describing the relative position of
7 // the buffer within the media stream, and the duration in microseconds for 7 // the buffer within the media stream, and the duration in microseconds for
8 // the length of time the buffer will be rendered. 8 // the length of time the buffer will be rendered.
9 // 9 //
10 // Timestamps are derived directly from the encoded media file and are commonly 10 // Timestamps are derived directly from the encoded media file and are commonly
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 MEDIA_EXPORT extern inline base::TimeDelta kInfiniteDuration() { 44 MEDIA_EXPORT extern inline base::TimeDelta kInfiniteDuration() {
45 return base::TimeDelta::FromMicroseconds(kint64max); 45 return base::TimeDelta::FromMicroseconds(kint64max);
46 } 46 }
47 47
48 class MEDIA_EXPORT Buffer : public base::RefCountedThreadSafe<Buffer> { 48 class MEDIA_EXPORT Buffer : public base::RefCountedThreadSafe<Buffer> {
49 public: 49 public:
50 // Returns a read only pointer to the buffer data. 50 // Returns a read only pointer to the buffer data.
51 virtual const uint8* GetData() const = 0; 51 virtual const uint8* GetData() const = 0;
52 52
53 // Returns the size of valid data in bytes. 53 // Returns the size of valid data in bytes.
54 virtual size_t GetDataSize() const = 0; 54 virtual int GetDataSize() const = 0;
55 55
56 // If there's no data in this buffer, it represents end of stream. 56 // If there's no data in this buffer, it represents end of stream.
57 bool IsEndOfStream() const; 57 bool IsEndOfStream() const;
58 58
59 // Return DecryptConfig if buffer is encrypted, or NULL otherwise. 59 // Return DecryptConfig if buffer is encrypted, or NULL otherwise.
60 virtual const DecryptConfig* GetDecryptConfig() const; 60 virtual const DecryptConfig* GetDecryptConfig() const;
61 61
62 base::TimeDelta GetTimestamp() const { 62 base::TimeDelta GetTimestamp() const {
63 return timestamp_; 63 return timestamp_;
64 } 64 }
(...skipping 16 matching lines...) Expand all
81 private: 81 private:
82 base::TimeDelta timestamp_; 82 base::TimeDelta timestamp_;
83 base::TimeDelta duration_; 83 base::TimeDelta duration_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(Buffer); 85 DISALLOW_COPY_AND_ASSIGN(Buffer);
86 }; 86 };
87 87
88 } // namespace media 88 } // namespace media
89 89
90 #endif // MEDIA_BASE_BUFFERS_H_ 90 #endif // MEDIA_BASE_BUFFERS_H_
OLDNEW
« no previous file with comments | « media/audio/win/audio_low_latency_input_win_unittest.cc ('k') | media/base/buffers_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698