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

Side by Side Diff: webrtc/video_frame.h

Issue 2286633002: Delete IsZeroSize method. (Closed)
Patch Set: Created 4 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } 137 }
138 138
139 // Set render time in milliseconds. 139 // Set render time in milliseconds.
140 void set_render_time_ms(int64_t render_time_ms) { 140 void set_render_time_ms(int64_t render_time_ms) {
141 render_time_ms_ = render_time_ms; 141 render_time_ms_ = render_time_ms;
142 } 142 }
143 143
144 // Get render time in milliseconds. 144 // Get render time in milliseconds.
145 int64_t render_time_ms() const { return render_time_ms_; } 145 int64_t render_time_ms() const { return render_time_ms_; }
146 146
147 // Return true if and only if video_frame_buffer() is null. Which is possible
148 // only if the object was default-constructed.
149 // TODO(nisse): Deprecated. Should be deleted in the cricket::VideoFrame and
150 // webrtc::VideoFrame merge. The intention is that video_frame_buffer() never
151 // should return nullptr. To handle potentially uninitialized or non-existent
152 // frames, consider using rtc::Optional. Otherwise, IsZeroSize() can be
153 // replaced by video_frame_buffer() == nullptr.
154 bool IsZeroSize() const;
155
156 // Return the underlying buffer. Never nullptr for a properly 147 // Return the underlying buffer. Never nullptr for a properly
157 // initialized VideoFrame. 148 // initialized VideoFrame.
158 // Creating a new reference breaks the HasOneRef and IsMutable 149 // Creating a new reference breaks the HasOneRef and IsMutable
159 // logic. So return a const ref to our reference. 150 // logic. So return a const ref to our reference.
160 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& video_frame_buffer() 151 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& video_frame_buffer()
161 const; 152 const;
162 153
163 // Return true if the frame is stored in a texture. 154 // Return true if the frame is stored in a texture.
164 bool is_texture() { 155 bool is_texture() {
165 return video_frame_buffer() && 156 return video_frame_buffer() &&
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 int qp_ = -1; // Quantizer value. 209 int qp_ = -1; // Quantizer value.
219 210
220 // When an application indicates non-zero values here, it is taken as an 211 // When an application indicates non-zero values here, it is taken as an
221 // indication that all future frames will be constrained with those limits 212 // indication that all future frames will be constrained with those limits
222 // until the application indicates a change again. 213 // until the application indicates a change again.
223 PlayoutDelay playout_delay_ = {-1, -1}; 214 PlayoutDelay playout_delay_ = {-1, -1};
224 }; 215 };
225 216
226 } // namespace webrtc 217 } // namespace webrtc
227 #endif // WEBRTC_VIDEO_FRAME_H_ 218 #endif // WEBRTC_VIDEO_FRAME_H_
OLDNEW
« webrtc/video/video_quality_test.cc ('K') | « webrtc/video/video_quality_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698