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

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

Issue 2304363002: Let ViEEncoder express resolution requests as Sinkwants (Closed)
Patch Set: Rebased. Created 4 years, 1 month 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
« no previous file with comments | « webrtc/test/fake_encoder.cc ('k') | webrtc/test/frame_generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_H_ 10 #ifndef WEBRTC_TEST_FRAME_GENERATOR_H_
(...skipping 13 matching lines...) Expand all
24 24
25 // FrameForwarder can be used as an implementation 25 // FrameForwarder can be used as an implementation
26 // of rtc::VideoSourceInterface<VideoFrame> where the caller controls when 26 // of rtc::VideoSourceInterface<VideoFrame> where the caller controls when
27 // a frame should be forwarded to its sink. 27 // a frame should be forwarded to its sink.
28 // Currently this implementation only support one sink. 28 // Currently this implementation only support one sink.
29 class FrameForwarder : public rtc::VideoSourceInterface<VideoFrame> { 29 class FrameForwarder : public rtc::VideoSourceInterface<VideoFrame> {
30 public: 30 public:
31 FrameForwarder(); 31 FrameForwarder();
32 // Forwards |video_frame| to the registered |sink_|. 32 // Forwards |video_frame| to the registered |sink_|.
33 void IncomingCapturedFrame(const VideoFrame& video_frame); 33 void IncomingCapturedFrame(const VideoFrame& video_frame);
34 rtc::VideoSinkWants sink_wants() const;
35 bool has_sinks() const;
34 36
35 private: 37 private:
36 void AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink, 38 void AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink,
37 const rtc::VideoSinkWants& wants) override; 39 const rtc::VideoSinkWants& wants) override;
38 void RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) override; 40 void RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) override;
39 41
40 rtc::CriticalSection crit_; 42 rtc::CriticalSection crit_;
41 rtc::VideoSinkInterface<VideoFrame>* sink_ GUARDED_BY(crit_); 43 rtc::VideoSinkInterface<VideoFrame>* sink_ GUARDED_BY(crit_);
44 rtc::VideoSinkWants sink_wants_ GUARDED_BY(crit_);
42 }; 45 };
43 46
44 class FrameGenerator { 47 class FrameGenerator {
45 public: 48 public:
46 FrameGenerator() {} 49 FrameGenerator() {}
47 virtual ~FrameGenerator() {} 50 virtual ~FrameGenerator() {}
48 51
49 // Returns video frame that remains valid until next call. 52 // Returns video frame that remains valid until next call.
50 virtual VideoFrame* NextFrame() = 0; 53 virtual VideoFrame* NextFrame() = 0;
51 54
(...skipping 29 matching lines...) Expand all
81 size_t source_height, 84 size_t source_height,
82 size_t target_width, 85 size_t target_width,
83 size_t target_height, 86 size_t target_height,
84 int64_t scroll_time_ms, 87 int64_t scroll_time_ms,
85 int64_t pause_time_ms); 88 int64_t pause_time_ms);
86 }; 89 };
87 } // namespace test 90 } // namespace test
88 } // namespace webrtc 91 } // namespace webrtc
89 92
90 #endif // WEBRTC_TEST_FRAME_GENERATOR_H_ 93 #endif // WEBRTC_TEST_FRAME_GENERATOR_H_
OLDNEW
« no previous file with comments | « webrtc/test/fake_encoder.cc ('k') | webrtc/test/frame_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698