OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #ifndef WEBRTC_TEST_FRAME_GENERATOR_H_ | 10 #ifndef WEBRTC_TEST_FRAME_GENERATOR_H_ |
(...skipping 24 matching lines...) Expand all Loading... |
35 virtual void IncomingCapturedFrame(const VideoFrame& video_frame); | 35 virtual void IncomingCapturedFrame(const VideoFrame& video_frame); |
36 rtc::VideoSinkWants sink_wants() const; | 36 rtc::VideoSinkWants sink_wants() const; |
37 bool has_sinks() const; | 37 bool has_sinks() const; |
38 | 38 |
39 protected: | 39 protected: |
40 void AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink, | 40 void AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink, |
41 const rtc::VideoSinkWants& wants) override; | 41 const rtc::VideoSinkWants& wants) override; |
42 void RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) override; | 42 void RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) override; |
43 | 43 |
44 rtc::CriticalSection crit_; | 44 rtc::CriticalSection crit_; |
45 rtc::VideoSinkInterface<VideoFrame>* sink_ GUARDED_BY(crit_); | 45 rtc::VideoSinkInterface<VideoFrame>* sink_ RTC_GUARDED_BY(crit_); |
46 rtc::VideoSinkWants sink_wants_ GUARDED_BY(crit_); | 46 rtc::VideoSinkWants sink_wants_ RTC_GUARDED_BY(crit_); |
47 }; | 47 }; |
48 | 48 |
49 class FrameGenerator { | 49 class FrameGenerator { |
50 public: | 50 public: |
51 virtual ~FrameGenerator() = default; | 51 virtual ~FrameGenerator() = default; |
52 | 52 |
53 // Returns video frame that remains valid until next call. | 53 // Returns video frame that remains valid until next call. |
54 virtual VideoFrame* NextFrame() = 0; | 54 virtual VideoFrame* NextFrame() = 0; |
55 | 55 |
56 // Change the capture resolution. | 56 // Change the capture resolution. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 // Creates a frame generator that produces randomly generated slides. | 93 // Creates a frame generator that produces randomly generated slides. |
94 // frame_repeat_count determines how many times each slide is shown. | 94 // frame_repeat_count determines how many times each slide is shown. |
95 static std::unique_ptr<FrameGenerator> CreateSlideGenerator( | 95 static std::unique_ptr<FrameGenerator> CreateSlideGenerator( |
96 int width, int height, int frame_repeat_count); | 96 int width, int height, int frame_repeat_count); |
97 }; | 97 }; |
98 } // namespace test | 98 } // namespace test |
99 } // namespace webrtc | 99 } // namespace webrtc |
100 | 100 |
101 #endif // WEBRTC_TEST_FRAME_GENERATOR_H_ | 101 #endif // WEBRTC_TEST_FRAME_GENERATOR_H_ |
OLD | NEW |