youtube_explode/lib/src/videos/streams/framerate.dart

27 lines
685 B
Dart
Raw Normal View History

2020-06-03 13:18:37 +02:00
import 'package:equatable/equatable.dart';
/// Encapsulates framerate.
class Framerate extends Comparable<Framerate> with EquatableMixin {
/// Framerate as frames per second
2020-06-05 16:17:08 +02:00
final num framesPerSecond;
2020-06-03 13:18:37 +02:00
/// Initialize an instance of [Framerate]
Framerate(this.framesPerSecond);
///
bool operator >(Framerate other) => framesPerSecond > other.framesPerSecond;
///
bool operator <(Framerate other) => framesPerSecond < other.framesPerSecond;
@override
String toString() => '$framesPerSecond FPS';
@override
List<Object> get props => [framesPerSecond];
@override
int compareTo(Framerate other) =>
framesPerSecond.compareTo(other.framesPerSecond);
2020-06-05 21:06:54 +02:00
}