Reland of Delete deprecated and transitional stuff related to video frame refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/2853383005/ )
Reason for revert:
Downstream projects have been fixed.
Original issue's description:
> Revert of Delete deprecated and transitional stuff related to video frame refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/2854873003/ )
>
> Reason for revert:
> More downstream breakage discovered.
>
> Original issue's description:
> > Reland of Delete deprecated and transitional stuff related to video frame refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/2854883002/ )
> >
> > Reason for revert:
> > Will make another attempt to track down and fix downstream projects.
> >
> > Original issue's description:
> > > Revert of Delete deprecated and transitional stuff related to video frame refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/2852303002/ )
> > >
> > > Reason for revert:
> > > Unfortunately, more downstream updates needed.
> > >
> > > Original issue's description:
> > > > Reland of Delete deprecated and transitional stuff related to video frame refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/2845333002/ )
> > > >
> > > > Reason for revert:
> > > > Downstream projects being updated.
> > > >
> > > > For Chrome, relanding depends on cl
> > > > https://codereview.chromium.org/2855783003/
> > > >
> > > > Original issue's description:
> > > > > Revert of Delete deprecated and transitional stuff related to video frame refactoring. (patchset #17 id:320001 of https://codereview.webrtc.org/2622263002/ )
> > > > >
> > > > > Reason for revert:
> > > > > Broke Chrome build, see, e.g.,
> > > > > http://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/16237
> > > > >
> > > > > Original issue's description:
> > > > > > Delete deprecated and transitional stuff related to video frame refactoring.
> > > > > >
> > > > > > BUG=webrtc:5880
> > > > > >
> > > > > > Review-Url: https://codereview.webrtc.org/2622263002
> > > > > > Cr-Commit-Position: refs/heads/master@{#17928}
> > > > > > Committed: https://chromium.googlesource.com/external/webrtc/+/713a3bbcc74a4c1a1f54d6dbd0bdaa715f5c1ae1
> > > > >
> > > > > TBR=mflodman@webrtc.org,perkj@webrtc.org
> > > > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > > > NOPRESUBMIT=true
> > > > > NOTREECHECKS=true
> > > > > NOTRY=true
> > > > > BUG=webrtc:5880
> > > > >
> > > > > Review-Url: https://codereview.webrtc.org/2845333002
> > > > > Cr-Commit-Position: refs/heads/master@{#17929}
> > > > > Committed: https://chromium.googlesource.com/external/webrtc/+/aec49d2b49e1beceb286cbb29ad220aefd0ac648
> > > >
> > > > TBR=mflodman@webrtc.org,perkj@webrtc.org
> > > > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > > > BUG=webrtc:5880
> > > >
> > > > Review-Url: https://codereview.webrtc.org/2852303002
> > > > Cr-Commit-Position: refs/heads/master@{#17974}
> > > > Committed: https://chromium.googlesource.com/external/webrtc/+/d71ebd70f6c40a37559a7ee2930002a804ad3f13
> > >
> > > TBR=mflodman@webrtc.org,perkj@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:5880
> > >
> > > Review-Url: https://codereview.webrtc.org/2854883002
> > > Cr-Commit-Position: refs/heads/master@{#17978}
> > > Committed: https://chromium.googlesource.com/external/webrtc/+/6e6a485a028799501ea4753ceefc811dd826f52f
> >
> > TBR=mflodman@webrtc.org,perkj@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> >
> > BUG=webrtc:5880
> >
> > Review-Url: https://codereview.webrtc.org/2854873003
> > Cr-Commit-Position: refs/heads/master@{#18006}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/3870a071c452dc2e782196bc5bba0375d019b653
>
> TBR=mflodman@webrtc.org,perkj@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:5880
>
> Review-Url: https://codereview.webrtc.org/2853383005
> Cr-Commit-Position: refs/heads/master@{#18008}
> Committed: https://chromium.googlesource.com/external/webrtc/+/61b22dde133aff91a0db6a628d87b2ea9134fa15
TBR=mflodman@webrtc.org,perkj@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5880
Review-Url: https://codereview.webrtc.org/2867703002
Cr-Commit-Position: refs/heads/master@{#18081}
diff --git a/webrtc/api/mediastreaminterface.h b/webrtc/api/mediastreaminterface.h
index 2d16e52..2acaa00 100644
--- a/webrtc/api/mediastreaminterface.h
+++ b/webrtc/api/mediastreaminterface.h
@@ -23,10 +23,6 @@
#include <vector>
#include "webrtc/api/video/video_frame.h"
-// TODO(nisse): Transition hack, Chrome expects that including this
-// file declares I420Buffer. Delete after users of I420Buffer are
-// fixed to include the new header.
-#include "webrtc/api/video/i420_buffer.h"
#include "webrtc/base/refcount.h"
#include "webrtc/base/scoped_ref_ptr.h"
#include "webrtc/base/optional.h"
diff --git a/webrtc/api/video/i420_buffer.cc b/webrtc/api/video/i420_buffer.cc
index 81f5789..32c73ea 100644
--- a/webrtc/api/video/i420_buffer.cc
+++ b/webrtc/api/video/i420_buffer.cc
@@ -131,17 +131,6 @@
return buffer;
}
-// static
-rtc::scoped_refptr<VideoFrameBuffer> I420Buffer::Rotate(
- rtc::scoped_refptr<VideoFrameBuffer> src,
- VideoRotation rotation) {
- if (rotation == webrtc::kVideoRotation_0) {
- return src;
- } else {
- return Rotate(*src, rotation);
- }
-}
-
void I420Buffer::InitializeData() {
memset(data_.get(), 0,
I420DataSize(height_, stride_y_, stride_u_, stride_v_));
diff --git a/webrtc/api/video/i420_buffer.h b/webrtc/api/video/i420_buffer.h
index 388a3dd..507bd05 100644
--- a/webrtc/api/video/i420_buffer.h
+++ b/webrtc/api/video/i420_buffer.h
@@ -53,9 +53,6 @@
// are resolved in a better way. Or in the mean time, use SetBlack.
void InitializeData();
- // TODO(nisse): Deprecated, use static method instead.
- void SetToBlack() { SetBlack(this); }
-
int width() const override;
int height() const override;
const uint8_t* DataY() const override;
@@ -88,14 +85,6 @@
// Scale all of |src| to the size of |this| buffer, with no cropping.
void ScaleFrom(const VideoFrameBuffer& src);
- // TODO(nisse): Deprecated, delete once downstream applications are updated.
- // 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(
- rtc::scoped_refptr<VideoFrameBuffer> src,
- VideoRotation rotation);
-
protected:
I420Buffer(int width, int height);
I420Buffer(int width, int height, int stride_y, int stride_u, int stride_v);
diff --git a/webrtc/api/video/video_frame.h b/webrtc/api/video/video_frame.h
index 8840782..82c348d 100644
--- a/webrtc/api/video/video_frame.h
+++ b/webrtc/api/video/video_frame.h
@@ -16,11 +16,6 @@
#include "webrtc/api/video/video_rotation.h"
#include "webrtc/api/video/video_frame_buffer.h"
-// TODO(nisse): Transition hack, some downstream applications expect
-// that including this file also defines base/timeutils.h constants.
-// Delete after applications are fixed to include the right headers.
-#include "webrtc/base/timeutils.h"
-
namespace webrtc {
class VideoFrame {
diff --git a/webrtc/api/video_codecs/BUILD.gn b/webrtc/api/video_codecs/BUILD.gn
index befd065..5562eec 100644
--- a/webrtc/api/video_codecs/BUILD.gn
+++ b/webrtc/api/video_codecs/BUILD.gn
@@ -22,6 +22,7 @@
# TODO(ilnik): Add dependency on webrtc/video_frame.h when it will have it's
# own build target.
+ "..:video_frame_api",
"../..:webrtc_common",
"../../base:rtc_base_approved",
]
diff --git a/webrtc/api/video_codecs/video_decoder.h b/webrtc/api/video_codecs/video_decoder.h
index ba62822..04deaed 100644
--- a/webrtc/api/video_codecs/video_decoder.h
+++ b/webrtc/api/video_codecs/video_decoder.h
@@ -15,6 +15,7 @@
#include <string>
#include <vector>
+#include "webrtc/api/video/video_frame.h"
#include "webrtc/common_types.h"
#include "webrtc/typedefs.h"
#include "webrtc/video_frame.h"
diff --git a/webrtc/api/video_codecs/video_encoder.h b/webrtc/api/video_codecs/video_encoder.h
index 969de43..5d21ed9 100644
--- a/webrtc/api/video_codecs/video_encoder.h
+++ b/webrtc/api/video_codecs/video_encoder.h
@@ -15,6 +15,7 @@
#include <string>
#include <vector>
+#include "webrtc/api/video/video_frame.h"
#include "webrtc/base/checks.h"
#include "webrtc/common_types.h"
#include "webrtc/typedefs.h"