Code Monkey home page Code Monkey logo

Comments (11)

bdlukaa avatar bdlukaa commented on June 17, 2024

@alexmercerind any idea?

from just_audio_libwinmedia.

alexmercerind avatar alexmercerind commented on June 17, 2024

@baudren

First, I don't know why it talks about libwinmedia 0.0.3 despite my pubspec file asking for 0.0.4.

libwinmedia is my C/C++ library (AND ITS LATEST VERSION IS 0.0.3), I do NOT endorse just_audio_libwinmedia or just_audio. I have nothing to do with the versioning of just_audio_libwinmedia (which is 0.0.4 at the moment). Other thing to note is that, libwinmedia.dart is Dart projection that I wrote for my personal purpose & follows different versioning (because both are separate things & I cannot just wait for bug-fixes/features that I add to match versioning).

But when I run, I get the following error:

First of all, always share your log with --verbose. I cannot just blindly tell what is "A required package was not found". Secondly, installing the required packages before attempting to build application is the first thing that one does (sudo apt-get install libwebkit2gtk-4.0-dev).

Once again, I do NOT endorse just_audio_libwinmedia or just_audio & it is not my responsiblity to write build instructions or document required apt packages.

from just_audio_libwinmedia.

baudren avatar baudren commented on June 17, 2024

@alexmercerind Thank you for the clarification, and thank you for your work on the underlying library, then!
I did not think about checking the --verbose output, as I was thinking that the list of missing packages would appear in the normal command, but I was wrong. Indeed, it is then listed that libwebkit2gtk-4.0 was missing. I installed the dev dependency as you suggested, and the program now goes forward.

