...
This commit is contained in:
+399
@@ -0,0 +1,399 @@
|
||||
/*
|
||||
* Copyright (c) 2021-2022 Taner Sener
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
|
||||
|
||||
import 'method_channel_ffmpeg_kit_flutter.dart';
|
||||
|
||||
abstract class FFmpegKitPlatform extends PlatformInterface {
|
||||
/// Constructs a FFmpegKitPlatform.
|
||||
FFmpegKitPlatform() : super(token: _token);
|
||||
|
||||
static final Object _token = Object();
|
||||
|
||||
static FFmpegKitPlatform _instance = MethodChannelFFmpegKit();
|
||||
|
||||
/// The default instance of [FFmpegKitPlatform] to use.
|
||||
///
|
||||
/// Defaults to [MethodChannelFFmpegKit].
|
||||
static FFmpegKitPlatform get instance => _instance;
|
||||
|
||||
/// Platform-specific plugins should set this with their own platform-specific
|
||||
/// class that extends [FFmpegKitPlatform] when they register
|
||||
/// themselves.
|
||||
static set instance(FFmpegKitPlatform instance) {
|
||||
PlatformInterface.verifyToken(instance, _token);
|
||||
_instance = instance;
|
||||
}
|
||||
|
||||
// AbstractSession
|
||||
|
||||
Future<Map<dynamic, dynamic>?> abstractSessionCreateFFmpegSession(
|
||||
List<String> argumentsArray) async {
|
||||
throw UnimplementedError(
|
||||
'abstractSessionCreateFFmpegSession() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<Map<dynamic, dynamic>?> abstractSessionCreateFFprobeSession(
|
||||
List<String> argumentsArray) async {
|
||||
throw UnimplementedError(
|
||||
'abstractSessionCreateFFprobeSession() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<Map<dynamic, dynamic>?> abstractSessionCreateMediaInformationSession(
|
||||
List<String> argumentsArray) async {
|
||||
throw UnimplementedError('abstractSessionCreateMediaInformationSession()'
|
||||
' has not been implemented!');
|
||||
}
|
||||
|
||||
Future<int?> abstractSessionGetEndTime(int? sessionId) async {
|
||||
throw UnimplementedError(
|
||||
'abstractSessionGetEndTime() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<int?> abstractSessionGetDuration(int? sessionId) async {
|
||||
throw UnimplementedError(
|
||||
'abstractSessionGetDuration() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<List<dynamic>?> abstractSessionGetAllLogs(
|
||||
int? sessionId, int? waitTimeout) async {
|
||||
throw UnimplementedError(
|
||||
'abstractSessionGetAllLogs() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<List<dynamic>?> abstractSessionGetLogs(int? sessionId) async {
|
||||
throw UnimplementedError(
|
||||
'abstractSessionGetLogs() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<String?> abstractSessionGetAllLogsAsString(
|
||||
int? sessionId, int? waitTimeout) async {
|
||||
throw UnimplementedError(
|
||||
'abstractSessionGetAllLogsAsString() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<int?> abstractSessionGetState(int? sessionId) async {
|
||||
throw UnimplementedError(
|
||||
'abstractSessionGetState() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<int?> abstractSessionGetReturnCode(int? sessionId) async {
|
||||
throw UnimplementedError(
|
||||
'abstractSessionGetReturnCode() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<String?> abstractSessionGetFailStackTrace(int? sessionId) async {
|
||||
throw UnimplementedError(
|
||||
'abstractSessionGetFailStackTrace() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<bool> abstractSessionThereAreAsynchronousMessagesInTransmit(
|
||||
int? sessionId) async {
|
||||
throw UnimplementedError(
|
||||
'abstractSessionThereAreAsynchronousMessagesInTransmit()'
|
||||
' has not been implemented!');
|
||||
}
|
||||
|
||||
// ArchDetect
|
||||
|
||||
Future<String> archDetectGetArch() async {
|
||||
throw UnimplementedError('archDetectGetArch() has not been implemented!');
|
||||
}
|
||||
|
||||
// FFmpegKit
|
||||
|
||||
Future<void> ffmpegKitCancel() async {
|
||||
throw UnimplementedError('ffmpegKitCancel() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> ffmpegKitCancelSession(int sessionId) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitCancelSession() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<List<dynamic>?> ffmpegKitListSessions() async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitListSessions() has not been implemented!');
|
||||
}
|
||||
|
||||
// FFmpegKitConfig
|
||||
|
||||
Future<void> ffmpegKitConfigEnableRedirection() async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigEnableRedirection() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> ffmpegKitConfigDisableRedirection() async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigDisableRedirection() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> ffmpegKitConfigSetFontconfigConfigurationPath(
|
||||
String path) async {
|
||||
throw UnimplementedError('ffmpegKitConfigSetFontconfigConfigurationPath()'
|
||||
' has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> ffmpegKitConfigSetFontDirectory(
|
||||
String path, Map<String, String>? mapping) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigSetFontDirectory() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> ffmpegKitConfigSetFontDirectoryList(
|
||||
List<String> fontDirectoryList, Map<String, String>? mapping) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigSetFontDirectoryList() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<String?> ffmpegKitConfigRegisterNewFFmpegPipe() async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigRegisterNewFFmpegPipe() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> ffmpegKitConfigCloseFFmpegPipe(String ffmpegPipePath) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigCloseFFmpegPipe() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<String?> ffmpegKitConfigGetFFmpegVersion() async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigGetFFmpegVersion() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<bool?> ffmpegKitConfigIsLTSBuild() async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigIsLTSBuild() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<String?> ffmpegKitConfigGetBuildDate() async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigGetBuildDate() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> ffmpegKitConfigSetEnvironmentVariable(
|
||||
String name, String value) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigSetEnvironmentVariable() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> ffmpegKitConfigIgnoreSignal(int signal) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigIgnoreSignal() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> ffmpegKitConfigAsyncFFmpegExecute(int? sessionId) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigAsyncFFmpegExecute() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> ffmpegKitConfigAsyncFFprobeExecute(int? sessionId) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigAsyncFFprobeExecute() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> ffmpegKitConfigAsyncGetMediaInformationExecute(
|
||||
int? sessionId, int? waitTimeout) async {
|
||||
throw UnimplementedError('ffmpegKitConfigAsyncGetMediaInformationExecute()'
|
||||
' has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> ffmpegKitConfigFFmpegExecute(int? sessionId) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigFFmpegExecute() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> ffmpegKitConfigFFprobeExecute(int? sessionId) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigFFprobeExecute() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> ffmpegKitConfigGetMediaInformationExecute(
|
||||
int? sessionId, int? waitTimeout) async {
|
||||
throw UnimplementedError('ffmpegKitConfigGetMediaInformationExecute()'
|
||||
' has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> ffmpegKitConfigSetLogLevel(int logLevel) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigSetLogLevel() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<int?> ffmpegKitConfigGetSessionHistorySize() async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigGetSessionHistorySize() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> ffmpegKitConfigSetSessionHistorySize(
|
||||
int sessionHistorySize) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigSetSessionHistorySize() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<Map<dynamic, dynamic>?> ffmpegKitConfigGetSession(
|
||||
int sessionId) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigGetSession() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<Map<dynamic, dynamic>?> ffmpegKitConfigGetLastSession() async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigGetLastSession() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<Map<dynamic, dynamic>?>
|
||||
ffmpegKitConfigGetLastCompletedSession() async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigGetLastCompletedSession() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<List<dynamic>?> ffmpegKitConfigGetSessions() async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigGetSessions() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> clearSessions() async {
|
||||
throw UnimplementedError('clearSessions() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<List<dynamic>?> ffmpegKitConfigGetSessionsByState(
|
||||
int sessionState) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigGetSessionsByState() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<int?> ffmpegKitConfigMessagesInTransmit(int sessionId) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigMessagesInTransmit() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> ffmpegKitConfigEnableLogs() async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigEnableLogs() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> ffmpegKitConfigDisableLogs() async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigDisableLogs() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> ffmpegKitConfigEnableStatistics() async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigEnableStatistics() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<void> ffmpegKitConfigDisableStatistics() async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigDisableStatistics() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<String?> ffmpegKitConfigGetPlatform() async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigGetPlatform() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<int?> ffmpegKitConfigWriteToPipe(
|
||||
String inputPath, String pipePath) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigWriteToPipe() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<String?> ffmpegKitConfigSelectDocumentForRead(
|
||||
String? type, List<String>? extraTypes) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigSelectDocumentForRead() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<String?> ffmpegKitConfigSelectDocumentForWrite(
|
||||
String? title, String? type, List<String>? extraTypes) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigSelectDocumentForWrite() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<String?> ffmpegKitConfigGetSafParameter(
|
||||
String uriString, String openMode) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitConfigGetSafParameter() has not been implemented!');
|
||||
}
|
||||
|
||||
// FFmpegKitFlutterInitializer
|
||||
|
||||
Future<int?> ffmpegKitFlutterInitializerGetLogLevel() async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegKitFlutterInitializerGetLogLevel() has not been implemented!');
|
||||
}
|
||||
|
||||
// FFmpegSession
|
||||
|
||||
Future<List<dynamic>?> ffmpegSessionGetAllStatistics(
|
||||
int? sessionId, int? waitTimeout) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegSessionGetAllStatistics() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<List<dynamic>?> ffmpegSessionGetStatistics(int? sessionId) async {
|
||||
throw UnimplementedError(
|
||||
'ffmpegSessionGetStatistics() has not been implemented!');
|
||||
}
|
||||
|
||||
// FFprobeKit
|
||||
|
||||
Future<List<dynamic>?> ffprobeKitListFFprobeSessions() async {
|
||||
throw UnimplementedError(
|
||||
'ffprobeKitListFFprobeSessions() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<List<dynamic>?> ffprobeKitListMediaInformationSessions() async {
|
||||
throw UnimplementedError(
|
||||
'ffprobeKitListMediaInformationSessions() has not been implemented!');
|
||||
}
|
||||
|
||||
// MediaInformationJsonParser
|
||||
|
||||
Future<Map<dynamic, dynamic>?> mediaInformationJsonParserFrom(
|
||||
String ffprobeJsonOutput) async {
|
||||
throw UnimplementedError(
|
||||
'mediaInformationJsonParserFrom() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<Map<dynamic, dynamic>?> mediaInformationJsonParserFromWithError(
|
||||
String ffprobeJsonOutput) async {
|
||||
throw UnimplementedError(
|
||||
'mediaInformationJsonParserFromWithError() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<Map<dynamic, dynamic>?> mediaInformationSessionGetMediaInformation(
|
||||
int? sessionId) async {
|
||||
throw UnimplementedError('mediaInformationSessionGetMediaInformation() '
|
||||
'has not been implemented!');
|
||||
}
|
||||
|
||||
Future<String?> getPackageName() async {
|
||||
throw UnimplementedError('getPackageName() has not been implemented!');
|
||||
}
|
||||
|
||||
Future<List<dynamic>?> getExternalLibraries() async {
|
||||
throw UnimplementedError(
|
||||
'getExternalLibraries() has not been implemented!');
|
||||
}
|
||||
}
|
||||
+368
@@ -0,0 +1,368 @@
|
||||
/*
|
||||
* Copyright (c) 2021-2022 Taner Sener
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'ffmpeg_kit_flutter_platform_interface.dart';
|
||||
|
||||
const MethodChannel _channel =
|
||||
const MethodChannel('flutter.arthenica.com/ffmpeg_kit');
|
||||
|
||||
/// An implementation of [FFmpegKitPlatform] that uses method channels.
|
||||
class MethodChannelFFmpegKit extends FFmpegKitPlatform {
|
||||
/// The MethodChannel that is being used by this implementation of the plugin.
|
||||
@visibleForTesting
|
||||
MethodChannel get channel => _channel;
|
||||
|
||||
// AbstractSession
|
||||
|
||||
@override
|
||||
Future<Map<dynamic, dynamic>?> abstractSessionCreateFFmpegSession(
|
||||
List<String> argumentsArray) async =>
|
||||
_channel.invokeMethod<Map<dynamic, dynamic>>(
|
||||
'ffmpegSession', {'arguments': argumentsArray});
|
||||
|
||||
@override
|
||||
Future<Map<dynamic, dynamic>?> abstractSessionCreateFFprobeSession(
|
||||
List<String> argumentsArray) async =>
|
||||
_channel.invokeMethod<Map<dynamic, dynamic>>(
|
||||
'ffprobeSession', {'arguments': argumentsArray});
|
||||
|
||||
@override
|
||||
Future<Map<dynamic, dynamic>?> abstractSessionCreateMediaInformationSession(
|
||||
List<String> argumentsArray) async =>
|
||||
_channel.invokeMethod<Map<dynamic, dynamic>>(
|
||||
'mediaInformationSession', {'arguments': argumentsArray});
|
||||
|
||||
@override
|
||||
Future<int?> abstractSessionGetEndTime(int? sessionId) async => _channel
|
||||
.invokeMethod<int>('abstractSessionGetEndTime', {'sessionId': sessionId});
|
||||
|
||||
@override
|
||||
Future<int?> abstractSessionGetDuration(int? sessionId) async =>
|
||||
_channel.invokeMethod<int>(
|
||||
'abstractSessionGetDuration', {'sessionId': sessionId});
|
||||
|
||||
@override
|
||||
Future<List<dynamic>?> abstractSessionGetAllLogs(
|
||||
int? sessionId, int? waitTimeout) async =>
|
||||
_channel.invokeMethod<List<dynamic>>('abstractSessionGetAllLogs',
|
||||
{'sessionId': sessionId, 'waitTimeout': waitTimeout});
|
||||
|
||||
@override
|
||||
Future<List<dynamic>?> abstractSessionGetLogs(int? sessionId) async =>
|
||||
_channel.invokeMethod<List<dynamic>>(
|
||||
'abstractSessionGetLogs', {'sessionId': sessionId});
|
||||
|
||||
@override
|
||||
Future<String?> abstractSessionGetAllLogsAsString(
|
||||
int? sessionId, int? waitTimeout) async =>
|
||||
_channel.invokeMethod<String>('abstractSessionGetAllLogsAsString',
|
||||
{'sessionId': sessionId, 'waitTimeout': waitTimeout});
|
||||
|
||||
@override
|
||||
Future<int?> abstractSessionGetState(int? sessionId) async => _channel
|
||||
.invokeMethod<int>('abstractSessionGetState', {'sessionId': sessionId});
|
||||
|
||||
@override
|
||||
Future<int?> abstractSessionGetReturnCode(int? sessionId) async =>
|
||||
_channel.invokeMethod<int>(
|
||||
'abstractSessionGetReturnCode', {'sessionId': sessionId});
|
||||
|
||||
@override
|
||||
Future<String?> abstractSessionGetFailStackTrace(int? sessionId) async =>
|
||||
_channel.invokeMethod<String>(
|
||||
'abstractSessionGetFailStackTrace', {'sessionId': sessionId});
|
||||
|
||||
@override
|
||||
Future<bool> abstractSessionThereAreAsynchronousMessagesInTransmit(
|
||||
int? sessionId) async =>
|
||||
_channel.invokeMethod<bool>(
|
||||
'abstractSessionThereAreAsynchronousMessagesInTransmit',
|
||||
{'sessionId': sessionId}).then((bool? value) => value ?? false);
|
||||
|
||||
// ArchDetect
|
||||
|
||||
@override
|
||||
Future<String> archDetectGetArch() async => _channel
|
||||
.invokeMethod<String>('getArch')
|
||||
.then((String? value) => value ?? "");
|
||||
|
||||
// FFmpegKit
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitCancel() async => _channel.invokeMethod<void>('cancel');
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitCancelSession(int sessionId) async =>
|
||||
_channel.invokeMethod<void>('cancelSession', {'sessionId': sessionId});
|
||||
|
||||
@override
|
||||
Future<List<dynamic>?> ffmpegKitListSessions() async =>
|
||||
_channel.invokeMethod<List<dynamic>>('getFFmpegSessions');
|
||||
|
||||
// FFmpegKitConfig
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitConfigEnableRedirection() async =>
|
||||
_channel.invokeMethod<void>('enableRedirection');
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitConfigDisableRedirection() async =>
|
||||
_channel.invokeMethod<void>('disableRedirection');
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitConfigSetFontconfigConfigurationPath(
|
||||
String path) async =>
|
||||
_channel
|
||||
.invokeMethod<void>('setFontconfigConfigurationPath', {'path': path});
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitConfigSetFontDirectory(
|
||||
String path, Map<String, String>? mapping) async =>
|
||||
_channel.invokeMethod<void>(
|
||||
'setFontDirectory', {'fontDirectory': path, 'fontNameMap': mapping});
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitConfigSetFontDirectoryList(
|
||||
List<String> fontDirectoryList, Map<String, String>? mapping) async =>
|
||||
_channel.invokeMethod<void>('setFontDirectoryList',
|
||||
{'fontDirectoryList': fontDirectoryList, 'fontNameMap': mapping});
|
||||
|
||||
@override
|
||||
Future<String?> ffmpegKitConfigRegisterNewFFmpegPipe() async =>
|
||||
_channel.invokeMethod<String>('registerNewFFmpegPipe');
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitConfigCloseFFmpegPipe(String ffmpegPipePath) async =>
|
||||
_channel.invokeMethod<void>(
|
||||
'closeFFmpegPipe', {'ffmpegPipePath': ffmpegPipePath});
|
||||
|
||||
@override
|
||||
Future<String?> ffmpegKitConfigGetFFmpegVersion() async =>
|
||||
_channel.invokeMethod<String>('getFFmpegVersion');
|
||||
|
||||
@override
|
||||
Future<bool?> ffmpegKitConfigIsLTSBuild() async =>
|
||||
_channel.invokeMethod<bool>('isLTSBuild');
|
||||
|
||||
@override
|
||||
Future<String?> ffmpegKitConfigGetBuildDate() async =>
|
||||
_channel.invokeMethod<String>('getBuildDate');
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitConfigSetEnvironmentVariable(
|
||||
String name, String value) async =>
|
||||
_channel.invokeMethod<void>('setEnvironmentVariable',
|
||||
{'variableName': name, 'variableValue': value});
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitConfigIgnoreSignal(int signal) async =>
|
||||
_channel.invokeMethod<void>('ignoreSignal', {'signal': signal});
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitConfigFFmpegExecute(int? sessionId) async => _channel
|
||||
.invokeMethod<void>('ffmpegSessionExecute', {'sessionId': sessionId});
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitConfigFFprobeExecute(int? sessionId) async => _channel
|
||||
.invokeMethod<void>('ffprobeSessionExecute', {'sessionId': sessionId});
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitConfigGetMediaInformationExecute(
|
||||
int? sessionId, int? waitTimeout) async =>
|
||||
_channel.invokeMethod<void>('mediaInformationSessionExecute',
|
||||
{'sessionId': sessionId, 'waitTimeout': waitTimeout});
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitConfigAsyncFFmpegExecute(int? sessionId) async =>
|
||||
_channel.invokeMethod<void>(
|
||||
'asyncFFmpegSessionExecute', {'sessionId': sessionId});
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitConfigAsyncFFprobeExecute(int? sessionId) async =>
|
||||
_channel.invokeMethod<void>(
|
||||
'asyncFFprobeSessionExecute', {'sessionId': sessionId});
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitConfigAsyncGetMediaInformationExecute(
|
||||
int? sessionId, int? waitTimeout) async =>
|
||||
_channel.invokeMethod<void>('asyncMediaInformationSessionExecute',
|
||||
{'sessionId': sessionId, 'waitTimeout': waitTimeout});
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitConfigSetLogLevel(int logLevel) async =>
|
||||
_channel.invokeMethod<void>('setLogLevel', {'level': logLevel});
|
||||
|
||||
@override
|
||||
Future<int?> ffmpegKitConfigGetSessionHistorySize() async =>
|
||||
_channel.invokeMethod<int>('getSessionHistorySize');
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitConfigSetSessionHistorySize(
|
||||
int sessionHistorySize) async =>
|
||||
_channel.invokeMethod<void>(
|
||||
'setSessionHistorySize', {'sessionHistorySize': sessionHistorySize});
|
||||
|
||||
@override
|
||||
Future<Map<dynamic, dynamic>?> ffmpegKitConfigGetSession(
|
||||
int sessionId) async =>
|
||||
_channel.invokeMethod<Map<dynamic, dynamic>>(
|
||||
'getSession', {'sessionId': sessionId});
|
||||
|
||||
@override
|
||||
Future<Map<dynamic, dynamic>?> ffmpegKitConfigGetLastSession() async =>
|
||||
_channel.invokeMethod<Map<dynamic, dynamic>>('getLastSession');
|
||||
|
||||
@override
|
||||
Future<Map<dynamic, dynamic>?>
|
||||
ffmpegKitConfigGetLastCompletedSession() async => _channel
|
||||
.invokeMethod<Map<dynamic, dynamic>>('getLastCompletedSession');
|
||||
|
||||
@override
|
||||
Future<List<dynamic>?> ffmpegKitConfigGetSessions() async =>
|
||||
_channel.invokeMethod<List<dynamic>>('getSessions');
|
||||
|
||||
@override
|
||||
Future<void> clearSessions() async =>
|
||||
_channel.invokeMethod<void>('clearSessions');
|
||||
|
||||
@override
|
||||
Future<List<dynamic>?> ffmpegKitConfigGetSessionsByState(
|
||||
int sessionState) async =>
|
||||
_channel.invokeMethod<List<dynamic>>(
|
||||
'getSessionsByState', {'state': sessionState});
|
||||
|
||||
@override
|
||||
Future<int?> ffmpegKitConfigMessagesInTransmit(int sessionId) async =>
|
||||
_channel
|
||||
.invokeMethod<int>('messagesInTransmit', {'sessionId': sessionId});
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitConfigEnableLogs() async =>
|
||||
_channel.invokeMethod<void>('enableLogs');
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitConfigDisableLogs() async =>
|
||||
_channel.invokeMethod<void>('disableLogs');
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitConfigEnableStatistics() async =>
|
||||
_channel.invokeMethod<void>('enableStatistics');
|
||||
|
||||
@override
|
||||
Future<void> ffmpegKitConfigDisableStatistics() async =>
|
||||
_channel.invokeMethod<void>('disableStatistics');
|
||||
|
||||
@override
|
||||
Future<String?> ffmpegKitConfigGetPlatform() async =>
|
||||
_channel.invokeMethod<String>('getPlatform');
|
||||
|
||||
@override
|
||||
Future<int?> ffmpegKitConfigWriteToPipe(
|
||||
String inputPath, String pipePath) async =>
|
||||
_channel.invokeMethod<int>(
|
||||
'writeToPipe', {'input': inputPath, 'pipe': pipePath});
|
||||
|
||||
@override
|
||||
Future<String?> ffmpegKitConfigSelectDocumentForRead(
|
||||
String? type, List<String>? extraTypes) async =>
|
||||
_channel.invokeMethod<String>('selectDocument',
|
||||
{'writable': false, 'type': type, 'extraTypes': extraTypes});
|
||||
|
||||
@override
|
||||
Future<String?> ffmpegKitConfigSelectDocumentForWrite(
|
||||
String? title, String? type, List<String>? extraTypes) async =>
|
||||
_channel.invokeMethod<String>('selectDocument', {
|
||||
'writable': true,
|
||||
'title': title,
|
||||
'type': type,
|
||||
'extraTypes': extraTypes
|
||||
});
|
||||
|
||||
@override
|
||||
Future<String?> ffmpegKitConfigGetSafParameter(
|
||||
String uriString, String openMode) async =>
|
||||
_channel.invokeMethod<String>(
|
||||
'getSafParameter', {'uri': uriString, 'openMode': openMode});
|
||||
|
||||
// FFmpegKitFlutterInitializer
|
||||
|
||||
Future<int?> ffmpegKitFlutterInitializerGetLogLevel() async =>
|
||||
_channel.invokeMethod<int>('getLogLevel');
|
||||
|
||||
// FFmpegSession
|
||||
|
||||
@override
|
||||
Future<List<dynamic>?> ffmpegSessionGetAllStatistics(
|
||||
int? sessionId, int? waitTimeout) async =>
|
||||
_channel.invokeMethod<List<dynamic>>('ffmpegSessionGetAllStatistics',
|
||||
{'sessionId': sessionId, 'waitTimeout': waitTimeout});
|
||||
|
||||
@override
|
||||
Future<List<dynamic>?> ffmpegSessionGetStatistics(int? sessionId) async =>
|
||||
_channel.invokeMethod<List<dynamic>>(
|
||||
'ffmpegSessionGetStatistics', {'sessionId': sessionId});
|
||||
|
||||
// FFprobeKit
|
||||
|
||||
@override
|
||||
Future<List<dynamic>?> ffprobeKitListFFprobeSessions() async =>
|
||||
_channel.invokeMethod<List<dynamic>>('getFFprobeSessions');
|
||||
|
||||
@override
|
||||
Future<List<dynamic>?> ffprobeKitListMediaInformationSessions() async =>
|
||||
_channel.invokeMethod<List<dynamic>>('getMediaInformationSessions');
|
||||
|
||||
// MediaInformationJsonParser
|
||||
|
||||
@override
|
||||
Future<Map<dynamic, dynamic>?> mediaInformationJsonParserFrom(
|
||||
String ffprobeJsonOutput) async =>
|
||||
_channel.invokeMethod<Map<dynamic, dynamic>>(
|
||||
'mediaInformationJsonParserFrom',
|
||||
{'ffprobeJsonOutput': ffprobeJsonOutput});
|
||||
|
||||
@override
|
||||
Future<Map<dynamic, dynamic>?> mediaInformationJsonParserFromWithError(
|
||||
String ffprobeJsonOutput) async =>
|
||||
_channel.invokeMethod<Map<dynamic, dynamic>>(
|
||||
'mediaInformationJsonParserFromWithError',
|
||||
{'ffprobeJsonOutput': ffprobeJsonOutput});
|
||||
|
||||
// MediaInformationSession
|
||||
|
||||
@override
|
||||
Future<Map<dynamic, dynamic>?> mediaInformationSessionGetMediaInformation(
|
||||
int? sessionId) async =>
|
||||
_channel.invokeMethod<Map<dynamic, dynamic>>(
|
||||
'getMediaInformation', {'sessionId': sessionId});
|
||||
|
||||
@override
|
||||
Future<String?> getPackageName() async =>
|
||||
_channel.invokeMethod<String>('getPackageName');
|
||||
|
||||
@override
|
||||
Future<List<dynamic>?> getExternalLibraries() async =>
|
||||
_channel.invokeMethod<List<dynamic>>('getExternalLibraries');
|
||||
}
|
||||
Reference in New Issue
Block a user