OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "media/capture/video/video_capture_device_client.h" | 5 #include "media/capture/video/video_capture_device_client.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 namespace { | 35 namespace { |
36 | 36 |
37 class MockVideoCaptureController : public VideoCaptureController { | 37 class MockVideoCaptureController : public VideoCaptureController { |
38 public: | 38 public: |
39 explicit MockVideoCaptureController() : VideoCaptureController() {} | 39 explicit MockVideoCaptureController() : VideoCaptureController() {} |
40 ~MockVideoCaptureController() override {} | 40 ~MockVideoCaptureController() override {} |
41 | 41 |
42 MOCK_METHOD1(MockOnIncomingCapturedVideoFrame, void(const gfx::Size&)); | 42 MOCK_METHOD1(MockOnIncomingCapturedVideoFrame, void(const gfx::Size&)); |
43 MOCK_METHOD0(OnError, void()); | 43 MOCK_METHOD0(OnError, void()); |
44 MOCK_METHOD1(OnLog, void(const std::string& message)); | 44 MOCK_METHOD1(OnLog, void(const std::string& message)); |
45 MOCK_METHOD1(OnBufferDestroyed, void(int buffer_id_to_drop)); | 45 MOCK_METHOD1(OnBufferRetired, void(int buffer_id)); |
46 | 46 |
47 void OnIncomingCapturedVideoFrame( | 47 void OnIncomingCapturedVideoFrame( |
48 media::VideoCaptureDevice::Client::Buffer buffer, | 48 media::VideoCaptureDevice::Client::Buffer buffer, |
49 scoped_refptr<media::VideoFrame> frame) override { | 49 scoped_refptr<media::VideoFrame> frame) override { |
50 MockOnIncomingCapturedVideoFrame(frame->coded_size()); | 50 MockOnIncomingCapturedVideoFrame(frame->coded_size()); |
51 } | 51 } |
52 }; | 52 }; |
53 | 53 |
54 std::unique_ptr<media::VideoCaptureJpegDecoder> CreateGpuJpegDecoder( | 54 std::unique_ptr<media::VideoCaptureJpegDecoder> CreateGpuJpegDecoder( |
55 const media::VideoCaptureJpegDecoder::DecodeDoneCB& decode_done_cb) { | 55 const media::VideoCaptureJpegDecoder::DecodeDoneCB& decode_done_cb) { |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 | 249 |
250 EXPECT_EQ(coded_size.width(), size_and_rotation.output_resolution.width()); | 250 EXPECT_EQ(coded_size.width(), size_and_rotation.output_resolution.width()); |
251 EXPECT_EQ(coded_size.height(), | 251 EXPECT_EQ(coded_size.height(), |
252 size_and_rotation.output_resolution.height()); | 252 size_and_rotation.output_resolution.height()); |
253 | 253 |
254 Mock::VerifyAndClearExpectations(controller_.get()); | 254 Mock::VerifyAndClearExpectations(controller_.get()); |
255 } | 255 } |
256 } | 256 } |
257 | 257 |
258 } // namespace content | 258 } // namespace content |
OLD | NEW |