OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 98 |
99 private: | 99 private: |
100 VideoCapturer* capturer_; | 100 VideoCapturer* capturer_; |
101 CaptureState last_capture_state_; | 101 CaptureState last_capture_state_; |
102 int frame_count_; | 102 int frame_count_; |
103 int frame_width_; | 103 int frame_width_; |
104 int frame_height_; | 104 int frame_height_; |
105 bool resolution_changed_; | 105 bool resolution_changed_; |
106 }; | 106 }; |
107 | 107 |
108 class ScreencastEventCatcher : public sigslot::has_slots<> { | |
109 public: | |
110 ScreencastEventCatcher() : ssrc_(0), ev_(rtc::WE_RESIZE) { } | |
111 uint32_t ssrc() const { return ssrc_; } | |
112 rtc::WindowEvent event() const { return ev_; } | |
113 void OnEvent(uint32_t ssrc, rtc::WindowEvent ev) { | |
114 ssrc_ = ssrc; | |
115 ev_ = ev; | |
116 } | |
117 private: | |
118 uint32_t ssrc_; | |
119 rtc::WindowEvent ev_; | |
120 }; | |
121 | |
122 class VideoMediaErrorCatcher : public sigslot::has_slots<> { | 108 class VideoMediaErrorCatcher : public sigslot::has_slots<> { |
123 public: | 109 public: |
124 VideoMediaErrorCatcher() : ssrc_(0), error_(VideoMediaChannel::ERROR_NONE) { } | 110 VideoMediaErrorCatcher() : ssrc_(0), error_(VideoMediaChannel::ERROR_NONE) { } |
125 uint32_t ssrc() const { return ssrc_; } | 111 uint32_t ssrc() const { return ssrc_; } |
126 VideoMediaChannel::Error error() const { return error_; } | 112 VideoMediaChannel::Error error() const { return error_; } |
127 void OnError(uint32_t ssrc, VideoMediaChannel::Error error) { | 113 void OnError(uint32_t ssrc, VideoMediaChannel::Error error) { |
128 ssrc_ = ssrc; | 114 ssrc_ = ssrc; |
129 error_ = error; | 115 error_ = error; |
130 } | 116 } |
131 private: | 117 private: |
(...skipping 25 matching lines...) Expand all Loading... |
157 | 143 |
158 // Create StreamParams with single primary SSRC and corresponding FlexFEC SSRC. | 144 // Create StreamParams with single primary SSRC and corresponding FlexFEC SSRC. |
159 cricket::StreamParams CreatePrimaryWithFecFrStreamParams( | 145 cricket::StreamParams CreatePrimaryWithFecFrStreamParams( |
160 const std::string& cname, | 146 const std::string& cname, |
161 uint32_t primary_ssrc, | 147 uint32_t primary_ssrc, |
162 uint32_t flexfec_ssrc); | 148 uint32_t flexfec_ssrc); |
163 | 149 |
164 } // namespace cricket | 150 } // namespace cricket |
165 | 151 |
166 #endif // WEBRTC_MEDIA_BASE_TESTUTILS_H_ | 152 #endif // WEBRTC_MEDIA_BASE_TESTUTILS_H_ |
OLD | NEW |