Chromium Code Reviews| Index: webrtc/api/video/video_frame.h |
| diff --git a/webrtc/api/video/video_frame.h b/webrtc/api/video/video_frame.h |
| index 8840782cad03ba70e69657b227e8ddf7aabfbcb3..a5569de583baf42ef9b823cee414861905c88e89 100644 |
| --- a/webrtc/api/video/video_frame.h |
| +++ b/webrtc/api/video/video_frame.h |
| @@ -14,6 +14,7 @@ |
| #include <stdint.h> |
| #include "webrtc/api/video/video_rotation.h" |
| +#include "webrtc/api/video/video_content_type.h" |
| #include "webrtc/api/video/video_frame_buffer.h" |
| // TODO(nisse): Transition hack, some downstream applications expect |
| @@ -30,13 +31,15 @@ class VideoFrame { |
| // want to stick to this style and deprecate the other constructor. |
| VideoFrame(const rtc::scoped_refptr<VideoFrameBuffer>& buffer, |
| webrtc::VideoRotation rotation, |
| + VideoContentType content_type, |
| int64_t timestamp_us); |
| // Preferred constructor. |
| VideoFrame(const rtc::scoped_refptr<VideoFrameBuffer>& buffer, |
| uint32_t timestamp, |
| int64_t render_time_ms, |
| - VideoRotation rotation); |
| + VideoRotation rotation, |
| + VideoContentType content_type); |
| ~VideoFrame(); |
| @@ -92,6 +95,11 @@ class VideoFrame { |
| VideoRotation rotation() const { return rotation_; } |
| void set_rotation(VideoRotation rotation) { rotation_ = rotation; } |
| + VideoContentType content_type() const { return content_type_; } |
| + void set_content_type(VideoContentType content_type) { |
| + content_type_ = content_type; |
| + } |
| + |
| // Get render time in milliseconds. |
| // TODO(nisse): Deprecated. Migrate all users to timestamp_us(). |
| int64_t render_time_ms() const; |
| @@ -113,6 +121,7 @@ class VideoFrame { |
| int64_t ntp_time_ms_; |
| int64_t timestamp_us_; |
| VideoRotation rotation_; |
| + VideoContentType content_type_; |
|
nisse-webrtc
2017/03/29 12:05:55
Please, don't bloat the VideoFrame class with this
ilnik
2017/03/29 12:43:55
Are you OK with having it in EncodedImage?
|
| }; |
| } // namespace webrtc |