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_; |