This commit is contained in:
2025-08-28 15:13:40 +09:00
parent 6e64d739ac
commit 6404f4176e
3149 changed files with 738551 additions and 335 deletions
@@ -0,0 +1,5 @@
.DS_Store
.dart_tool/
.packages
.pub/
build/
@@ -0,0 +1,11 @@
## 0.2.1
- Fixes the signature of getMediaInformation method
## 0.2.0
- Implements execute methods
- Merges existing getSafParameter methods into a single method with a new openMode parameter
- Adds list media information sessions methods to FFprobeKit
- Adds getMediaInformation method
## 0.1.0
- Initial release
@@ -0,0 +1,19 @@
Copyright (c) 2021 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.
@@ -0,0 +1,9 @@
# Platform Interface for FFmpegKit Flutter
A common platform interface for the [`ffmpeg_kit_flutter`][1] plugin.
This interface allows platform-specific implementations of the `ffmpeg_kit_flutter`
plugin, as well as the plugin itself, to ensure they are supporting the same
interface.
[1]: ../flutter
@@ -0,0 +1,68 @@
analyzer:
enable-experiment:
- non-nullable
strong-mode:
implicit-dynamic: false
errors:
missing_required_param: warning
missing_return: warning
linter:
rules:
- avoid_catching_errors
- avoid_function_literals_in_foreach_calls
- avoid_private_typedef_functions
- avoid_renaming_method_parameters
- avoid_returning_null_for_void
- avoid_unused_constructor_parameters
- avoid_void_async
- await_only_futures
- camel_case_types
- cancel_subscriptions
- comment_references
- constant_identifier_names
- control_flow_in_finally
- directives_ordering
- empty_statements
- file_names
- hash_and_equals
- implementation_imports
- iterable_contains_unrelated_type
- join_return_with_assignment
- lines_longer_than_80_chars
- list_remove_unrelated_type
- missing_whitespace_between_adjacent_strings
- no_runtimeType_toString
- non_constant_identifier_names
- only_throw_errors
- overridden_fields
- package_api_docs
- package_names
- package_prefixed_library_names
- prefer_asserts_in_initializer_lists
- prefer_const_constructors
- prefer_const_declarations
- prefer_expression_function_bodies
- prefer_final_locals
- prefer_function_declarations_over_variables
- prefer_initializing_formals
- prefer_inlined_adds
- prefer_interpolation_to_compose_strings
- prefer_is_not_operator
- prefer_null_aware_operators
- prefer_relative_imports
- prefer_typing_uninitialized_variables
- prefer_void_to_null
- provide_deprecation_message
- sort_pub_dependencies
- test_types_in_equals
- throw_in_finally
- unnecessary_brace_in_string_interps
- unnecessary_lambdas
- unnecessary_null_aware_assignments
- unnecessary_overrides
- unnecessary_parenthesis
- unnecessary_statements
- unnecessary_string_interpolations
- use_string_buffers
- void_checks
@@ -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!');
}
}
@@ -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');
}
@@ -0,0 +1,21 @@
name: ffmpeg_kit_flutter_platform_interface
description: A common platform interface for ffmpeg_kit_flutter plugin.
repository: https://github.com/arthenica/ffmpeg-kit
issue_tracker: https://github.com/arthenica/ffmpeg-kit/issues
homepage: https://github.com/arthenica/ffmpeg-kit
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 0.2.1
environment:
sdk: ">=2.12.0 <3.0.0"
flutter: ">=2.0.0"
dependencies:
flutter:
sdk: flutter
plugin_platform_interface: ^2.0.2
dev_dependencies:
flutter_test:
sdk: flutter