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

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

Issue 9225001: Remove two static initializers (media/base/{buffers,media_log}.cc) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 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 | « no previous file | media/base/buffers.cc » ('j') | media/base/media_log.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 various types of timestamped media buffers used for transporting 5 // Defines various types of timestamped media buffers used for transporting
6 // data between filters. Every buffer contains a timestamp in microseconds 6 // data between filters. Every buffer contains a timestamp in microseconds
7 // describing the relative position of the buffer within the media stream, and 7 // describing the relative position of the buffer within the media stream, and
8 // the duration in microseconds for the length of time the buffer will be 8 // the duration in microseconds for the length of time the buffer will be
9 // rendered. 9 // rendered.
10 // 10 //
(...skipping 17 matching lines...) Expand all
28 #define MEDIA_BASE_BUFFERS_H_ 28 #define MEDIA_BASE_BUFFERS_H_
29 29
30 #include "base/basictypes.h" 30 #include "base/basictypes.h"
31 #include "base/memory/ref_counted.h" 31 #include "base/memory/ref_counted.h"
32 #include "base/time.h" 32 #include "base/time.h"
33 #include "media/base/media_export.h" 33 #include "media/base/media_export.h"
34 34
35 namespace media { 35 namespace media {
36 36
37 // Indicates an invalid or missing timestamp. 37 // Indicates an invalid or missing timestamp.
38 MEDIA_EXPORT extern const base::TimeDelta kNoTimestamp; 38 MEDIA_EXPORT extern inline base::TimeDelta kNoTimestamp() {
39 return base::TimeDelta::FromMicroseconds(kint64min);
40 }
39 41
40 // Represents an infinite stream duration. 42 // Represents an infinite stream duration.
41 MEDIA_EXPORT extern const base::TimeDelta kInfiniteDuration; 43 MEDIA_EXPORT extern inline base::TimeDelta kInfiniteDuration() {
44 return base::TimeDelta::FromMicroseconds(kint64max);
45 }
42 46
43 class MEDIA_EXPORT StreamSample 47 class MEDIA_EXPORT StreamSample
44 : public base::RefCountedThreadSafe<StreamSample> { 48 : public base::RefCountedThreadSafe<StreamSample> {
45 public: 49 public:
46 // Returns the timestamp of this buffer in microseconds. 50 // Returns the timestamp of this buffer in microseconds.
47 base::TimeDelta GetTimestamp() const { 51 base::TimeDelta GetTimestamp() const {
48 return timestamp_; 52 return timestamp_;
49 } 53 }
50 54
51 // Returns the duration of this buffer in microseconds. 55 // Returns the duration of this buffer in microseconds.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // If there's no data in this buffer, it represents end of stream. 96 // If there's no data in this buffer, it represents end of stream.
93 virtual bool IsEndOfStream() const OVERRIDE; 97 virtual bool IsEndOfStream() const OVERRIDE;
94 98
95 protected: 99 protected:
96 virtual ~Buffer() {} 100 virtual ~Buffer() {}
97 }; 101 };
98 102
99 } // namespace media 103 } // namespace media
100 104
101 #endif // MEDIA_BASE_BUFFERS_H_ 105 #endif // MEDIA_BASE_BUFFERS_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/buffers.cc » ('j') | media/base/media_log.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698