However, @bdlukaa (thanks for adding the linux instructions, btw!), the application then never really launches. I see nothing in flutter run --verbose that indicates a failure, but the application window is simply frozen (I can't move it).

I will directly the underlying library, libwinmedia, and see if I get a similar error.

[  +16 ms] Building Linux application...
[  +11 ms] <- compile package:sound_tests/main.dart
[   +4 ms] executing: [build/linux/x64/debug/] cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug
-DFLUTTER_TARGET_PLATFORM=linux-x64 /home/benjamin/StudioProjects/sound_tests/linux
[  +40 ms] libwinmedia - 0.0.3
[   +1 ms] -------------------
[        ] Building on Linux against GTK 3.0 & WebKit2 4.0
[        ] C++ Standard: 17
[   +1 ms] -- Checking for module 'webkit2gtk-4.0'
[  +20 ms] --   Found webkit2gtk-4.0, version 2.34.1
[  +68 ms] Enabled Dart VM NativePorts callbacks.
[   +1 ms] -- Configuring done
[  +18 ms] -- Generating done
[        ] -- Build files have been written to:
/home/benjamin/StudioProjects/sound_tests/build/linux/x64/debug
[   +3 ms] executing: ninja -C build/linux/x64/debug install
[   +5 ms] ninja: Entering directory `build/linux/x64/debug'
[+3082 ms] [1/10] Building CXX object
plugins/libwinmedia/libwinmedia/CMakeFiles/libwinmedia.dir/libwinmedia.cpp.o
[ +239 ms] [2/10] Linking CXX shared library plugins/libwinmedia/libwinmedia/libwinmedia.so
[+10258 ms] [3/10] Generating
/home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/libflutter_linux_gtk.so,
/home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/flutter_linux/fl_basic_message
_channel.h,
/home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/flutter_linux/fl_binary_codec.
h,
/home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/flutter_linux/fl_binary_messen
ger.h,
/home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/flutter_linux/fl_dart_project.
h, /home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/flutter_linux/fl_engine.h,
/home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/flutter_linux/fl_json_message_
codec.h,
/home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/flutter_linux/fl_json_method_c
odec.h,
/home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/flutter_linux/fl_message_codec
.h,
/home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/flutter_linux/fl_method_call.h
,
/home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/flutter_linux/fl_method_channe
l.h,
/home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/flutter_linux/fl_method_codec.
h,
/home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/flutter_linux/fl_method_respon
se.h,
/home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/flutter_linux/fl_plugin_regist
rar.h,
/home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/flutter_linux/fl_plugin_regist
ry.h,
/home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/flutter_linux/fl_standard_mess
age_codec.h,
/home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/flutter_linux/fl_standard_meth
od_codec.h,
/home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/flutter_linux/fl_string_codec.
h, /home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/flutter_linux/fl_value.h,
/home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/flutter_linux/fl_view.h,
/home/benjamin/StudioProjects/sound_tests/linux/flutter/ephemeral/flutter_linux/flutter_linux.h,
_phony_
[   +3 ms] [  +75 ms] executing: uname -m
[        ] [  +32 ms] Exit code 0 from: uname -m
[        ] [        ] x86_64
[        ] [   +7 ms] executing: [/home/benjamin/Programs/flutter/] git -c
log.showSignature=false log -n 1 --pretty=format:%H
[        ] [   +5 ms] Exit code 0 from: git -c log.showSignature=false log -n 1
--pretty=format:%H
[        ] [        ] 3595343e20a61ff16d14e8ecc25f364276bb1b8b
[        ] [        ] executing: [/home/benjamin/Programs/flutter/] git tag --points-at
3595343e20a61ff16d14e8ecc25f364276bb1b8b
[        ] [  +18 ms] Exit code 0 from: git tag --points-at
3595343e20a61ff16d14e8ecc25f364276bb1b8b
[        ] [        ] 2.5.2
[        ] [  +12 ms] executing: [/home/benjamin/Programs/flutter/] git rev-parse --abbrev-ref
--symbolic @{u}
[        ] [   +4 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] [        ] origin/stable
[        ] [        ] executing: [/home/benjamin/Programs/flutter/] git ls-remote --get-url
origin
[        ] [   +4 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] [        ] https://github.com/flutter/flutter.git
[        ] [  +56 ms] executing: [/home/benjamin/Programs/flutter/] git rev-parse --abbrev-ref
HEAD
[        ] [   +3 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] [        ] stable
[        ] [  +53 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required,
skipping update.
[        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required,
skipping update.
[        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping
update.
[        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] [   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping
update.
[        ] [        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping
update.
[        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping
update.
[        ] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping
update.
[        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping
update.
[        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping
update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping
update.
[        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping
update.
[        ] [ +122 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required,
skipping update.
[        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required,
skipping update.
[        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping
update.
[        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping
update.
[        ] [        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping
update.
[        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping
update.
[        ] [   +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping
update.
[        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping
update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping
update.
[        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping
update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping
update.
[        ] [        ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[        ] [  +29 ms] Initializing file store
[        ] [  +18 ms] Skipping target: gen_localizations
[        ] [  +19 ms] gen_dart_plugin_registrant: Starting due to
{InvalidatedReasonKind.inputChanged: The following inputs have updated contents:
/home/benjamin/StudioProjects/sound_tests/.dart_tool/package_config_subset}
[        ] [   +2 ms] unpack_linux: Starting due to {}
[        ] [ +124 ms] unpack_linux: Complete
[        ] [ +561 ms] Found plugin audio_session at
/home/benjamin/.pub-cache/hosted/pub.dartlang.org/audio_session-0.1.6+1/
[        ] [  +15 ms] Found plugin just_audio at
/home/benjamin/.pub-cache/hosted/pub.dartlang.org/just_audio-0.9.15/
[        ] [   +1 ms] Found plugin just_audio_libwinmedia at
/home/benjamin/.pub-cache/hosted/pub.dartlang.org/just_audio_libwinmedia-0.0.4/
[        ] [   +3 ms] Found plugin just_audio_web at
/home/benjamin/.pub-cache/hosted/pub.dartlang.org/just_audio_web-0.4.2/
[        ] [   +2 ms] Found plugin libwinmedia at
/home/benjamin/.pub-cache/hosted/pub.dartlang.org/libwinmedia-0.0.7/
[        ] [   +4 ms] Found plugin path_provider at
/home/benjamin/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.6/
[        ] [   +1 ms] Found plugin path_provider_linux at
/home/benjamin/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.1.0/
[        ] [   +1 ms] Found plugin path_provider_macos at
/home/benjamin/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.2/
[        ] [   +2 ms] Found plugin path_provider_windows at
/home/benjamin/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.0.3/
[        ] [  +34 ms] gen_dart_plugin_registrant: Complete
[        ] [   +1 ms] kernel_snapshot: Starting due to {}
[   +2 ms] [   +7 ms] /home/benjamin/Programs/flutter/bin/cache/dart-sdk/bin/dart
--disable-dart-dev
/home/benjamin/Programs/flutter/bin/cache/artifacts/engine/linux-x64/frontend_server.dart.snapsh
ot --sdk-root
/home/benjamin/Programs/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/
--target=flutter --no-print-incremental-dependencies -DFLUTTER_WEB_AUTO_DETECT=true
-Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation
--packages /home/benjamin/StudioProjects/sound_tests/.dart_tool/package_config.json
--output-dill
/home/benjamin/StudioProjects/sound_tests/.dart_tool/flutter_build/647b4d9e6c396086c56f937d99299
d95/app.dill --depfile
/home/benjamin/StudioProjects/sound_tests/.dart_tool/flutter_build/647b4d9e6c396086c56f937d99299
d95/kernel_snapshot.d
/home/benjamin/StudioProjects/sound_tests/.dart_tool/flutter_build/generated_main.dart
[   +1 ms] [+10476 ms] kernel_snapshot: Complete
[        ] [ +474 ms] debug_bundle_linux-x64_assets: Starting due to {}
[        ] [ +186 ms] debug_bundle_linux-x64_assets: Complete
[        ] [ +600 ms] Persisting file store
[        ] [   +7 ms] Done persisting file store
[        ] [   +8 ms] build succeeded.
[        ] [   +8 ms] "flutter assemble" took 12,742ms.
[        ] [   +3 ms] Running shutdown hooks
[        ] [        ] Shutdown hooks complete
[        ] [        ] exiting with code 0
[ +431 ms] [4/10] Building CXX object CMakeFiles/sound_tests.dir/main.cc.o
[  +17 ms] [5/10] Building CXX object
CMakeFiles/sound_tests.dir/flutter/generated_plugin_registrant.cc.o
[  +45 ms] [6/10] Building CXX object CMakeFiles/sound_tests.dir/my_application.cc.o
[  +18 ms] [7/10] Building CXX object
plugins/libwinmedia/CMakeFiles/libwinmedia_plugin.dir/libwinmedia_plugin.cc.o
[  +84 ms] [8/10] Linking CXX shared library plugins/libwinmedia/liblibwinmedia_plugin.so
[ +118 ms] [9/10] Linking CXX executable intermediates_do_not_run/sound_tests
[        ] [9/10] Install the project...
[   +7 ms] -- Install configuration: "Debug"
[   +1 ms] -- Installing:
/home/benjamin/StudioProjects/sound_tests/build/linux/x64/debug/bundle/sound_tests
[        ] -- Set runtime path of
"/home/benjamin/StudioProjects/sound_tests/build/linux/x64/debug/bundle/sound_tests" to
"$ORIGIN/lib"
[        ] -- Installing:
/home/benjamin/StudioProjects/sound_tests/build/linux/x64/debug/bundle/data/icudtl.dat
[        ] -- Installing:
/home/benjamin/StudioProjects/sound_tests/build/linux/x64/debug/bundle/lib/libflutter_linux_gtk.
so
[  +63 ms] -- Installing:
/home/benjamin/StudioProjects/sound_tests/build/linux/x64/debug/bundle/lib/liblibwinmedia_plugin
.so
[        ] -- Installing:
/home/benjamin/StudioProjects/sound_tests/build/linux/x64/debug/bundle/lib/libwinmedia.so
[   +1 ms] -- Installing:
/home/benjamin/StudioProjects/sound_tests/build/linux/x64/debug/bundle/data/flutter_assets
[        ] -- Installing:
/home/benjamin/StudioProjects/sound_tests/build/linux/x64/debug/bundle/data/flutter_assets/versi
on.json
[        ] -- Installing:
/home/benjamin/StudioProjects/sound_tests/build/linux/x64/debug/bundle/data/flutter_assets/NOTIC
ES.Z
[        ] -- Installing:
/home/benjamin/StudioProjects/sound_tests/build/linux/x64/debug/bundle/data/flutter_assets/fonts
[        ] -- Installing:
/home/benjamin/StudioProjects/sound_tests/build/linux/x64/debug/bundle/data/flutter_assets/fonts
/MaterialIcons-Regular.otf
[  +11 ms] -- Installing:
/home/benjamin/StudioProjects/sound_tests/build/linux/x64/debug/bundle/data/flutter_assets/Asset
Manifest.json
[        ] -- Installing:
/home/benjamin/StudioProjects/sound_tests/build/linux/x64/debug/bundle/data/flutter_assets/FontM
anifest.json
[        ] -- Installing:
/home/benjamin/StudioProjects/sound_tests/build/linux/x64/debug/bundle/data/flutter_assets/packa
ges
[        ] -- Installing:
/home/benjamin/StudioProjects/sound_tests/build/linux/x64/debug/bundle/data/flutter_assets/packa
ges/cupertino_icons
[        ] -- Installing:
/home/benjamin/StudioProjects/sound_tests/build/linux/x64/debug/bundle/data/flutter_assets/packa
ges/cupertino_icons/assets
[        ] -- Installing:
/home/benjamin/StudioProjects/sound_tests/build/linux/x64/debug/bundle/data/flutter_assets/kerne
l_blob.bin
[  +81 ms] Building Linux application... (completed in 14.7s)
[ +223 ms] Observatory URL on device: http://127.0.0.1:42887/NV0jOR3hnaI=/
[   +5 ms] Caching compiled dill
[  +76 ms] Connecting to service protocol: http://127.0.0.1:42887/NV0jOR3hnaI=/
[ +143 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting
to VM service at http://127.0.0.1:42887/NV0jOR3hnaI=/.
[  +77 ms] DDS is listening at http://127.0.0.1:39745/49IDHqXGW4E=/.
[  +45 ms] Successfully connected to service protocol: http://127.0.0.1:42887/NV0jOR3hnaI=/
[  +28 ms] DevFS: Creating new filesystem on the device (null)
[  +22 ms] DevFS: Created new filesystem on the device
(file:///tmp/sound_testsKEMATW/sound_tests/)
[   +1 ms] Updating assets
[  +66 ms] Syncing files to device Linux...
[   +1 ms] <- reset
[        ] Compiling dart to kernel with 0 updated files
[   +2 ms] <- recompile
file:///home/benjamin/StudioProjects/sound_tests/.dart_tool/flutter_build/generated_main.dart
a9169ae9-b7db-4c03-9d47-5a5a3c68c9d0
[        ] <- a9169ae9-b7db-4c03-9d47-5a5a3c68c9d0
[ +208 ms] Updating files.
[        ] DevFS: Sync finished
[   +1 ms] Syncing files to device Linux... (completed in 213ms)
[        ] Synced 0.0MB.
[   +2 ms] <- accept
[   +2 ms] Connected to _flutterView/0x1d51340.
[   +3 ms] Flutter run key commands.
[   +1 ms] r Hot reload. 🔥🔥🔥
[        ] R Hot restart.
[        ] h List all available interactive commands.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] 💪 Running with sound null safety 💪
[   +1 ms] An Observatory debugger and profiler on Linux is available at:
           http://127.0.0.1:39745/49IDHqXGW4E=/
[  +74 ms] Activating Dart DevTools...
[+1343 ms] Activating Dart DevTools... (completed in 1,343ms)

from just_audio_libwinmedia.

baudren avatar baudren commented on June 17, 2024

I confirm that the simple example from @alexmercerind on his dart bindings work, I manage to run the example and play some local audio files without issues.

@bdlukaa please let me know if you need any other information for debugging this freezing issue. And thanks again to both for your work and time, I'm looking forward to be able to create a nice music application cross-platform!

Cheers

from just_audio_libwinmedia.

bdlukaa avatar bdlukaa commented on June 17, 2024

@baudren This is probably caused by preload: true. Can you try this again using ryanheise/just_audio@0aef1be (latest master) ?

from just_audio_libwinmedia.

baudren avatar baudren commented on June 17, 2024

I used the following in my pubspec.yaml

  just_audio:
    git:
      url: https://github.com/ryanheise/just_audio.git
      path: just_audio
      ref: master
  just_audio_libwinmedia: ^0.0.4

But I still get the window hanging without starting.

from just_audio_libwinmedia.

bdlukaa avatar bdlukaa commented on June 17, 2024

@baudren Can you try his latest example?

from just_audio_libwinmedia.

baudren avatar baudren commented on June 17, 2024

@bdlukaa I tried the playlist example from a few days ago. The app starts, which is a good sign! The play button however does not seem to work, I get this warning in the console:

CONSOLE JS ERROR Unhandled Promise Rejection: AbortError: The operation was aborted.

However the issue is not the same as the original ticket... do you want me to open a new issue?

from just_audio_libwinmedia.

bdlukaa avatar bdlukaa commented on June 17, 2024

No, it's not necessary! I was thinking to install linux in my machine to see if I can get this working

from just_audio_libwinmedia.

nikitatg avatar nikitatg commented on June 17, 2024

On Ubuntu 20.04.3 LTS trying examples have same issues as above.

  1. On main.dart window are hanging. It happens on _player.setAudioSource(AudioSource.uri(Uri.file(someFilePath)) and _player.setAudioSource(AudioSource.uri(Uri.parse(someUri)). If passing preload: false app starts, but on pushing Play button debug console says CONSOLE JS ERROR Unhandled Promise Rejection: AbortError: The operation was aborted.
  2. Tried to use classes from src/just_audio_libwinmedia_real.dart directly but compiler does not see them when import is import 'package:just_audio_libwinmedia/just_audio_libwinmedia.dart';. Obviously just_audio_libwinmedia.dart does not export just_audio_libwinmedia_real.dart because of if (dart.library.ffi) does not pierce. But don't know what is dart.library.ffi flag

from just_audio_libwinmedia.

bdlukaa avatar bdlukaa commented on June 17, 2024

But don't know what is dart.library.ffi flag

This makes sure it doesn't break on the web platform

from just_audio_libwinmedia.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.