feat: implement NativePlayerScreen using media_kit with optimized playback and decoding configurations

This commit is contained in:
Michael committed 2026-03-29 19:47:39 +02:00
1 parent 5110d70d73
commit 4a884af972
8 files changed
+754 -149

No files matched your search

-1
View File
@@ -4,7 +4,6 @@
/// to prevent OOM crashes on low-end devices
library;
import 'dart:io';
import 'package:device_info_plus/device_info_plus.dart';
import 'package:flutter/foundation.dart';
@@ -191,9 +191,11 @@ class HiveEncryptionBenchmark {
print('\nStatus:');
print(
' $writeStatus Write overhead: ${writeOverhead.toStringAsFixed(1)}% (target: <$acceptableThreshold%)');
' $writeStatus Write overhead: ${writeOverhead.toStringAsFixed(1)}% (target: <$acceptableThreshold%)',
);
print(
' $readStatus Read overhead: ${readOverhead.toStringAsFixed(1)}% (target: <$acceptableThreshold%)');
' $readStatus Read overhead: ${readOverhead.toStringAsFixed(1)}% (target: <$acceptableThreshold%)',
);
print('=' * 60 + '\n');
}
}
@@ -242,7 +244,8 @@ class EncryptionBenchmarkResult {
void print() {
print(' Name: $name');
print(
' Write: ${writeTimeMs}ms (${writePerOpUs.toStringAsFixed(2)}µs/op)');
' Write: ${writeTimeMs}ms (${writePerOpUs.toStringAsFixed(2)}µs/op)',
);
print(' Read: ${readTimeMs}ms (${readPerOpUs.toStringAsFixed(2)}µs/op)');
print(' Delete: ${deleteTimeMs}ms');
}
+10 -5
View File
@@ -36,7 +36,8 @@ class MemoryProfiler {
});
if (kDebugMode) {
print(
'⏰ PERIODIC MEMORY MONITORING STARTED (${interval.inSeconds}s interval)');
'⏰ PERIODIC MEMORY MONITORING STARTED (${interval.inSeconds}s interval)',
);
}
}
@@ -51,10 +52,14 @@ class MemoryProfiler {
/// Analyze memory growth between snapshots
static MemoryAnalysis analyzeGrowth(String startLabel, String endLabel) {
final start = _snapshots.firstWhere((s) => s.label == startLabel,
orElse: () => _snapshots.first);
final end = _snapshots.firstWhere((s) => s.label == endLabel,
orElse: () => _snapshots.last);
final start = _snapshots.firstWhere(
(s) => s.label == startLabel,
orElse: () => _snapshots.first,
);
final end = _snapshots.firstWhere(
(s) => s.label == endLabel,
orElse: () => _snapshots.last,
);
return MemoryAnalysis(
startLabel: startLabel,
-1
View File
@@ -1,4 +1,3 @@
import 'dart:async';
import 'package:flutter/foundation.dart';
/// Profiler for video playback performance metrics