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

Unified Diff: webrtc/media/base/videoadapter.h

Issue 2558243003: Reland of Add ability to scale to arbitrary factors (Closed)
Patch Set: revert changes to vie_encoder 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/media/base/adaptedvideotracksource.cc ('k') | webrtc/media/base/videoadapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/base/videoadapter.h
diff --git a/webrtc/media/base/videoadapter.h b/webrtc/media/base/videoadapter.h
index 9d17f5ce1538f5446546f39bee1c391cc7a8f438..553c08577490c667a75a36b783a49c502eae09e8 100644
--- a/webrtc/media/base/videoadapter.h
+++ b/webrtc/media/base/videoadapter.h
@@ -25,6 +25,7 @@ namespace cricket {
class VideoAdapter {
public:
VideoAdapter();
+ VideoAdapter(int required_resolution_alignment);
virtual ~VideoAdapter();
// Return the adapted resolution and cropping parameters given the
@@ -63,6 +64,8 @@ class VideoAdapter {
int adaption_changes_; // Number of changes in scale factor.
int previous_width_; // Previous adapter output width.
int previous_height_; // Previous adapter output height.
+ // Resolution must be divisible by this factor.
+ const int required_resolution_alignment_;
// The target timestamp for the next frame based on requested format.
rtc::Optional<int64_t> next_frame_timestamp_ns_ GUARDED_BY(critical_section_);
@@ -71,7 +74,7 @@ class VideoAdapter {
// The adapted output format is the minimum of these.
rtc::Optional<VideoFormat> requested_format_ GUARDED_BY(critical_section_);
int resolution_request_max_pixel_count_ GUARDED_BY(critical_section_);
- int resolution_request_max_pixel_count_step_up_ GUARDED_BY(critical_section_);
+ bool step_up_ GUARDED_BY(critical_section_);
// The critical section to protect the above variables.
rtc::CriticalSection critical_section_;
« no previous file with comments | « webrtc/media/base/adaptedvideotracksource.cc ('k') | webrtc/media/base/videoadapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698