import 'dart:collection';

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

import 'enums.dart';

abstract class IPublisher {
  /// 推流通道集合
  UnmodifiableListView<IPublishChannel> get channels;

  Future<void> setProfile(PublisherProfile profile);
  Future<void> startLocal();
  Future<void> stopLocal();
}

class BitrateRange {
  final int minBitrate;
  final int maxBitrate;
  final int defaultBitrate;
  BitrateRange(this.minBitrate, this.maxBitrate, this.defaultBitrate);
}

class PublisherProfile {
  final ResolutionMode resolutionMode;

  final Resolutions resolution;

  final int frameRate;

  final int? bitrate;

  final String? idealCameraName;

  final String? idealMicrophoneName;

  PublisherProfile({
    required this.resolutionMode,
    required this.resolution,
    this.frameRate = 15,
    this.bitrate,
    this.idealCameraName,
    this.idealMicrophoneName,
  });
}
