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

Unified Diff: webrtc/video_frame.h

Issue 1935443002: Revert of Delete webrtc::VideoFrame methods buffer and stride. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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_encoder_unittest.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 4dc3411e98ac2d218077d552d6ceb4cc52f28444..409abf3446f1961eedfcde579a8fee2083691088 100644
--- a/webrtc/video_frame.h
+++ b/webrtc/video_frame.h
@@ -65,8 +65,16 @@
// reference to the video buffer also retained by |videoFrame|.
void ShallowCopy(const VideoFrame& videoFrame);
+ // Get pointer to buffer per plane.
+ uint8_t* buffer(PlaneType type);
+ // Overloading with const.
+ const uint8_t* buffer(PlaneType type) const;
+
// Get allocated size per plane.
int allocated_size(PlaneType type) const;
+
+ // Get allocated stride per plane.
+ int stride(PlaneType type) const;
// Get frame width.
int width() const;
@@ -116,10 +124,7 @@
// Return the underlying buffer. Never nullptr for a properly
// initialized VideoFrame.
- // Creating a new reference breaks the HasOneRef and IsMutable
- // logic. So return a const ref to our reference.
- const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& video_frame_buffer()
- const;
+ rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer() const;
// Set the underlying buffer.
void set_video_frame_buffer(
« no previous file with comments | « webrtc/video/video_encoder_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698