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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/video_send_stream.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video_frame.h
diff --git a/webrtc/video_frame.h b/webrtc/video_frame.h
index db06a96af7b6ebed745abeaf4f41224483b31b65..b9ba69bb05283d031c63bcadf89d66fd47a805e2 100644
--- a/webrtc/video_frame.h
+++ b/webrtc/video_frame.h
@@ -129,6 +129,12 @@ class VideoFrame {
// called on a non-native-handle frame.
VideoFrame ConvertNativeToI420Frame() const;
+ // Return true if the frame is stored in a texture.
+ bool is_texture() {
+ return video_frame_buffer() &&
+ video_frame_buffer()->native_handle() != nullptr;
+ }
+
private:
// An opaque reference counted handle that stores the pixel data.
rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer_;
« 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