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

Side by Side Diff: webrtc/test/frame_generator_capturer.h

Issue 2716643002: Add framerate to VideoSinkWants and ability to signal on overuse (Closed)
Patch Set: windows warning Created 3 years, 9 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
OLDNEW
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_CAPTURER_H_ 10 #ifndef WEBRTC_TEST_FRAME_GENERATOR_CAPTURER_H_
11 #define WEBRTC_TEST_FRAME_GENERATOR_CAPTURER_H_ 11 #define WEBRTC_TEST_FRAME_GENERATOR_CAPTURER_H_
12 12
13 #include <memory> 13 #include <memory>
14 #include <string> 14 #include <string>
15 15
16 #include "webrtc/api/video/video_frame.h" 16 #include "webrtc/api/video/video_frame.h"
17 #include "webrtc/base/criticalsection.h" 17 #include "webrtc/base/criticalsection.h"
18 #include "webrtc/base/platform_thread.h" 18 #include "webrtc/base/platform_thread.h"
19 #include "webrtc/test/video_capturer.h" 19 #include "webrtc/test/video_capturer.h"
20 #include "webrtc/typedefs.h" 20 #include "webrtc/typedefs.h"
21 21
22 namespace cricket {
23 class VideoAdapter;
24 } // namespace cricket
25
22 namespace webrtc { 26 namespace webrtc {
23 27
24 class CriticalSectionWrapper; 28 class CriticalSectionWrapper;
25 class EventTimerWrapper; 29 class EventTimerWrapper;
26 30
27 namespace test { 31 namespace test {
28 32
29 class FrameGenerator; 33 class FrameGenerator;
30 34
31 class FrameGeneratorCapturer : public VideoCapturer { 35 class FrameGeneratorCapturer : public VideoCapturer {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 83
80 Clock* const clock_; 84 Clock* const clock_;
81 bool sending_; 85 bool sending_;
82 rtc::VideoSinkInterface<VideoFrame>* sink_ GUARDED_BY(&lock_); 86 rtc::VideoSinkInterface<VideoFrame>* sink_ GUARDED_BY(&lock_);
83 SinkWantsObserver* sink_wants_observer_ GUARDED_BY(&lock_); 87 SinkWantsObserver* sink_wants_observer_ GUARDED_BY(&lock_);
84 88
85 std::unique_ptr<EventTimerWrapper> tick_; 89 std::unique_ptr<EventTimerWrapper> tick_;
86 rtc::CriticalSection lock_; 90 rtc::CriticalSection lock_;
87 rtc::PlatformThread thread_; 91 rtc::PlatformThread thread_;
88 std::unique_ptr<FrameGenerator> frame_generator_; 92 std::unique_ptr<FrameGenerator> frame_generator_;
93 std::unique_ptr<cricket::VideoAdapter> video_adpter_;
89 94
90 int target_fps_; 95 int target_fps_ GUARDED_BY(&lock_);
96 rtc::Optional<int> wanted_fps_ GUARDED_BY(&lock_);
91 VideoRotation fake_rotation_ = kVideoRotation_0; 97 VideoRotation fake_rotation_ = kVideoRotation_0;
92 98
93 int64_t first_frame_capture_time_; 99 int64_t first_frame_capture_time_;
94 }; 100 };
95 } // test 101 } // test
96 } // webrtc 102 } // webrtc
97 103
98 #endif // WEBRTC_TEST_FRAME_GENERATOR_CAPTURER_H_ 104 #endif // WEBRTC_TEST_FRAME_GENERATOR_CAPTURER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698