OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_ |
6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_ | 6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_ |
7 | 7 |
8 #include "content/renderer/media/media_stream_video_source.h" | 8 #include "content/renderer/media/media_stream_video_source.h" |
9 | 9 |
10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 protected: | 52 protected: |
53 // Implements MediaStreamVideoSource. | 53 // Implements MediaStreamVideoSource. |
54 void GetCurrentSupportedFormats( | 54 void GetCurrentSupportedFormats( |
55 int max_requested_height, | 55 int max_requested_height, |
56 int max_requested_width, | 56 int max_requested_width, |
57 double max_requested_frame_rate, | 57 double max_requested_frame_rate, |
58 const VideoCaptureDeviceFormatsCB& callback) override; | 58 const VideoCaptureDeviceFormatsCB& callback) override; |
59 void StartSourceImpl( | 59 void StartSourceImpl( |
60 const media::VideoCaptureFormat& format, | 60 const media::VideoCaptureFormat& format, |
| 61 const blink::WebMediaConstraints& constraints, |
61 const VideoCaptureDeliverFrameCB& frame_callback) override; | 62 const VideoCaptureDeliverFrameCB& frame_callback) override; |
62 void StopSourceImpl() override; | 63 void StopSourceImpl() override; |
63 | 64 |
64 private: | 65 private: |
65 media::VideoCaptureFormat format_; | 66 media::VideoCaptureFormat format_; |
66 media::VideoCaptureFormats supported_formats_; | 67 media::VideoCaptureFormats supported_formats_; |
67 bool manual_get_supported_formats_; | 68 bool manual_get_supported_formats_; |
68 int max_requested_height_; | 69 int max_requested_height_; |
69 int max_requested_width_; | 70 int max_requested_width_; |
70 double max_requested_frame_rate_; | 71 double max_requested_frame_rate_; |
71 bool attempted_to_start_; | 72 bool attempted_to_start_; |
72 VideoCaptureDeviceFormatsCB formats_callback_; | 73 VideoCaptureDeviceFormatsCB formats_callback_; |
73 VideoCaptureDeliverFrameCB frame_callback_; | 74 VideoCaptureDeliverFrameCB frame_callback_; |
74 | 75 |
75 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamVideoSource); | 76 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamVideoSource); |
76 }; | 77 }; |
77 | 78 |
78 } // namespace content | 79 } // namespace content |
79 | 80 |
80 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_ | 81 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_ |
OLD | NEW |