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

Side by Side Diff: content/renderer/media/video_capture_impl_unittest.cc

Issue 955253002: Add metadata to media::VideoFrame and plumb it through IPC/MediaStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tommi's nits addressed Created 5 years, 9 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 #include "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "content/child/child_process.h" 6 #include "content/child/child_process.h"
7 #include "content/common/media/video_capture_messages.h" 7 #include "content/common/media/video_capture_messages.h"
8 #include "content/renderer/media/video_capture_impl.h" 8 #include "content/renderer/media/video_capture_impl.h"
9 #include "media/base/bind_to_current_loop.h" 9 #include "media/base/bind_to_current_loop.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 video_capture_impl_.reset(new MockVideoCaptureImpl( 122 video_capture_impl_.reset(new MockVideoCaptureImpl(
123 session_id_, message_filter_.get())); 123 session_id_, message_filter_.get()));
124 124
125 video_capture_impl_->device_id_ = 2; 125 video_capture_impl_->device_id_ = 2;
126 } 126 }
127 127
128 virtual ~VideoCaptureImplTest() { 128 virtual ~VideoCaptureImplTest() {
129 } 129 }
130 130
131 protected: 131 protected:
132 MOCK_METHOD3(OnFrameReady, 132 MOCK_METHOD2(OnFrameReady,
133 void(const scoped_refptr<media::VideoFrame>&, 133 void(const scoped_refptr<media::VideoFrame>&,
134 const media::VideoCaptureFormat&,
135 const base::TimeTicks&)); 134 const base::TimeTicks&));
136 MOCK_METHOD1(OnStateUpdate, void(VideoCaptureState)); 135 MOCK_METHOD1(OnStateUpdate, void(VideoCaptureState));
137 MOCK_METHOD1(OnDeviceFormatsInUse, 136 MOCK_METHOD1(OnDeviceFormatsInUse,
138 void(const media::VideoCaptureFormats&)); 137 void(const media::VideoCaptureFormats&));
139 MOCK_METHOD1(OnDeviceSupportedFormats, 138 MOCK_METHOD1(OnDeviceSupportedFormats,
140 void(const media::VideoCaptureFormats&)); 139 void(const media::VideoCaptureFormats&));
141 140
142 void Init() { 141 void Init() {
143 video_capture_impl_->Init(); 142 video_capture_impl_->Init();
144 } 143 }
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 StartCapture(0, params_small_); 303 StartCapture(0, params_small_);
305 304
306 // Receive state change message from browser. 305 // Receive state change message from browser.
307 video_capture_impl_->ReceiveStateChangeMessage(VIDEO_CAPTURE_STATE_ERROR); 306 video_capture_impl_->ReceiveStateChangeMessage(VIDEO_CAPTURE_STATE_ERROR);
308 307
309 StopCapture(0); 308 StopCapture(0);
310 DeInit(); 309 DeInit();
311 } 310 }
312 311
313 } // namespace content 312 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/video_capture_impl_manager_unittest.cc ('k') | content/renderer/media/video_capture_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698