// ignore_for_file: constant_identifier_names

import 'package:fis_lib_media_rt/interface/enums.dart';

/// TRCT分辨率 Ref: tencent_trtc_cloud-2.4.2\lib\trtc_cloud_def.dart
class TrtcResolutions {
  TrtcResolutions._();

  /// Recommended bitrate: VideoCall: 600 Kbps, LIVE: 900 Kbps
  static const int RESOLUTION_640_480 = 62;

  /// Recommended bitrate: VideoCall: 1200 Kbps, LIVE: 1800 Kbps
  static const int RESOLUTION_1280_720 = 112;

  /// Recommended bitrate: VideoCall: 2000 Kbps, LIVE: 3000 Kbps
  static const int RESOLUTION_1920_1080 = 114;

  /// 转换成TRTC的分辨率值
  ///
  /// [val] sdk通用分辨率枚举
  static int convert(Resolutions val) {
    switch (val) {
      case Resolutions.fhd_1080p:
        return RESOLUTION_1920_1080;
      case Resolutions.hd_720p:
        return RESOLUTION_1280_720;
      case Resolutions.sd_480p:
        return RESOLUTION_640_480;
    }
  }
}
