Giter Club home page Giter Club logo

flutter-elinux-plugins's People

Contributors

hidenorimatsubayashi avatar makotosato-at avatar talksik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

flutter-elinux-plugins's Issues

Camera

Create camera plugin

TODO:

  • ImageStream APIs
  • Video recording APIs
  • Picture taking APIs
  • Flash mode API
  • Exposure APIs
  • Focus APIs
  • Support multi cameras

Video player crash

hello,
I have a crash problem, please watch the screenshot.
when video data from RTC server stoped and video player which is created for receiving video data from RTC service destroyed,this will happen;
Please tell me, what may be the cause, thanks
image

Using media-kit

Anyone had luck integrating media-kit with elinux for video playback?
media-kit uses libmpv under the hood on Linux.

<video_player> Compilation error

Sorry to bother you again, I couldn't compile when integrating the video playback function. Here are some instructions for my project:

  1. Add dependencies:
    video_player: ^2.8.2
    video_player_elinux:
    git:
    url: https://github.com/sony/flutter-elinux-plugins.git
    path: packages/video_player
    Ref: main
  2. Before adding dependencies, I can compile the product normally and execute it on the embedded device. The command used is: flutter-elinux build elinux --target-backend-type=x11 --target-arch=arm64, and I am in Added set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++-10) to elinux/CmakeLists.txt.
  3. I have asked similar questions before(#93 ), but I am a newbie, what should I do?too difficult.

[Video Player] Plugin compatibility with flutter-auto embedder

Hello.

I have an iMX8M Mini. I tried the example/demo application as is. However, I seem to have 2 issues:

  1. An error happen when pressing play [ERROR:/usr/src/debug/flutter-auto-runtimerelease/git-r0/git/shell/static_plugins/gstreamer_egl/gstreamer_egl.cc(1552)] Unable to retrieve current position.
  2. The metadata appears but nothing happens. If I use the following pipeline I can stream videos with gstreamer though: $ gst-launch-1.0 filesrc location=/path/to/video.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec ! imxvideoconvert_g2d ! queue ! autovideosink.

Here is a log of what happens:

root@verdin-imx8mm-06898530:/# flutter-auto --c --f --b=/usr/share/flutter/demo_app
[INFO:configuration.cc(248)] **********
[INFO:configuration.cc(249)] * Global *
[INFO:configuration.cc(250)] **********
[INFO:configuration.cc(251)] Application Id: .......... flutter-auto
[INFO:configuration.cc(255)] Cursor Theme: ............
[INFO:configuration.cc(256)] Disable Cursor: .......... true
[INFO:configuration.cc(258)] Debug Backend: ........... false
[INFO:configuration.cc(260)] ********
[INFO:configuration.cc(261)] * View *
[INFO:configuration.cc(262)] ********
[INFO:configuration.cc(269)] Bundle Path: .............. /usr/share/flutter/demo_app
[INFO:configuration.cc(270)] Window Type: .............. NORMAL
[INFO:configuration.cc(271)] Size: ..................... 1920 x 720
[INFO:configuration.cc(273)] Fullscreen: ............... true
[INFO:configuration.cc(275)] Accessibility Features: ... 0
[INFO:display.cc(275)] Keyboard Present
[INFO:display.cc(284)] Touch Present
[INFO:engine.cc(567)] (0) Loading AOT: /usr/share/flutter/demo_app/lib/libapp.so
[ERROR:/usr/src/debug/flutter-auto-runtimerelease/git-r0/git/shell/static_plugins/gstreamer_egl/gstreamer_egl.cc(1552)] Unable to retrieve current position

====== AIUR: 4.7.1 build on Jul 19 2022 06:15:03. ======
        Core: MKVPARSER_01.08.17  build on Apr 26 2022 07:37:32
 file: /usr/lib/imx-mm/parser/lib_mkv_parser_arm_elinux.so.3.1
------------------------
    Track 00 [audio_0] Enabled
        Duration: 0:00:47.791668000
        Language: por
    Mime:
        audio/x-vorbis, channels=(int)2, rate=(int)44100, bitrate=(int)0, framed=(boolean)true
------------------------

====== BEEP: 4.7.1 build on Jul 19 2022 06:15:03. ======
        Core: OggVorbis decoder Wrapper  build on Dec  7 2017 18:15:03
 file: /usr/lib/imx-mm/audio-codec/wrap/lib_vorbisd_wrap_arm_elinux.so.3
CODEC: OGGVORBISD_ARM_02.04.00_ARMV8  build on Mar 11 2019 19:56:02.
------------------------
    Track 01 [audio_1] Enabled
        Duration: 0:00:47.791668000
        Language: eng
    Mime:
        audio/x-vorbis, channels=(int)2, rate=(int)48000, bitrate=(int)0, framed=(boolean)true
------------------------

====== BEEP: 4.7.1 build on Jul 19 2022 06:15:03. ======
        Core: OggVorbis decoder Wrapper  build on Dec  7 2017 18:15:03
 file: /usr/lib/imx-mm/audio-codec/wrap/lib_vorbisd_wrap_arm_elinux.so.3
CODEC: OGGVORBISD_ARM_02.04.00_ARMV8  build on Mar 11 2019 19:56:02.
------------------------
    Track 02 [video_0] Enabled
        Duration: 0:00:47.791668000
        Language: eng
    Mime:
        video/x-vp8, width=(int)1024, height=(int)436, framerate=(fraction)30/1
------------------------
------------------------
    Track 03 [audio_2] Enabled
        Duration: 0:00:47.791668000
        Language: spa
    Mime:
        audio/x-vorbis, channels=(int)2, rate=(int)44100, bitrate=(int)0, framed=(boolean)true
------------------------

====== BEEP: 4.7.1 build on Jul 19 2022 06:15:03. ======
        Core: OggVorbis decoder Wrapper  build on Dec  7 2017 18:15:03
 file: /usr/lib/imx-mm/audio-codec/wrap/lib_vorbisd_wrap_arm_elinux.so.3
CODEC: OGGVORBISD_ARM_02.04.00_ARMV8  build on Mar 11 2019 19:56:02.

【SharedPreferencesELinux】Unable to save

i run main.dart, always "Button tapped 1 time", when i restart App, it become "0 times".I just added some printing:

Future _incrementCounter() async {
final Map<String, Object> values = await prefs.getAll();
final int counter = (values['counter'] as int? ?? 0) + 1;
print('_incrementCounter:values:$values');
setState(() {
_counter = prefs.setValue('Int', 'counter', counter).then((bool success) {
print('_incrementCounter:success:$success');
return counter;
});
});
}

No matter how many times i click,output always:
_incrementCounter:values:{}
_incrementCounter:success:true
...

No error message is reported。
so,where might the problem occur?
Looking forward to your reply,
thanks.

SharedPreferencesELinux error

hello,When I directly run main.dart, I receive the following error:
Dec 04 16:24:19 ztl demo_nolibs[48299]: #17 PointerRouter._dispatchEventToRoutes. (package:flutter/src/gestures/pointer_router.dart:143)
Dec 04 16:24:19 ztl demo_nolibs[48299]: #18 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625)
Dec 04 16:24:19 ztl demo_nolibs[48299]: #19 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:141)
Dec 04 16:24:19 ztl demo_nolibs[48299]: #20 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:127)
Dec 04 16:24:19 ztl demo_nolibs[48299]: #21 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:488)
Dec 04 16:24:19 ztl demo_nolibs[48299]: #22 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:468)
Dec 04 16:24:19 ztl demo_nolibs[48299]: #23 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:333)
Dec 04 16:24:19 ztl demo_nolibs[48299]: #24 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:413)
Dec 04 16:24:19 ztl demo_nolibs[48299]: #25 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:376)
Dec 04 16:24:19 ztl demo_nolibs[48299]: #26 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:323)
Dec 04 16:24:19 ztl demo_nolibs[48299]: #27 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:292)
Dec 04 16:24:19 ztl demo_nolibs[48299]: #28 _invoke1 (dart:ui/hooks.dart:186)
Dec 04 16:24:19 ztl demo_nolibs[48299]: #29 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:424)
Dec 04 16:24:19 ztl demo_nolibs[48299]: #30 _dispatchPointerDataPacket (dart:ui/hooks.dart:119)
Dec 04 16:24:20 ztl demo_nolibs[48299]: [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Bad state: The "HOME" environment variable is not set. This package (and POSIX) requires that HOME be set.
Dec 04 16:24:20 ztl demo_nolibs[48299]: #0 _getDirectory (package:xdg_directories/xdg_directories.dart:120)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #1 _directoryFromEnvironmentWithFallback (package:xdg_directories/xdg_directories.dart:109)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #2 dataHome (package:xdg_directories/xdg_directories.dart:170)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #3 PathProviderELinux.getApplicationSupportPath (package:path_provider_elinux/src/path_provider_elinux.dart:52)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #4 SharedPreferencesELinux._getLocalDataFile (package:shared_preferences_elinux/shared_preferences_elinux.dart:46)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #5 SharedPreferencesELinux._reload (package:shared_preferences_elinux/shared_preferences_elinux.dart:56)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #6 SharedPreferencesELinux._readPreferences (package:shared_preferences_elinux/shared_preferences_elinux.dart:73)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #7 SharedPreferencesELinux.getAllWithParameters (package:shared_preferences_elinux/shared_preferences_elinux.dart:142)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #8 SharedPreferencesELinux.getAll (package:shared_preferences_elinux/shared_preferences_elinux.dart:124)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #9 SharedPreferencesDemoState._incrementCounter (package:demo_nolibs/main.dart:41)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #10 _InkResponseState.handleTap (package:flutter/src/material/ink_well.dart:1154)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #11 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:275)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #12 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:654)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #13 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:311)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #14 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:244)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #15 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:630)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #16 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:98)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #17 PointerRouter._dispatchEventToRoutes. (package:flutter/src/gestures/pointer_router.dart:143)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #18 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #19 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:141)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #20 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:127)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #21 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:488)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #22 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:468)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #23 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:333)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #24 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:413)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #25 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:376)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #26 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:323)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #27 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:292)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #28 _invoke1 (dart:ui/hooks.dart:186)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #29 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:424)
Dec 04 16:24:20 ztl demo_nolibs[48299]: #30 _dispatchPointerDataPacket (dart:ui/hooks.dart:119)

dependencies:
flutter:
sdk: flutter
shared_preferences_elinux:
git:
url: https://github.com/sony/flutter-elinux-plugins.git
path: packages/shared_preferences
ref: main

env:
flutter-elinux --version
Flutter 3.13.9 • channel [user-branch] • unknown source
Framework • revision d211f42860 (6 周前) • 2023-10-25 13:42:25 -0700
Engine • revision 0545f8705d
Tools • Dart 3.1.5 • DevTools 2.25.0

thanks~

Video Player Memory leak

hi,
I found video player have memory leak.
Test devices:
M1 mac mini : ubuntu 20.04 arm64
`➜ example git:(main) flutter-elinux doctor -v
[✓] Flutter (Channel unknown, 2.5.2, on Ubuntu 20.04.2 LTS 5.4.0-90-generic, locale en_US.UTF-8)
• Flutter version 2.5.2 at /home/parallels/work/flutter-elinux/flutter
• Upstream repository unknown
• Framework revision 3595343e20 (9 weeks ago), 2021-09-30 12:58:18 -0700
• Engine revision 6ac856380f
• Dart version 2.14.3
• Flutter download mirror https://storage.flutter-io.cn

[✓] eLinux toolchain - develop for embedded Linux devices
• clang version 10.0.0-4ubuntu1
• cmake version 3.22.0
• pkg-config version 0.29.1

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Linux toolchain - develop for Linux desktop
• clang version 10.0.0-4ubuntu1
• cmake version 3.22.0
• ninja version 1.10.0
• pkg-config version 0.29.1

[✗] Flutter IDE Support (No supported IDEs installed)
• IntelliJ - https://www.jetbrains.com/idea/
• Android Studio - https://developer.android.com/studio/
• VS Code - https://code.visualstudio.com/

[!] Proxy Configuration
• HTTP_PROXY is set
! NO_PROXY is not set

[✓] Connected device (3 available)
• Linux (desktop) • linux • linux-arm64 • Ubuntu 20.04.2 LTS 5.4.0-90-generic
• eLinux (desktop) • elinux-wayland • flutter-tester • Ubuntu 20.04.2 LTS 5.4.0-90-generic`
flutter-elinux run --profile
image

Failed to build including video player

The build fails to include the video player.

Can you see what the problem is?

I appreciate and respect your efforts.

Framework • revision ee4e09cce0 (9 days ago) • 2022-05-09 16:45:18 -0700
Engine • revision d1b9a6938a
Tools • Dart 2.17.0 • DevTools 2.12.2
Launching lib/main.dart on eLinux in debug mode...
Building an eLinux application with wayland backend in debug mode for arm64 target...        17.0s
Exception: Failed to cmake build:
[  0%] Built target flutter_assemble
[  6%] Building CXX object
flutter/CMakeFiles/flutter_wrapper_plugin.dir/ephemeral/cpp_client_wrapper/core_implementations.cc.o
[ 12%] Building CXX object
flutter/CMakeFiles/flutter_wrapper_plugin.dir/ephemeral/cpp_client_wrapper/standard_codec.cc.o
[ 18%] Building CXX object
flutter/CMakeFiles/flutter_wrapper_plugin.dir/ephemeral/cpp_client_wrapper/plugin_registrar.cc.o
[ 25%] Linking CXX static library libflutter_wrapper_plugin.a
[ 25%] Built target flutter_wrapper_plugin
[ 31%] Building CXX object
flutter/CMakeFiles/flutter_wrapper_app.dir/ephemeral/cpp_client_wrapper/core_implementations.cc.o
[ 37%] Building CXX object
flutter/CMakeFiles/flutter_wrapper_app.dir/ephemeral/cpp_client_wrapper/standard_codec.cc.o
[ 43%] Building CXX object
flutter/CMakeFiles/flutter_wrapper_app.dir/ephemeral/cpp_client_wrapper/flutter_engine.cc.o
[ 50%] Building CXX object
flutter/CMakeFiles/flutter_wrapper_app.dir/ephemeral/cpp_client_wrapper/flutter_view_controller.cc.o
[ 56%] Linking CXX static library libflutter_wrapper_app.a
[ 56%] Built target flutter_wrapper_app
[ 62%] Building CXX object
plugins/video_player_elinux/CMakeFiles/video_player_elinux_plugin.dir/video_player_elinux_plugin.cc.o
[ 68%] Building CXX object
plugins/video_player_elinux/CMakeFiles/video_player_elinux_plugin.dir/gst_video_player.cc.o

/home/iori/src/flutter-elinux-plugins/packages/video_player/example/elinux/flutter/ephemeral/.plugin_symlinks
/video_player_elinux/elinux/gst_video_player.cc:155:10: error: no member named 'unique_lock' in namespace
'std'
    std::unique_lock<std::mutex> lock(mutex_event_completed_);
    ~~~~~^
/home/iori/src/flutter-elinux-plugins/packages/video_player/example/elinux/flutter/ephemeral/.plugin_symlinks
/video_player_elinux/elinux/gst_video_player.cc:155:32: error: expected '(' for function-style cast or type
construction
    std::unique_lock<std::mutex> lock(mutex_event_completed_);
                     ~~~~~~~~~~^
/home/iori/src/flutter-elinux-plugins/packages/video_player/example/elinux/flutter/ephemeral/.plugin_symlinks
/video_player_elinux/elinux/gst_video_player.cc:155:34: error: use of undeclared identifier 'lock'
    std::unique_lock<std::mutex> lock(mutex_event_completed_);
                                 ^
/home/iori/src/flutter-elinux-plugins/packages/video_player/example/elinux/flutter/ephemeral/.plugin_symlinks
/video_player_elinux/elinux/gst_video_player.cc:158:7: error: use of undeclared identifier 'lock'
      lock.unlock();
      ^
4 errors generated.
gmake[2]: *** [plugins/video_player_elinux/CMakeFiles/video_player_elinux_plugin.dir/build.make:90:
plugins/video_player_elinux/CMakeFiles/video_player_elinux_plugin.dir/gst_video_player.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:244:
plugins/video_player_elinux/CMakeFiles/video_player_elinux_plugin.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2```

<video player> compilation error

hello,an error occurred during compilation:
In file included from
/home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/.plugin_symlinks/video_p
layer_elinux/elinux/video_player_elinux_plugin.cc:10:
/home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/cpp_client_wrapper/inclu
de/flutter/event_stream_handler_functions.h: In instantiation of
‘std::unique_ptr<flutter::StreamHandlerError >
flutter::StreamHandlerFunctions::OnListenInternal(const T*,
std::unique_ptr<flutter::EventSink >&&) [with T = flutter::EncodableValue]’:
/home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/cpp_client_wrapper/inclu
de/flutter/event_stream_handler_functions.h:48:42: required from here
/home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/cpp_client_wrapper/inclu
de/flutter/event_stream_handler_functions.h:57:27: error: moving a local object
in a return statement prevents copy elision [-Werror=pessimizing-move]
57 | return std::move(error);
| ^
/home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/cpp_client_wrapper/inclu
de/flutter/event_stream_handler_functions.h:57:27: note: remove ‘std::move’ call
/home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/cpp_client_wrapper/inclu
de/flutter/event_stream_handler_functions.h: In instantiation of
‘std::unique_ptr<flutter::StreamHandlerError >
flutter::StreamHandlerFunctions::OnCancelInternal(const T*) [with T =
flutter::EncodableValue]’:
/home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/cpp_client_wrapper/inclu
de/flutter/event_stream_handler_functions.h:61:42: required from here
/home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/cpp_client_wrapper/inclu
de/flutter/event_stream_handler_functions.h:69:27: error: moving a local object
in a return statement prevents copy elision [-Werror=pessimizing-move]
69 | return std::move(error);
| ^
/home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/cpp_client_wrapper/inclu
de/flutter/event_stream_handler_functions.h:69:27: note: remove ‘std::move’ call
/home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/.plugin_symlinks/video_p
layer_elinux/elinux/video_player_elinux_plugin.cc: In member function ‘const
string {anonymous}::VideoPlayerPlugin::GetExecutableDirectory()’:
/home/yone/Desktop/demo_nolibs/elinux/flutter/ephemeral/.plugin_symlinks/video_p
layer_elinux/elinux/video_player_elinux_plugin.cc:633:11: error: ignoring return
value of ‘ssize_t readlink(const char*, char*, size_t)’ declared with attribute
‘warn_unused_result’ [-Werror=unused-result]
633 | readlink("/proc/self/exe", buf, sizeof(buf) - 1);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: ***
[plugins/video_player_elinux/CMakeFiles/video_player_elinux_plugin.dir/build.mak
e:63:plugins/video_player_elinux/CMakeFiles/video_player_elinux_plugin.dir/video
_player_elinux_plugin.cc.o] 错误 1
make[1]: ***
[CMakeFiles/Makefile2:250:plugins/video_player_elinux/CMakeFiles/video_player_el
inux_plugin.dir/all] 错误 2
make: *** [Makefile:130:all] 错误 2

It seems to be a compatibility issue. How can I solve this problem? Thank you.

[Video Player] Support gstreamer dmabuf in video_player

Hello.
I have i.MX8MP board and using video_player.
This SoC has a VPU(Video Proccessing Unit) so that it can hardware decode H.264 with gstreamer.
But, 1080p 30fps or 60fps video, the following gst_buffer_extract() is the bottleneck and playback is slow.
(gst_extract_buffer() takes about 60ms.)
gst_video_player.cc:

const uint8_t* GstVideoPlayer::GetFrameBuffer() {
  std::shared_lock<std::shared_mutex> lock(mutex_buffer_);
  if (!gst_.buffer) {
    return nullptr;
  }

  const uint32_t pixel_bytes = width_ * height_ * 4;
  gst_buffer_extract(gst_.buffer, 0, pixels_.get(), pixel_bytes);
  return reinterpret_cast<const uint8_t*>(pixels_.get());
}

I think the availability of dmabuf would solve this problem.
Are there any plans to support gstreamer dmabuf in video_player?
(In my environment, gst_is_dmabuf_memory() returns TRUE, so I can use dmabuf.)

[Video Player] Unhandled Exception: PlatformException

Hi,

I'm trying to use the video-player plugin in flutter-elinux-plugins.
When running the example on the my ubuntu desktop, it completely works ok.

But when I cross compile this and run video-player-plugin example on an arm64 embedded linux environment
I encountered the error below during initialization.

Do I need a video player inside my embedded linux environment to be able to run this?
I'm running this over weston using flutter-client.

$> flutter-client --bundle=pathOfBundle -f

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)
#0 ELinuxVideoPlayerApi.initialize (package:video_player_elinux/src/messages.g.dart:202)

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)
#0 ELinuxVideoPlayerApi.setMixWithOthers (package:video_player_elinux/src/messages.g.dart:454)

#1 VideoPlayerController.initialize (package:video_player/video_player.dart:434)

Writing plugins

Is it possible to write plugins in languages other than C? For example Python, Go etc?

[Video Player] PlatformException occurs in video_player example

Hello.

I'm using Debian(bullseye) on my PC(x86_64) and flutter-elinux 3.13.0
When I run the video_player example, I get the following error:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)
#0      AndroidVideoPlayerApi.initialize (package:video_player_android/src/messages.g.dart:272)
<asynchronous suspension>

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)
#0      AndroidVideoPlayerApi.setMixWithOthers (package:video_player_android/src/messages.g.dart:522)
<asynchronous suspension>
#1      VideoPlayerController.initialize (package:video_player/video_player.dart:361)
<asynchronous suspension>

Here are the steps:

$ git clone https://github.com/sony/flutter-elinux-plugins.git
$ cd flutter-elinux-plugins/packages/video_player/example
$ flutter-elinux pub get
$ flutter-elinux run -d elinux-x11 --release

It does not occur in debug mode(--debug).

MissingPluginException encountered while try to start video recording

Hi

I am trying to use the camera plugins on the following configuration

  1. amd64 Ubuntu 22.04 linux
  2. flutter-elinux: 3.13.2
  3. camera: 0.10.5+5
  4. camera_elinux: https://github.com/sony/flutter-elinux-plugins.git (main branch)
  5. Display: X11

When I invoke the camera controller startVideoCapturing, I get the following exception

MissingPluginException(No implementation found for method startVideoRecording on channel plugins.flutter.io/camera)

Thanks

I run demo application video_player has error:[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.

copied the same code: https://github.com/sony/flutter-elinux-plugins/blob/main/packages/video_player/example/lib/main.dart in flutter project.
$ sudo apt install libglib2.0-dev
$ sudo apt install libgstreamer1.0-dev
build steps as below:
$flutter-elinux create .
$flutter-elinux build elinux --target-arch=arm64 --target-compiler-triple=aarch64-buildroot-linux-gnu --target-sysroot=aarch64-buildroot-linux-gnu/sysroot --target-compiler-flags=--gcc-toolchain=host --no-sound-null-safety

copy build\elinux\arm64\release\bundle to /test2/bundle_elinux_video on arm linux development boardrun .

root@rk3326_64:/test2/bundle_elinux_video# ./gstreamer_demo -b ./
arm_release_ver of this libmali is 'g2p0-01eac0', rk_so_ver is '7'.
Date: 2022-10-18 UTC
[07:11:37.516] libwayland: error in client communication (pid 1061)
[14819.717064] rk_vcodec: vpu_service_ioctl:2147: error: unknown vpu service ioctl cmd 40086c01
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(216)] Could not make the context current to acquire the frame.
xdg_surface@18: error 3: xdg_surface has never been configured
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(97)] Could not make the context current to destroy the GrDirectContext resources.

Support high-resolution videos in video_player

Currently when playing videos higher than 1080p 30fps(for example 1080p 60fps) it cause player to lose sound and play slower(1080p 60 fps plays like 30), the higher resolution - slower playback is.

  • On 4K it looks like slow motion video.
  • HW acceleration is present ( VAAPI ), also tried separate pipeline without sound, just video - same result. Pipeline: filesrc ! qtdemux ! queue ! h264parse ! vaapih264dec ! vaapipostproc ! fakesink
  • When sound disappears underflow happens: WARN pulse pulsesink.c:703:gst_pulsering_stream_underflow_cb:<audiosink-actual-sink-pulse> Got underflow
  • There's no resources starvation CPU/GPU

Tests were performed with big-buck samples:

  • 1080p 30fps(no issues)
  • 1080p 60 fps(video playback looks like 30 fps or slower, sound disappears once introduction animation ends)
  • 4K 30 fps (super slow video, same issue with sound )

Tested on Laptop with Ubuntu 20.04, Intel HD Graphics ( Latest drivers as well as VAAPI lib were built from source )
Playback is fine in separate window if don't provide videosink to playbin.

Video Support

hi,
What are the solutions for video on other platforms? For example, Raspberry Pi

URL launcher

Create URL launcher plugin, but I have no ideas now.

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.