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

Side by Side Diff: webrtc/media/base/adaptedvideotracksource.h

Issue 2555483005: Add ability to scale to arbitrary factors (Closed)
Patch Set: rebase Created 4 years 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 | « no previous file | webrtc/media/base/videoadapter.h » ('j') | webrtc/media/base/videoadapter.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 int* crop_x, 46 int* crop_x,
47 int* crop_y); 47 int* crop_y);
48 48
49 // Returns the current value of the apply_rotation flag, derived 49 // Returns the current value of the apply_rotation flag, derived
50 // from the VideoSinkWants of registered sinks. The value is derived 50 // from the VideoSinkWants of registered sinks. The value is derived
51 // from sinks' wants, in AddOrUpdateSink and RemoveSink. Beware that 51 // from sinks' wants, in AddOrUpdateSink and RemoveSink. Beware that
52 // when using this method from a different thread, the value may 52 // when using this method from a different thread, the value may
53 // become stale before it is used. 53 // become stale before it is used.
54 bool apply_rotation(); 54 bool apply_rotation();
55 55
56 cricket::VideoAdapter* video_adapter() { return &video_adapter_; } 56 virtual cricket::VideoAdapter* video_adapter() { return &video_adapter_; }
magjed_webrtc 2016/12/07 13:44:51 Don't make this virtual. Make a protected AdaptedV
kthelgason 2016/12/08 08:42:03 Done.
57 57
58 private: 58 private:
59 // Implements rtc::VideoSourceInterface. 59 // Implements rtc::VideoSourceInterface.
60 void AddOrUpdateSink(rtc::VideoSinkInterface<webrtc::VideoFrame>* sink, 60 void AddOrUpdateSink(rtc::VideoSinkInterface<webrtc::VideoFrame>* sink,
61 const rtc::VideoSinkWants& wants) override; 61 const rtc::VideoSinkWants& wants) override;
62 void RemoveSink(rtc::VideoSinkInterface<webrtc::VideoFrame>* sink) override; 62 void RemoveSink(rtc::VideoSinkInterface<webrtc::VideoFrame>* sink) override;
63 63
64 // Part of VideoTrackSourceInterface. 64 // Part of VideoTrackSourceInterface.
65 bool GetStats(Stats* stats) override; 65 bool GetStats(Stats* stats) override;
66 66
67 void OnSinkWantsChanged(const rtc::VideoSinkWants& wants); 67 void OnSinkWantsChanged(const rtc::VideoSinkWants& wants);
68 68
69 rtc::ThreadChecker thread_checker_; 69 rtc::ThreadChecker thread_checker_;
70 70
71 cricket::VideoAdapter video_adapter_; 71 cricket::VideoAdapter video_adapter_;
72 72
73 rtc::CriticalSection stats_crit_; 73 rtc::CriticalSection stats_crit_;
74 rtc::Optional<Stats> stats_ GUARDED_BY(stats_crit_); 74 rtc::Optional<Stats> stats_ GUARDED_BY(stats_crit_);
75 75
76 VideoBroadcaster broadcaster_; 76 VideoBroadcaster broadcaster_;
77 }; 77 };
78 78
79 } // namespace rtc 79 } // namespace rtc
80 80
81 #endif // WEBRTC_MEDIA_BASE_ADAPTEDVIDEOTRACKSOURCE_H_ 81 #endif // WEBRTC_MEDIA_BASE_ADAPTEDVIDEOTRACKSOURCE_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/media/base/videoadapter.h » ('j') | webrtc/media/base/videoadapter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698