recording_service_constants.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_SERVICES_RECORDING_RECORDING_SERVICE_CONSTANTS_H_
  5. #define ASH_SERVICES_RECORDING_RECORDING_SERVICE_CONSTANTS_H_
  6. #include "base/time/time.h"
  7. #include "ui/gfx/color_space.h"
  8. namespace recording {
  9. // The maximum FPS the video recording is captured at.
  10. constexpr int kMaxFrameRate = 30;
  11. // Based on the above FPS, this is the minimum duration between any two frames.
  12. constexpr base::TimeDelta kMinCapturePeriod = base::Hertz(kMaxFrameRate);
  13. // The minimum amount of time that must pass between any two successive size
  14. // changes of video frames. This is needed to avoid producing a lot of video
  15. // frames with different sizes (e.g. when resizing a window) which can result in
  16. // a large output.
  17. constexpr base::TimeDelta kMinPeriodForResizeThrottling =
  18. base::Milliseconds(500);
  19. // The requested audio sample rate of the audio capturer.
  20. constexpr int kAudioSampleRate = 48000;
  21. // The color space used for video capturing and encoding.
  22. constexpr gfx::ColorSpace kColorSpace = gfx::ColorSpace::CreateREC709();
  23. } // namespace recording
  24. #endif // ASH_SERVICES_RECORDING_RECORDING_SERVICE_CONSTANTS_H_