You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
diplomatic-quarter/packages/vital_sign_camera/lib/src/pixel_format.dart

20 lines
520 B
Dart

/// Represents the pixel format of a `Frame`.
/// * `v420`: 420 YpCbCr 8 Bi-Planar Video Range
/// * `f420`: 420 YpCbCr 8 Bi-Planar Full Range
/// * `x420`: 420 YpCbCr 10 Bi-Planar Video Range
enum PixelFormat { f420, v420, x420 }
PixelFormat pixelFormatFromString(String string) {
switch (string) {
case '420f':
return PixelFormat.f420;
case '420v':
return PixelFormat.v420;
case 'x420':
return PixelFormat.x420;
default:
// ignore: fixme
return PixelFormat.f420;
}
}