simulcast_utility.h 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
  3. *
  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
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #ifndef MODULES_VIDEO_CODING_UTILITY_SIMULCAST_UTILITY_H_
  11. #define MODULES_VIDEO_CODING_UTILITY_SIMULCAST_UTILITY_H_
  12. #include <stdint.h>
  13. #include "api/video_codecs/video_codec.h"
  14. namespace webrtc {
  15. class SimulcastUtility {
  16. public:
  17. static uint32_t SumStreamMaxBitrate(int streams, const VideoCodec& codec);
  18. static int NumberOfSimulcastStreams(const VideoCodec& codec);
  19. static bool ValidSimulcastParameters(const VideoCodec& codec,
  20. int num_streams);
  21. static int NumberOfTemporalLayers(const VideoCodec& codec, int spatial_id);
  22. // TODO(sprang): Remove this hack when ScreenshareLayers is gone.
  23. static bool IsConferenceModeScreenshare(const VideoCodec& codec);
  24. };
  25. } // namespace webrtc
  26. #endif // MODULES_VIDEO_CODING_UTILITY_SIMULCAST_UTILITY_H_