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

Side by Side Diff: webrtc/video_frame.h

Issue 2067103002: Avoid unnecessary HW video encoder reconfiguration (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: ReconfigureEncoderIfNecessary -> ReconfigureEncoder() Created 4 years, 6 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
« no previous file with comments | « webrtc/video/video_send_stream.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 /* 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 const; 122 const;
123 123
124 // Set the underlying buffer. 124 // Set the underlying buffer.
125 void set_video_frame_buffer( 125 void set_video_frame_buffer(
126 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer); 126 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer);
127 127
128 // Convert native-handle frame to memory-backed I420 frame. Should not be 128 // Convert native-handle frame to memory-backed I420 frame. Should not be
129 // called on a non-native-handle frame. 129 // called on a non-native-handle frame.
130 VideoFrame ConvertNativeToI420Frame() const; 130 VideoFrame ConvertNativeToI420Frame() const;
131 131
132 // Return true if the frame is stored in a texture.
133 bool is_texture() {
134 return video_frame_buffer() &&
135 video_frame_buffer()->native_handle() != nullptr;
136 }
137
132 private: 138 private:
133 // An opaque reference counted handle that stores the pixel data. 139 // An opaque reference counted handle that stores the pixel data.
134 rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer_; 140 rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer_;
135 uint32_t timestamp_; 141 uint32_t timestamp_;
136 int64_t ntp_time_ms_; 142 int64_t ntp_time_ms_;
137 int64_t render_time_ms_; 143 int64_t render_time_ms_;
138 VideoRotation rotation_; 144 VideoRotation rotation_;
139 }; 145 };
140 146
141 147
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 int qp_ = -1; // Quantizer value. 187 int qp_ = -1; // Quantizer value.
182 188
183 // When an application indicates non-zero values here, it is taken as an 189 // When an application indicates non-zero values here, it is taken as an
184 // indication that all future frames will be constrained with those limits 190 // indication that all future frames will be constrained with those limits
185 // until the application indicates a change again. 191 // until the application indicates a change again.
186 PlayoutDelay playout_delay_ = {-1, -1}; 192 PlayoutDelay playout_delay_ = {-1, -1};
187 }; 193 };
188 194
189 } // namespace webrtc 195 } // namespace webrtc
190 #endif // WEBRTC_VIDEO_FRAME_H_ 196 #endif // WEBRTC_VIDEO_FRAME_H_
OLDNEW
« no previous file with comments | « webrtc/video/video_send_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698