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

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

Issue 293053005: Add support for complete buffer discards. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. Created 6 years, 7 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/base/audio_discard_helper_unittest.cc ('k') | no next file » | 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 #ifndef MEDIA_BASE_DECODER_BUFFER_H_ 5 #ifndef MEDIA_BASE_DECODER_BUFFER_H_
6 #define MEDIA_BASE_DECODER_BUFFER_H_ 6 #define MEDIA_BASE_DECODER_BUFFER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 return side_data_.get(); 101 return side_data_.get();
102 } 102 }
103 103
104 int side_data_size() const { 104 int side_data_size() const {
105 DCHECK(!end_of_stream()); 105 DCHECK(!end_of_stream());
106 return side_data_size_; 106 return side_data_size_;
107 } 107 }
108 108
109 // A discard window indicates the amount of data which should be discard from 109 // A discard window indicates the amount of data which should be discard from
110 // this buffer after decoding. The first value is the amount of the front and 110 // this buffer after decoding. The first value is the amount of the front and
111 // the second the amount off the back. 111 // the second the amount off the back. A value of kInfiniteDuration() for the
112 // first value indicates the entire buffer should be discarded; the second
113 // value must be base::TimeDelta() in this case.
112 typedef std::pair<base::TimeDelta, base::TimeDelta> DiscardPadding; 114 typedef std::pair<base::TimeDelta, base::TimeDelta> DiscardPadding;
113 const DiscardPadding& discard_padding() const { 115 const DiscardPadding& discard_padding() const {
114 DCHECK(!end_of_stream()); 116 DCHECK(!end_of_stream());
115 return discard_padding_; 117 return discard_padding_;
116 } 118 }
117 119
118 void set_discard_padding(const DiscardPadding& discard_padding) { 120 void set_discard_padding(const DiscardPadding& discard_padding) {
119 DCHECK(!end_of_stream()); 121 DCHECK(!end_of_stream());
120 discard_padding_ = discard_padding; 122 discard_padding_ = discard_padding;
121 } 123 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 178
177 // Constructor helper method for memory allocations. 179 // Constructor helper method for memory allocations.
178 void Initialize(); 180 void Initialize();
179 181
180 DISALLOW_COPY_AND_ASSIGN(DecoderBuffer); 182 DISALLOW_COPY_AND_ASSIGN(DecoderBuffer);
181 }; 183 };
182 184
183 } // namespace media 185 } // namespace media
184 186
185 #endif // MEDIA_BASE_DECODER_BUFFER_H_ 187 #endif // MEDIA_BASE_DECODER_BUFFER_H_
OLDNEW
« no previous file with comments | « media/base/audio_discard_helper_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698