feat: initial Cutdex application
Add the Flutter video editing application with project management, media import, timeline editing, preview, AI assistance, diagnostics and settings. Include shared UI and native host packages, platform runners, application tests and release tooling. Provide usage and contribution guides, the MIT license and third-party notices. Exclude local credentials, build outputs and validation data.
This commit is contained in:
commit
27e77fff39
718 files changed
+183958
No files matched your search
@@ -0,0 +1,85 @@
|
||||
import 'package:flutter/foundation.dart'
|
||||
show TargetPlatform, defaultTargetPlatform, kIsWeb;
|
||||
import 'package:path/path.dart' as p;
|
||||
|
||||
const supportedVideoFileExtensions = <String>[
|
||||
'mp4',
|
||||
'mov',
|
||||
'm4v',
|
||||
'mkv',
|
||||
'webm',
|
||||
'avi',
|
||||
'wmv',
|
||||
'asf',
|
||||
'flv',
|
||||
'rm',
|
||||
'rmvb',
|
||||
'ts',
|
||||
'mts',
|
||||
'm2ts',
|
||||
'mpeg',
|
||||
'mpg',
|
||||
'mxf',
|
||||
'3gp',
|
||||
];
|
||||
|
||||
/// Windows can probe video streams embedded in some optical-disc files.
|
||||
/// Listing a candidate does not imply DVD filesystem or menu support.
|
||||
List<String> get selectableVideoFileExtensions =>
|
||||
!kIsWeb && defaultTargetPlatform == TargetPlatform.windows
|
||||
? const [...supportedVideoFileExtensions, 'iso']
|
||||
: supportedVideoFileExtensions;
|
||||
|
||||
const supportedAudioFileExtensions = <String>[
|
||||
'mp3',
|
||||
'wav',
|
||||
'aif',
|
||||
'aiff',
|
||||
'm4a',
|
||||
'aac',
|
||||
'flac',
|
||||
'ogg',
|
||||
'opus',
|
||||
'caf',
|
||||
'wma',
|
||||
'amr',
|
||||
'ac3',
|
||||
'ape',
|
||||
'wv',
|
||||
'dts',
|
||||
];
|
||||
|
||||
const supportedImageFileExtensions = <String>[
|
||||
'jpg',
|
||||
'jpeg',
|
||||
'png',
|
||||
'webp',
|
||||
'heic',
|
||||
'heif',
|
||||
'tif',
|
||||
'tiff',
|
||||
'bmp',
|
||||
'gif',
|
||||
'avif',
|
||||
];
|
||||
|
||||
/// Timeline drops accept playable media; images use project asset insertion.
|
||||
List<String> get selectableTimelineFileExtensions => List.unmodifiable([
|
||||
...selectableVideoFileExtensions,
|
||||
...supportedAudioFileExtensions,
|
||||
]);
|
||||
|
||||
/// File pickers in the media library and composer share the same candidates.
|
||||
List<String> get selectableMediaFileExtensions => List.unmodifiable([
|
||||
...selectableTimelineFileExtensions,
|
||||
...supportedImageFileExtensions,
|
||||
]);
|
||||
|
||||
/// A supported browser category, not a decoder capability verification.
|
||||
String? mediaKindForPath(String path) {
|
||||
final extension = p.extension(path).toLowerCase().replaceFirst('.', '');
|
||||
if (selectableVideoFileExtensions.contains(extension)) return 'video';
|
||||
if (supportedAudioFileExtensions.contains(extension)) return 'audio';
|
||||
if (supportedImageFileExtensions.contains(extension)) return 'image';
|
||||
return null;
|
||||
}
|
||||
Reference in new issue
Block a user