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

Side by Side Diff: content/browser/renderer_host/media/video_capture_controller_unittest.cc

Issue 2121043002: 16 bpp video stream capture, render and WebGL usage - Realsense R200 & SR300 support. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gpu memory buffers, reinterpret RG8->R32F on GPU, Linux and ChromeOS support added. Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Unit test for VideoCaptureController. 5 // Unit test for VideoCaptureController.
6 6
7 #include "content/browser/renderer_host/media/video_capture_controller.h" 7 #include "content/browser/renderer_host/media/video_capture_controller.h"
8 8
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 MOCK_METHOD1(DoError, void(VideoCaptureControllerID)); 59 MOCK_METHOD1(DoError, void(VideoCaptureControllerID));
60 60
61 void OnError(VideoCaptureControllerID id) override { 61 void OnError(VideoCaptureControllerID id) override {
62 DoError(id); 62 DoError(id);
63 } 63 }
64 void OnBufferCreated(VideoCaptureControllerID id, 64 void OnBufferCreated(VideoCaptureControllerID id,
65 base::SharedMemoryHandle handle, 65 base::SharedMemoryHandle handle,
66 int length, int buffer_id) override { 66 int length, int buffer_id) override {
67 DoBufferCreated(id); 67 DoBufferCreated(id);
68 } 68 }
69 void OnBufferCreated2( 69 void OnBufferCreated2(VideoCaptureControllerID id,
70 VideoCaptureControllerID id, 70 const std::vector<gfx::GpuMemoryBufferHandle>& handles,
71 const std::vector<gfx::GpuMemoryBufferHandle>& handles, 71 const gfx::Size& size,
72 const gfx::Size& size, 72 media::VideoPixelFormat format,
73 int buffer_id) override { 73 int buffer_id) override {
74 DoBufferCreated2(id); 74 DoBufferCreated2(id);
75 } 75 }
76 void OnBufferDestroyed(VideoCaptureControllerID id, int buffer_id) override { 76 void OnBufferDestroyed(VideoCaptureControllerID id, int buffer_id) override {
77 DoBufferDestroyed(id); 77 DoBufferDestroyed(id);
78 } 78 }
79 void OnBufferReady(VideoCaptureControllerID id, 79 void OnBufferReady(VideoCaptureControllerID id,
80 int buffer_id, 80 int buffer_id,
81 const scoped_refptr<media::VideoFrame>& frame) override { 81 const scoped_refptr<media::VideoFrame>& frame) override {
82 EXPECT_EQ(frame->format(), media::PIXEL_FORMAT_I420); 82 EXPECT_EQ(frame->format(), media::PIXEL_FORMAT_I420);
83 base::TimeTicks reference_time; 83 base::TimeTicks reference_time;
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 581
582 // Second client connects after the error state. It also should get told of 582 // Second client connects after the error state. It also should get told of
583 // the error. 583 // the error.
584 EXPECT_CALL(*client_b_, DoError(route_id)).Times(1); 584 EXPECT_CALL(*client_b_, DoError(route_id)).Times(1);
585 controller_->AddClient( 585 controller_->AddClient(
586 route_id, client_b_.get(), base::kNullProcessHandle, 200, session_200); 586 route_id, client_b_.get(), base::kNullProcessHandle, 200, session_200);
587 Mock::VerifyAndClearExpectations(client_b_.get()); 587 Mock::VerifyAndClearExpectations(client_b_.get());
588 } 588 }
589 589
590 } // namespace content 590 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698