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

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

Issue 1267883002: Pass GpuMemoryBuffer backed VideoFrame from browser to renderer processes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gmbtracker-multiple
Patch Set: Rebase Created 5 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 VideoCaptureManager. 5 // Unit test for VideoCaptureManager.
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 30 matching lines...) Expand all
41 }; // class MockMediaStreamProviderListener 41 }; // class MockMediaStreamProviderListener
42 42
43 // Needed as an input argument to StartCaptureForClient(). 43 // Needed as an input argument to StartCaptureForClient().
44 class MockFrameObserver : public VideoCaptureControllerEventHandler { 44 class MockFrameObserver : public VideoCaptureControllerEventHandler {
45 public: 45 public:
46 MOCK_METHOD1(OnError, void(VideoCaptureControllerID id)); 46 MOCK_METHOD1(OnError, void(VideoCaptureControllerID id));
47 47
48 void OnBufferCreated(VideoCaptureControllerID id, 48 void OnBufferCreated(VideoCaptureControllerID id,
49 base::SharedMemoryHandle handle, 49 base::SharedMemoryHandle handle,
50 int length, int buffer_id) override {} 50 int length, int buffer_id) override {}
51 void OnBufferCreated2(VideoCaptureControllerID id,
52 const std::vector<gfx::GpuMemoryBufferHandle>& handles,
53 const gfx::Size& size,
54 int buffer_id) override {}
51 void OnBufferDestroyed(VideoCaptureControllerID id, int buffer_id) override {} 55 void OnBufferDestroyed(VideoCaptureControllerID id, int buffer_id) override {}
52 void OnBufferReady(VideoCaptureControllerID id, 56 void OnBufferReady(VideoCaptureControllerID id,
53 int buffer_id, 57 int buffer_id,
54 const scoped_refptr<media::VideoFrame>& frame, 58 const scoped_refptr<media::VideoFrame>& frame,
55 const base::TimeTicks& timestamp) override {} 59 const base::TimeTicks& timestamp) override {}
56 void OnEnded(VideoCaptureControllerID id) override {} 60 void OnEnded(VideoCaptureControllerID id) override {}
57 61
58 void OnGotControllerCallback(VideoCaptureControllerID) {} 62 void OnGotControllerCallback(VideoCaptureControllerID) {}
59 }; 63 };
60 64
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 506
503 // Wait to check callbacks before removing the listener 507 // Wait to check callbacks before removing the listener
504 message_loop_->RunUntilIdle(); 508 message_loop_->RunUntilIdle();
505 vcm_->Unregister(); 509 vcm_->Unregister();
506 } 510 }
507 511
508 // TODO(mcasas): Add a test to check consolidation of the supported formats 512 // TODO(mcasas): Add a test to check consolidation of the supported formats
509 // provided by the device when http://crbug.com/323913 is closed. 513 // provided by the device when http://crbug.com/323913 is closed.
510 514
511 } // namespace content 515 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/video_capture_host.cc ('k') | content/common/media/video_capture_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698