/// 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; } }