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

Unified Diff: webrtc/common_video/include/video_frame_buffer.h

Issue 2285693002: New static I420Buffer::Rotate method, to replace GetCopyWithRotationApplied. (Closed)
Patch Set: Change back to static method, now in I420Buffer. Created 4 years, 4 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 | « no previous file | webrtc/common_video/video_frame_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/include/video_frame_buffer.h
diff --git a/webrtc/common_video/include/video_frame_buffer.h b/webrtc/common_video/include/video_frame_buffer.h
index 94b3d5d8330ed320c6703bcdb890dfa40b87539c..674397020369a92b55bac8668c04a645d1c2e68c 100644
--- a/webrtc/common_video/include/video_frame_buffer.h
+++ b/webrtc/common_video/include/video_frame_buffer.h
@@ -18,6 +18,7 @@
#include "webrtc/base/callback.h"
#include "webrtc/base/refcount.h"
#include "webrtc/base/scoped_ref_ptr.h"
+#include "webrtc/common_video/rotation.h"
#include "webrtc/system_wrappers/include/aligned_malloc.h"
namespace webrtc {
@@ -130,6 +131,13 @@ class I420Buffer : public VideoFrameBuffer {
static rtc::scoped_refptr<I420Buffer> CopyKeepStride(
const rtc::scoped_refptr<VideoFrameBuffer>& buffer);
+ // Returns a rotated versions of |src|. Native buffers are not
+ // supported. The reason this function doesn't return an I420Buffer,
+ // is that it returns |src| unchanged in case |rotation| is zero.
+ static rtc::scoped_refptr<VideoFrameBuffer> Rotate(
+ const rtc::scoped_refptr<VideoFrameBuffer>& src,
+ VideoRotation rotation);
+
protected:
~I420Buffer() override;
« no previous file with comments | « no previous file | webrtc/common_video/video_frame_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698