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

Unified Diff: webrtc/video_frame.h

Issue 2088193002: Add TODO comments on deprecated VideoFrame methods. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add TODO comments. Created 4 years, 6 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
« webrtc/media/base/videoframe.h ('K') | « webrtc/media/engine/webrtcvideoframe.h ('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 0f2b9a68afd1a15691ffefccee2377d8902cddb9..5780dbff6c34f10361a21242f277434dc91265ac 100644
--- a/webrtc/video_frame.h
+++ b/webrtc/video_frame.h
@@ -19,9 +19,14 @@
namespace webrtc {
+// TODO(nisse): This class duplicates cricket::VideoFrame. There's
+// ongoing work to merge the classes. See
+// https://bugs.chromium.org/p/webrtc/issues/detail?id=5682.
class VideoFrame {
public:
VideoFrame();
+
+ // Preferred constructor.
VideoFrame(const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer,
uint32_t timestamp,
int64_t render_time_ms,
@@ -31,6 +36,8 @@ class VideoFrame {
// on set dimensions - height and plane stride.
// If required size is bigger than the allocated one, new buffers of adequate
// size will be allocated.
+ // TODO(nisse): Should be deleted in the cricket::VideoFrame and
+ // webrtc::VideoFrame merge.
void CreateEmptyFrame(int width,
int height,
int stride_y,
@@ -39,6 +46,8 @@ class VideoFrame {
// CreateFrame: Sets the frame's members and buffers. If required size is
// bigger than allocated one, new buffers of adequate size will be allocated.
+ // TODO(nisse): Should be deleted in the cricket::VideoFrame and
+ // webrtc::VideoFrame merge.
void CreateFrame(const uint8_t* buffer_y,
const uint8_t* buffer_u,
const uint8_t* buffer_v,
@@ -52,6 +61,8 @@ class VideoFrame {
// CreateFrame: Sets the frame's members and buffers. If required size is
// bigger than allocated one, new buffers of adequate size will be allocated.
// |buffer| must be a packed I420 buffer.
+ // TODO(nisse): Should be deleted in the cricket::VideoFrame and
+ // webrtc::VideoFrame merge.
void CreateFrame(const uint8_t* buffer,
int width,
int height,
@@ -59,13 +70,19 @@ class VideoFrame {
// Deep copy frame: If required size is bigger than allocated one, new
// buffers of adequate size will be allocated.
+ // TODO(nisse): Should be deleted in the cricket::VideoFrame and
+ // webrtc::VideoFrame merge.
void CopyFrame(const VideoFrame& videoFrame);
// Creates a shallow copy of |videoFrame|, i.e, the this object will retain a
// reference to the video buffer also retained by |videoFrame|.
+ // TODO(nisse): Should be deleted in the cricket::VideoFrame and
+ // webrtc::VideoFrame merge.
void ShallowCopy(const VideoFrame& videoFrame);
// Get allocated size per plane.
+ // TODO(nisse): Should be deleted in the cricket::VideoFrame and
+ // webrtc::VideoFrame merge.
int allocated_size(PlaneType type) const;
// Get frame width.
@@ -74,18 +91,22 @@ class VideoFrame {
// Get frame height.
int height() const;
+ // TODO(nisse): After the cricket::VideoFrame and webrtc::VideoFrame
+ // merge, we'll have methods timestamp_us and set_timestamp_us, all
+ // other frame timestamps will likely be deprecated.
+
// Set frame timestamp (90kHz).
void set_timestamp(uint32_t timestamp) { timestamp_ = timestamp; }
// Get frame timestamp (90kHz).
uint32_t timestamp() const { return timestamp_; }
- // Set capture ntp time in miliseconds.
+ // Set capture ntp time in milliseconds.
void set_ntp_time_ms(int64_t ntp_time_ms) {
ntp_time_ms_ = ntp_time_ms;
}
- // Get capture ntp time in miliseconds.
+ // Get capture ntp time in milliseconds.
int64_t ntp_time_ms() const { return ntp_time_ms_; }
// Naming convention for Coordination of Video Orientation. Please see
@@ -103,15 +124,17 @@ class VideoFrame {
rotation_ = rotation;
}
- // Set render time in miliseconds.
+ // Set render time in milliseconds.
void set_render_time_ms(int64_t render_time_ms) {
render_time_ms_ = render_time_ms;
}
- // Get render time in miliseconds.
+ // Get render time in milliseconds.
int64_t render_time_ms() const { return render_time_ms_; }
// Return true if underlying plane buffers are of zero size, false if not.
+ // TODO(nisse): Should be deleted in the cricket::VideoFrame and
+ // webrtc::VideoFrame merge.
bool IsZeroSize() const;
// Return the underlying buffer. Never nullptr for a properly
« webrtc/media/base/videoframe.h ('K') | « webrtc/media/engine/webrtcvideoframe.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698