// ignore_for_file: non_constant_identifier_names, camel_case_types, missing_return, unused_import, unused_local_variable, dead_code, unnecessary_cast
//////////////////////////////////////////////////////////
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
//////////////////////////////////////////////////////////

enum TXVideoType {
  VIDEO_TYPE_420SP /* 1 */,
  VIDEO_TYPE_420YpCbCr /* 2 */,
  VIDEO_TYPE_420P /* 3 */,
  VIDEO_TYPE_BGRA8888 /* 4 */,
  VIDEO_TYPE_RGBA8888 /* 5 */,
  VIDEO_TYPE_NV12 /* 6 */
}

extension TXVideoTypeToX on TXVideoType {
  int toValue() {
    switch (this) {
      case TXVideoType.VIDEO_TYPE_420SP: return 1;
      case TXVideoType.VIDEO_TYPE_420YpCbCr: return 2;
      case TXVideoType.VIDEO_TYPE_420P: return 3;
      case TXVideoType.VIDEO_TYPE_BGRA8888: return 4;
      case TXVideoType.VIDEO_TYPE_RGBA8888: return 5;
      case TXVideoType.VIDEO_TYPE_NV12: return 6;
      default: return 0;
    }
  }
}

extension TXVideoTypeFromX on int {
  TXVideoType toTXVideoType() {
    switch (this) {
      case 1: return TXVideoType.VIDEO_TYPE_420SP;
      case 2: return TXVideoType.VIDEO_TYPE_420YpCbCr;
      case 3: return TXVideoType.VIDEO_TYPE_420P;
      case 4: return TXVideoType.VIDEO_TYPE_BGRA8888;
      case 5: return TXVideoType.VIDEO_TYPE_RGBA8888;
      case 6: return TXVideoType.VIDEO_TYPE_NV12;
      default: return TXVideoType.values[this + 1];
    }
  }
}