| Index: media/base/video_frame.cc
|
| diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc
|
| index 8dab6fd84c13ee56b14c6049cfa4a085187dfc92..9bf40780bf42a5f5647041a6d38c79854c8dfe23 100644
|
| --- a/media/base/video_frame.cc
|
| +++ b/media/base/video_frame.cc
|
| @@ -23,9 +23,22 @@ scoped_refptr<VideoFrame> VideoFrame::CreateFrame(
|
| size_t height,
|
| base::TimeDelta timestamp,
|
| base::TimeDelta duration) {
|
| + return VideoFrame::CreateFrame(format, width, height, width, height,
|
| + timestamp, duration);
|
| +}
|
| +
|
| +scoped_refptr<VideoFrame> VideoFrame::CreateFrame(
|
| + VideoFrame::Format format,
|
| + size_t width,
|
| + size_t height,
|
| + size_t natural_width,
|
| + size_t natural_height,
|
| + base::TimeDelta timestamp,
|
| + base::TimeDelta duration) {
|
| DCHECK(IsValidConfig(format, width, height));
|
| scoped_refptr<VideoFrame> frame(new VideoFrame(
|
| - format, width, height, timestamp, duration));
|
| + format, width, height, natural_width, natural_height,
|
| + timestamp, duration));
|
| switch (format) {
|
| case VideoFrame::RGB32:
|
| frame->AllocateRGB(4u);
|
| @@ -58,11 +71,15 @@ scoped_refptr<VideoFrame> VideoFrame::WrapNativeTexture(
|
| uint32 texture_target,
|
| size_t width,
|
| size_t height,
|
| + size_t natural_width,
|
| + size_t natural_height,
|
| base::TimeDelta timestamp,
|
| base::TimeDelta duration,
|
| const base::Closure& no_longer_needed) {
|
| scoped_refptr<VideoFrame> frame(
|
| - new VideoFrame(NATIVE_TEXTURE, width, height, timestamp, duration));
|
| + new VideoFrame(NATIVE_TEXTURE, width, height,
|
| + natural_width, natural_height,
|
| + timestamp, duration));
|
| frame->texture_id_ = texture_id;
|
| frame->texture_target_ = texture_target;
|
| frame->texture_no_longer_needed_ = no_longer_needed;
|
| @@ -72,7 +89,7 @@ scoped_refptr<VideoFrame> VideoFrame::WrapNativeTexture(
|
| // static
|
| scoped_refptr<VideoFrame> VideoFrame::CreateEmptyFrame() {
|
| return new VideoFrame(
|
| - VideoFrame::EMPTY, 0, 0, base::TimeDelta(), base::TimeDelta());
|
| + VideoFrame::EMPTY, 0, 0, 0, 0, base::TimeDelta(), base::TimeDelta());
|
| }
|
|
|
| // static
|
| @@ -83,7 +100,8 @@ scoped_refptr<VideoFrame> VideoFrame::CreateBlackFrame(int width, int height) {
|
| // Create our frame.
|
| const base::TimeDelta kZero;
|
| scoped_refptr<VideoFrame> frame =
|
| - VideoFrame::CreateFrame(VideoFrame::YV12, width, height, kZero, kZero);
|
| + VideoFrame::CreateFrame(VideoFrame::YV12, width, height, width, height,
|
| + kZero, kZero);
|
|
|
| // Now set the data to YUV(0,128,128).
|
| const uint8 kBlackY = 0x00;
|
| @@ -160,11 +178,15 @@ void VideoFrame::AllocateYUV() {
|
| VideoFrame::VideoFrame(VideoFrame::Format format,
|
| size_t width,
|
| size_t height,
|
| + size_t natural_width,
|
| + size_t natural_height,
|
| base::TimeDelta timestamp,
|
| base::TimeDelta duration)
|
| : format_(format),
|
| width_(width),
|
| height_(height),
|
| + natural_width_(natural_width),
|
| + natural_height_(natural_height),
|
| texture_id_(0),
|
| texture_target_(0),
|
| timestamp_(timestamp),
|
|
|