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

Side by Side Diff: content/browser/media/capture/desktop_capture_device_unittest.cc

Issue 2566983007: [Mojo Video Capture] Replace method OnIncomingCapturedVideoFrame with OnIncomingCapturedBufferExt (Closed)
Patch Set: mcasas comments Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/media/capture/desktop_capture_device.h" 5 #include "content/browser/media/capture/desktop_capture_device.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string.h> 9 #include <string.h>
10 #include <algorithm> 10 #include <algorithm>
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 storage == media::PIXEL_STORAGE_CPU); 85 storage == media::PIXEL_STORAGE_CPU);
86 DoReserveOutputBuffer(); 86 DoReserveOutputBuffer();
87 return std::unique_ptr<Buffer>(); 87 return std::unique_ptr<Buffer>();
88 } 88 }
89 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer, 89 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer,
90 const media::VideoCaptureFormat& format, 90 const media::VideoCaptureFormat& format,
91 base::TimeTicks reference_time, 91 base::TimeTicks reference_time,
92 base::TimeDelta timestamp) override { 92 base::TimeDelta timestamp) override {
93 DoOnIncomingCapturedBuffer(); 93 DoOnIncomingCapturedBuffer();
94 } 94 }
95 void OnIncomingCapturedVideoFrame( 95 void OnIncomingCapturedBufferExt(
96 std::unique_ptr<Buffer> buffer, 96 std::unique_ptr<Buffer> buffer,
97 scoped_refptr<media::VideoFrame> frame) override { 97 const media::VideoCaptureFormat& format,
98 base::TimeTicks reference_time,
99 base::TimeDelta timestamp,
100 gfx::Rect visible_rect,
101 const media::VideoFrameMetadata& additional_metadata) override {
98 DoOnIncomingCapturedVideoFrame(); 102 DoOnIncomingCapturedVideoFrame();
99 } 103 }
100 std::unique_ptr<Buffer> ResurrectLastOutputBuffer( 104 std::unique_ptr<Buffer> ResurrectLastOutputBuffer(
101 const gfx::Size& dimensions, 105 const gfx::Size& dimensions,
102 media::VideoPixelFormat format, 106 media::VideoPixelFormat format,
103 media::VideoPixelStorage storage, 107 media::VideoPixelStorage storage,
104 int frame_feedback_id) override { 108 int frame_feedback_id) override {
105 EXPECT_TRUE(format == media::PIXEL_FORMAT_I420 && 109 EXPECT_TRUE(format == media::PIXEL_FORMAT_I420 &&
106 storage == media::PIXEL_STORAGE_CPU); 110 storage == media::PIXEL_STORAGE_CPU);
107 DoResurrectLastOutputBuffer(); 111 DoResurrectLastOutputBuffer();
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 frame_size); 557 frame_size);
554 for (int i = 0; i < output_frame_->size().height(); ++i) { 558 for (int i = 0; i < output_frame_->size().height(); ++i) {
555 EXPECT_EQ(0, 559 EXPECT_EQ(0,
556 memcmp(inverted_frame->data() + i * inverted_frame->stride(), 560 memcmp(inverted_frame->data() + i * inverted_frame->stride(),
557 output_frame_->data() + i * output_frame_->stride(), 561 output_frame_->data() + i * output_frame_->stride(),
558 output_frame_->stride())); 562 output_frame_->stride()));
559 } 563 }
560 } 564 }
561 565
562 } // namespace content 566 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698