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

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

Issue 312803002: Android media: VideoFrame should not store so many sync points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make VideoFrame keep only one sync point per client Created 6 years, 6 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 OnStateChanged(VIDEO_CAPTURE_STATE_STARTED); 71 OnStateChanged(VIDEO_CAPTURE_STATE_STARTED);
72 capture_params_ = params; 72 capture_params_ = params;
73 } 73 }
74 74
75 void DevicePauseCapture(int device_id) {} 75 void DevicePauseCapture(int device_id) {}
76 76
77 void DeviceStopCapture(int device_id) { 77 void DeviceStopCapture(int device_id) {
78 OnStateChanged(VIDEO_CAPTURE_STATE_STOPPED); 78 OnStateChanged(VIDEO_CAPTURE_STATE_STOPPED);
79 } 79 }
80 80
81 void DeviceReceiveEmptyBuffer(int device_id, 81 void DeviceReceiveEmptyBuffer(
82 int buffer_id, 82 int device_id,
83 const std::vector<uint32>& sync_points) {} 83 int buffer_id,
84 const std::map<uintptr_t, uint32>& sync_points) {}
84 85
85 void DeviceGetSupportedFormats(int device_id, 86 void DeviceGetSupportedFormats(int device_id,
86 media::VideoCaptureSessionId session_id) { 87 media::VideoCaptureSessionId session_id) {
87 // When the mock message filter receives a request for the device 88 // When the mock message filter receives a request for the device
88 // supported formats, replies immediately with an empty format list. 89 // supported formats, replies immediately with an empty format list.
89 OnDeviceSupportedFormatsEnumerated( 90 OnDeviceSupportedFormatsEnumerated(
90 media::VideoCaptureFormats()); 91 media::VideoCaptureFormats());
91 } 92 }
92 93
93 void DeviceGetFormatsInUse(int device_id, 94 void DeviceGetFormatsInUse(int device_id,
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 StartCapture(0, params_small_); 305 StartCapture(0, params_small_);
305 306
306 // Receive state change message from browser. 307 // Receive state change message from browser.
307 video_capture_impl_->ReceiveStateChangeMessage(VIDEO_CAPTURE_STATE_ERROR); 308 video_capture_impl_->ReceiveStateChangeMessage(VIDEO_CAPTURE_STATE_ERROR);
308 309
309 StopCapture(0); 310 StopCapture(0);
310 DeInit(); 311 DeInit();
311 } 312 }
312 313
313 } // namespace content 314 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698