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

Unified Diff: webrtc/media/base/videoframe.h

Issue 2411953002: Reland of Make cricket::VideoFrame inherit webrtc::VideoFrame. (Closed)
Patch Set: Fix for windows build. Created 4 years, 2 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/media/base/videocapturer.h ('k') | webrtc/media/base/videoframe.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/base/videoframe.h
diff --git a/webrtc/media/base/videoframe.h b/webrtc/media/base/videoframe.h
index 6aa434d79d6fc681e11943edd0e1719f6a2f7ef9..7ae5b9ab93266ab27686ce630db0dcbd3d2e315a 100644
--- a/webrtc/media/base/videoframe.h
+++ b/webrtc/media/base/videoframe.h
@@ -8,58 +8,29 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MEDIA_BASE_VIDEOFRAME_H_
-#define WEBRTC_MEDIA_BASE_VIDEOFRAME_H_
-
-#include "webrtc/base/basictypes.h"
-#include "webrtc/base/stream.h"
-#include "webrtc/common_video/include/video_frame_buffer.h"
-#include "webrtc/common_video/rotation.h"
-
-namespace cricket {
-
-// Represents a YUV420 (a.k.a. I420) video frame.
-
-// TODO(nisse): This class duplicates webrtc::VideoFrame. There's
-// ongoing work to merge the classes. See
+// TODO(nisse): Deprecated, replace cricket::VideoFrame with
+// webrtc::VideoFrame everywhere, then delete this file. See
// https://bugs.chromium.org/p/webrtc/issues/detail?id=5682.
-class VideoFrame {
- public:
- VideoFrame() {}
- virtual ~VideoFrame() {}
-
- // Basic accessors.
- // Note this is the width and height without rotation applied.
- virtual int width() const = 0;
- virtual int height() const = 0;
- // Returns the underlying video frame buffer. This function is ok to call
- // multiple times, but the returned object will refer to the same memory.
- virtual const rtc::scoped_refptr<webrtc::VideoFrameBuffer>&
- video_frame_buffer() const = 0;
+#ifndef WEBRTC_MEDIA_BASE_VIDEOFRAME_H_
+#define WEBRTC_MEDIA_BASE_VIDEOFRAME_H_
- // Frame ID. Normally RTP timestamp when the frame was received using RTP.
- virtual uint32_t transport_frame_id() const = 0;
+// TODO(nisse): Some applications expect that including this file
+// implies an include of logging.h. So keep for compatibility, until
+// this file can be deleted.
+#include "webrtc/base/logging.h"
- // System monotonic clock, same timebase as rtc::TimeMicros().
- virtual int64_t timestamp_us() const = 0;
- virtual void set_timestamp_us(int64_t time_us) = 0;
+#include "webrtc/video_frame.h"
- // Indicates the rotation angle in degrees.
- virtual webrtc::VideoRotation rotation() const = 0;
+// TODO(nisse): Similarly, some applications expect that including this file
+// implies a forward declaration of rtc::Thread.
+namespace rtc {
+class Thread;
+} // namespace rtc
- // Tests if sample is valid. Returns true if valid.
+namespace cricket {
- // TODO(nisse): Deprecated. Should be deleted in the cricket::VideoFrame and
- // webrtc::VideoFrame merge. Validation of sample_size possibly moved to
- // libyuv::ConvertToI420. As an initial step, demote this method to protected
- // status. Used only by WebRtcVideoFrame::Reset.
- static bool Validate(uint32_t fourcc,
- int w,
- int h,
- const uint8_t* sample,
- size_t sample_size);
-};
+using VideoFrame = webrtc::VideoFrame;
} // namespace cricket
« no previous file with comments | « webrtc/media/base/videocapturer.h ('k') | webrtc/media/base/videoframe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698