aboutsummaryrefslogtreecommitdiff
path: root/webrtc/video_frame.h
diff options
context:
space:
mode:
authorguoweis@webrtc.org <guoweis@webrtc.org>2015-02-11 18:37:54 +0000
committerguoweis@webrtc.org <guoweis@webrtc.org>2015-02-11 18:38:53 +0000
commit1226e926e6104322d9b99026b98f515cb4d40fd4 (patch)
treee9ee504996c2a59d69e8b7c5878df01b9a2c0357 /webrtc/video_frame.h
parentdc7b02277cc1666dfc13b636c2ecfe53b12c9d2a (diff)
downloadwebrtc-1226e926e6104322d9b99026b98f515cb4d40fd4.tar.gz
CVO capturer feature: allow unrotated frame flows through the capture pipeline.
split from https://webrtc-codereview.appspot.com/37029004/ This is based on clean up code change at https://webrtc-codereview.appspot.com/37129004 BUG=4145 R=perkj@webrtc.org, pthatcher@webrtc.org, stefan@webrtc.org, tommi@webrtc.org Committed: https://code.google.com/p/webrtc/source/detail?r=8337 Committed: https://code.google.com/p/webrtc/source/detail?r=8338 Review URL: https://webrtc-codereview.appspot.com/39799004 Cr-Commit-Position: refs/heads/master@{#8339} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8339 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'webrtc/video_frame.h')
-rw-r--r--webrtc/video_frame.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/webrtc/video_frame.h b/webrtc/video_frame.h
index 95bcca0ee4..2dd7c6134e 100644
--- a/webrtc/video_frame.h
+++ b/webrtc/video_frame.h
@@ -18,6 +18,7 @@
// used).
#include "webrtc/system_wrappers/interface/scoped_refptr.h"
#include "webrtc/typedefs.h"
+#include "webrtc/common_video/rotation.h"
namespace webrtc {
@@ -73,6 +74,20 @@ class I420VideoFrame {
int stride_u,
int stride_v);
+ // TODO(guoweis): remove the previous CreateFrame when chromium has this code.
+ virtual int CreateFrame(int size_y,
+ const uint8_t* buffer_y,
+ int size_u,
+ const uint8_t* buffer_u,
+ int size_v,
+ const uint8_t* buffer_v,
+ int width,
+ int height,
+ int stride_y,
+ int stride_u,
+ int stride_v,
+ VideoRotation rotation);
+
// Copy frame: If required size is bigger than allocated one, new buffers of
// adequate size will be allocated.
// Return value: 0 on success, -1 on error.
@@ -122,6 +137,21 @@ class I420VideoFrame {
// Get capture ntp time in miliseconds.
virtual int64_t ntp_time_ms() const { return ntp_time_ms_; }
+ // Naming convention for Coordination of Video Orientation. Please see
+ // http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/ts_126114v120700p.pdf
+ //
+ // "pending rotation" or "pending" = a frame that has a VideoRotation > 0.
+ //
+ // "not pending" = a frame that has a VideoRotation == 0.
+ //
+ // "apply rotation" = modify a frame from being "pending" to being "not
+ // pending" rotation (a no-op for "unrotated").
+ //
+ virtual VideoRotation rotation() const { return rotation_; }
+ virtual void set_rotation(VideoRotation rotation) {
+ rotation_ = rotation;
+ }
+
// Set render time in miliseconds.
virtual void set_render_time_ms(int64_t render_time_ms) {
render_time_ms_ = render_time_ms;
@@ -165,6 +195,7 @@ class I420VideoFrame {
uint32_t timestamp_;
int64_t ntp_time_ms_;
int64_t render_time_ms_;
+ VideoRotation rotation_;
};
enum VideoFrameType {