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

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

Issue 16320005: Define EncodedVideoSource and RtcCapturedEncodingVideoCapturer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased at 209707. Fix compile warnings. Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/media/video_capture_message_filter.cc ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.h" 5 #include "base/message_loop.h"
6 #include "base/shared_memory.h" 6 #include "base/shared_memory.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_message_filter.h" 8 #include "content/renderer/media/video_capture_message_filter.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 params_.width = params.width; 43 params_.width = params.width;
44 params_.height = params.height; 44 params_.height = params.height;
45 params_.frame_per_second = params.frame_per_second; 45 params_.frame_per_second = params.frame_per_second;
46 } 46 }
47 47
48 virtual void OnDelegateAdded(int32 device_id) OVERRIDE { 48 virtual void OnDelegateAdded(int32 device_id) OVERRIDE {
49 device_id_received_ = true; 49 device_id_received_ = true;
50 device_id_ = device_id; 50 device_id_ = device_id;
51 } 51 }
52 52
53 // TODO(hshi): implement the following methods for encoded video capture.
54 virtual void OnEncodingCapabilitiesAvailable(
55 const media::VideoEncodingCapabilities& capabilities) OVERRIDE {}
56 virtual void OnEncodedBitstreamOpened(
57 const media::VideoEncodingParameters& params,
58 const std::vector<base::SharedMemoryHandle>& buffers,
59 uint32 buffer_size) OVERRIDE {}
60 virtual void OnEncodedBitstreamClosed() OVERRIDE {}
61 virtual void OnEncodingConfigChanged(
62 const media::RuntimeVideoEncodingParameters& params) OVERRIDE {}
63 virtual void OnEncodedBufferReady(
64 int buffer_id,
65 uint32 size,
66 const media::BufferEncodingMetadata& metadata) OVERRIDE {}
67
53 void Reset() { 68 void Reset() {
54 buffer_created_ = false; 69 buffer_created_ = false;
55 handle_ = base::SharedMemory::NULLHandle(); 70 handle_ = base::SharedMemory::NULLHandle();
56 71
57 buffer_received_ = false; 72 buffer_received_ = false;
58 buffer_id_ = -1; 73 buffer_id_ = -1;
59 timestamp_ = base::Time(); 74 timestamp_ = base::Time();
60 75
61 state_changed_received_ = false; 76 state_changed_received_ = false;
62 state_ = VIDEO_CAPTURE_STATE_ERROR; 77 state_ = VIDEO_CAPTURE_STATE_ERROR;
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 EXPECT_FALSE(delegate2.state_changed_received()); 227 EXPECT_FALSE(delegate2.state_changed_received());
213 filter->OnMessageReceived( 228 filter->OnMessageReceived(
214 VideoCaptureMsg_StateChanged(delegate2.device_id(), 229 VideoCaptureMsg_StateChanged(delegate2.device_id(),
215 VIDEO_CAPTURE_STATE_STARTED)); 230 VIDEO_CAPTURE_STATE_STARTED));
216 EXPECT_FALSE(delegate2.state_changed_received()); 231 EXPECT_FALSE(delegate2.state_changed_received());
217 232
218 message_loop.RunUntilIdle(); 233 message_loop.RunUntilIdle();
219 } 234 }
220 235
221 } // namespace content 236 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/video_capture_message_filter.cc ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698