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

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: 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
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.
wolenetz 2014/05/21 01:43:02 nit: s/./, in which case the second value must be
DaleCurtis 2014/05/21 02:23:25 Done.
112 typedef std::pair<base::TimeDelta, base::TimeDelta> DiscardPadding; 113 typedef std::pair<base::TimeDelta, base::TimeDelta> DiscardPadding;
113 const DiscardPadding& discard_padding() const { 114 const DiscardPadding& discard_padding() const {
114 DCHECK(!end_of_stream()); 115 DCHECK(!end_of_stream());
115 return discard_padding_; 116 return discard_padding_;
116 } 117 }
117 118
118 void set_discard_padding(const DiscardPadding& discard_padding) { 119 void set_discard_padding(const DiscardPadding& discard_padding) {
119 DCHECK(!end_of_stream()); 120 DCHECK(!end_of_stream());
120 discard_padding_ = discard_padding; 121 discard_padding_ = discard_padding;
121 } 122 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 177
177 // Constructor helper method for memory allocations. 178 // Constructor helper method for memory allocations.
178 void Initialize(); 179 void Initialize();
179 180
180 DISALLOW_COPY_AND_ASSIGN(DecoderBuffer); 181 DISALLOW_COPY_AND_ASSIGN(DecoderBuffer);
181 }; 182 };
182 183
183 } // namespace media 184 } // namespace media
184 185
185 #endif // MEDIA_BASE_DECODER_BUFFER_H_ 186 #endif // MEDIA_BASE_DECODER_BUFFER_H_
OLDNEW
« media/base/audio_discard_helper_unittest.cc ('K') | « 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