Closed meng-fucius closed 2 years ago
Add await
before DartVLC.initialize.
Please close, if fixed.
It works, thanks.
I am not sure if should open a new issue or not, but it seems this issue is back again, and using the latest version the initialize method does not return a Future
. It works fine in debug mode but in release mode it just shows a blank screen. Although I can hear the audio...
Have I missed anything?
Flutter 3.7.12 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 4d9e56e694 (4 weeks ago) • 2023-04-17 21:47:46 -0400
Engine • revision 1a65d409c7
Tools • Dart 2.19.6 • DevTools 2.20.1
My main method:
void main() async {
WidgetsFlutterBinding.ensureInitialized();
DartVLC.initialize();
await windowManager.ensureInitialized();
var logDisk = LogDiskService();
Logger.root.onRecord.listen((event) async {
if (kDebugMode) print(event);
await logDisk.write(event.toString());
});
await SystemTheme.accentColor.load();
doWhenWindowReady(() {
appWindow.title = "Testytest";
appWindow.alignment = Alignment.center;
appWindow.show();
});
runApp(const ProviderScope(child: App()));
}
These are the error messages if they help:
[00000267561de8b0] main vout display error: Failed to set on top
[00000267561de3f0] main vout display error: Failed to set on top
[h264 @ 000002675602c580] get_buffer() failed
[h264 @ 000002675602c580] thread_get_buffer() failed
[h264 @ 000002675602c580] decode_slice_header error
[h264 @ 000002675602c580] no frame!
Also, I get these warnings at compile time (Konvertierung von "size_t" nach "int32_t", Datenverlust m�glich
--> Converting "size_t" to "int32_t", possible data loss
):
E:\Program Files\GitHub\testytest\windows\flutter\ephemeral\.plugin_symlinks\dart_vlc\core\api\api.cc(470,59): warning C4267: "=": Konvertierung von "size_t" nach "int32_t", Datenverlust m�glich [E:\Program Files\GitHub\testytest\build\windows\dart_vlc_core\dart_vlc_core.vcxproj]
E:\Program Files\GitHub\testytest\windows\flutter\ephemeral\.plugin_symlinks\dart_vlc\core\api\api.cc(491,51): warning C4267: "=": Konvertierung von "size_t" nach "int32_t", Datenverlust m�glich [E:\Program Files\GitHub\testytest\build\windows\dart_vlc_core\dart_vlc_core.vcxproj]
E:\Program Files\GitHub\testytest\windows\flutter\ephemeral\.plugin_symlinks\dart_vlc\core\api\api.cc(502,57): warning C4267: "Argument": Konvertierung von "size_t" nach "int32_t", Datenverlust m�glich [E:\Program Files\GitHub\testytest\build\windows\dart_vlc_core\dart_vlc_core.vcxproj]
E:\Program Files\GitHub\testytest\windows\flutter\ephemeral\.plugin_symlinks\dart_vlc\core\api\api.cc(503,46): warning C4267: "Argument": Konvertierung von "size_t" nach "int32_t", Datenverlust m�glich [E:\Program Files\GitHub\testytest\build\windows\dart_vlc_core\dart_vlc_core.vcxproj]
E:\Program Files\GitHub\testytest\windows\flutter\ephemeral\.plugin_symlinks\dart_vlc\core\api\api.cc(503,59): warning C4267: "Argument": Konvertierung von "size_t" nach "int32_t", Datenverlust m�glich [E:\Program Files\GitHub\testytest\build\windows\dart_vlc_core\dart_vlc_core.vcxproj]
E:\Program Files\GitHub\testytest\windows\flutter\ephemeral\.plugin_symlinks\dart_vlc\core\api\api.cc(509,72): warning C4267: "Argument": Konvertierung von "size_t" nach "int32_t", Datenverlust m�glich [E:\Program Files\GitHub\testytest\build\windows\dart_vlc_core\dart_vlc_core.vcxproj]
E:\Program Files\GitHub\testytest\windows\flutter\ephemeral\.plugin_symlinks\dart_vlc\core\api\api.cc(510,46): warning C4267: "Argument": Konvertierung von "size_t" nach "int32_t", Datenverlust m�glich [E:\Program Files\GitHub\testytest\build\windows\dart_vlc_core\dart_vlc_core.vcxproj]
E:\Program Files\GitHub\testytest\windows\flutter\ephemeral\.plugin_symlinks\dart_vlc\core\api\api.cc(510,59): warning C4267: "Argument": Konvertierung von "size_t" nach "int32_t", Datenverlust m�glich [E:\Program Files\GitHub\testytest\build\windows\dart_vlc_core\dart_vlc_core.vcxproj]
E:\Program Files\GitHub\testytest\windows\flutter\ephemeral\.plugin_symlinks\dart_vlc\core\player\player.cc(327,9): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [E:\Program Files\GitHub\testytest\build\windows\dart_vlc_core\dart_vlc_core.vcxproj]
Thanks for this amazing package 👍
Describe the bug Everything is ok in the debug mode,but there is no video playback under releas mode;
Minimal reproducible code
Flutter logs
Operating system:
Screenshots