2017-02-16 12:07:44 -08:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#ifndef MODULES_DESKTOP_CAPTURE_RESOLUTION_TRACKER_H_
|
|
|
|
|
#define MODULES_DESKTOP_CAPTURE_RESOLUTION_TRACKER_H_
|
2017-02-16 12:07:44 -08:00
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "modules/desktop_capture/desktop_geometry.h"
|
2017-02-16 12:07:44 -08:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
2017-07-27 18:06:12 -07:00
|
|
|
class ResolutionTracker final {
|
2017-02-16 12:07:44 -08:00
|
|
|
public:
|
2017-07-27 18:06:12 -07:00
|
|
|
// Sets the resolution to |size|. Returns true if a previous size was recorded
|
|
|
|
|
// and differs from |size|.
|
|
|
|
|
bool SetResolution(DesktopSize size);
|
2017-07-24 16:52:17 -07:00
|
|
|
|
|
|
|
|
// Resets to the initial state.
|
2017-02-16 12:07:44 -08:00
|
|
|
void Reset();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
DesktopSize last_size_;
|
|
|
|
|
bool initialized_ = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#endif // MODULES_DESKTOP_CAPTURE_RESOLUTION_TRACKER_H_
|