-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
android flutter gstreamer issue #3
Comments
Can you try put the fltgst/app/native_binding/src/CMakeLists.txt Lines 27 to 38 in 8302ef9
|
Hi fengjiongmax, I modified the CMakeLists.txt as below, IF(${ANDROID_ABI} STREQUAL "armv7") SET(GST_ROOT ${GST_FOLDER}/${ABI_SUFFIX}) and I tried it again as your suggestions, but it still failed. D:\dev\flutter3193\bin\flutter.bat --no-color build apk Running Gradle task 'assembleRelease'... FAILURE: Build failed with an exception.
C++ build system [configure] failed while executing: CMake Warning at C:/Users/lyy/AppData/Local/Android/Sdk/ndk/23.1.7779620/build/cmake/android-legacy.toolchain.cmake:416 (message): CMake Error at C:/Users/lyy/AppData/Local/Android/Sdk/cmake/3.18.1/share/cmake-3.18/Modules/FindPkgConfig.cmake:797 (message):
BUILD FAILED in 12s |
Yes, we need fltgst/app/native_binding/src/CMakeLists.txt Lines 40 to 52 in 8302ef9
I haven't tried compiling for Android on Windows before, and the compiling error is CMake( and pkg-config) complaining about not finding any configuration for Gstreamer, but I think that is configurable in the CMake file: https://stackoverflow.com/questions/44487053/set-pkg-config-path-in-cmake I will find some time to make this work and thank you for creating this issue so I know something is missing in this repository. |
Hi fengjiongmax, Did you compile for Android on Linux(Ubuntu)before? |
Yes, I have. To make RTSP work, you need to figure out what plugin was required for your pipeline, and modify CMakeLists.txt accordingly: fltgst/app/native_binding/src/CMakeLists.txt Lines 57 to 62 in 8302ef9
The above code will link and initialize the GStreamer plugins for your application, and those plugins will require some other libraries to work, so you also need to link those libraries:
So for |
I have pushed commits to both master branch and videodisplay branch, now building apk on windows should work. |
Hi fengjiongmax, I updated the videodisplay branch, lyy@CNSHSX-210040 MINGW64 /e/flutter/20240301/fltgst (videodisplay)
D:\dev\flutter3193\bin\flutter.bat --no-color build apk Running Gradle task 'assembleRelease'... FAILURE: Build failed with an exception.
C++ build system [build] failed while executing:
BUILD FAILED in 14s |
Hi fengjiongmax, I also tried to compile the project by Android studio in Ubuntu,but it failed again. /home/yhl/flutter/bin/flutter --no-color build apk Running Gradle task 'assembleRelease'... FAILURE: Build failed with an exception.
C++ build system [build] failed while executing:
BUILD FAILED in 20s |
It seems the compiler can't find the header, please make sure your
|
Hi fengjiongmax, I configed the third-party folder as you listed. yhl@Ubuntu2204:~/projects/fltgst-videodisplay/app/fltgst$ flutter build apk --debug You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source! FAILURE: Build failed with an exception.
C++ build system [build] failed while executing:
BUILD FAILED in 31s |
I used the package of gstreamer-1.0-android-universal-1.20.1.tar.xz yhl@Ubuntu2204: |
That seems like the problem, can you try download the latest version and try again? |
Hi fengjiongmax, I tried gstreamer-1.0-android-universal-1.24.0 package. /home/yhl/flutter/bin/flutter --no-color build apk Running Gradle task 'assembleRelease'... FAILURE: Build failed with an exception.
ld: error: undefined symbol: g_malloc0
ld: error: undefined symbol: gst_element_factory_make
ld: error: undefined symbol: gst_pipeline_new
ld: error: undefined symbol: gst_bin_get_type
ld: error: undefined symbol: g_type_check_instance_cast
ld: error: undefined symbol: gst_bin_add_many
ld: error: undefined symbol: gst_element_link_many
ld: error: undefined symbol: gst_element_set_state
ld: error: undefined symbol: gst_bin_get_by_interface
ld: error: undefined symbol: g_printerr
ld: error: undefined symbol: gst_object_unref
ld: error: undefined symbol: _gst_debug_min
ld: error: undefined symbol: GST_CAT_DEFAULT
ld: error: undefined symbol: gst_debug_log
ld: error: undefined symbol: gst_element_get_type
ld: error: undefined symbol: gst_element_get_state
ld: error: undefined symbol: gst_plugin_register_static
ld: error: undefined symbol: g_once_init_enter
ld: error: undefined symbol: g_once_init_leave
ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors) C++ build system [build] failed while executing:
BUILD FAILED in 3s |
I don't know why it happened to compile error. and, yhl@Ubuntu2204:~/projects/fltgst-videodisplay/app/native_binding/third-party/gst-android/arm64$ grep -rin 'gst_init' . ./include/gstreamer-1.0/gst/gst.h:109:void gst_init (int *argc, char **argv[]); ./include/gstreamer-1.0/gst/gst.h:112:gboolean gst_init_check (int *argc, char **argv[], ./include/gstreamer-1.0/gst/gst.h:118:GOptionGroup * gst_init_get_option_group (void); grep: ./lib/libgstcheck-1.0.a: binary file matches grep: ./lib/libgstplayer-1.0.a: binary file matches |
interesting, did you try |
I tried flutter clean command first. yhl@Ubuntu2204: You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply FAILURE: Build failed with an exception.
ld: error: undefined symbol: g_malloc0
ld: error: undefined symbol: gst_element_factory_make
ld: error: undefined symbol: gst_pipeline_new
ld: error: undefined symbol: gst_bin_get_type
ld: error: undefined symbol: g_type_check_instance_cast
ld: error: undefined symbol: gst_bin_add_many
ld: error: undefined symbol: gst_element_link_many
ld: error: undefined symbol: gst_element_set_state
ld: error: undefined symbol: gst_bin_get_by_interface
ld: error: undefined symbol: g_printerr
ld: error: undefined symbol: gst_object_unref
ld: error: undefined symbol: _gst_debug_min
ld: error: undefined symbol: GST_CAT_DEFAULT
ld: error: undefined symbol: gst_debug_log
ld: error: undefined symbol: gst_element_get_type
ld: error: undefined symbol: gst_element_get_state
ld: error: undefined symbol: gst_plugin_register_static
ld: error: undefined symbol: g_once_init_enter
ld: error: undefined symbol: g_once_init_leave
ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors) C++ build system [build] failed while executing:
BUILD FAILED in 1m 2s |
I tested flutter doctor command yhl@Ubuntu2204:~/projects/fltgst-videodisplay/app/fltgst$ flutter doctor • No issues found! |
Can you provide the output of
|
Hi, I'm having the same issue. Here's my output of flutter build apk -vv --debug.
|
@MatteoGigerSR can you provide the content of |
I did not modify your version of the CMakeLists.txt
|
Well, not sure what went wrong... I tried this in a freshly setup environment, and it doesn't show me this error, can you try deleting the entire repo and setting it up and try again? |
Hi fengjiongmax, Could you help me to check the information?Thank you very much! yhl@Ubuntu2204:~/projects/fltgst-videodisplay/app/fltgst$ flutter build apk -vv --debug [ +232 ms] ensureAnalyticsSent: 230ms |
from the output, please make sure you didn't make any changes to |
@fengjiongmax |
yhl@Ubuntu2204:~/projects/fltgst-videodisplay/app/fltgst$ flutter build apk -vv --debug |
part 2/2 [ ] Resolve mutations for :app:processDebugJavaRes (Thread[included builds,5,main]) started. [ +106 ms] ensureAnalyticsSent: 106ms |
I tried that but I still have the same error. |
I now have it working thank you a lot!
Then I still had the error ld: error: --fix-cortex-a53-843419. Thanks a lot for this repo and all your help! |
Great! |
@Larryyuan2015 please pull the new commit from the repo, and if you haven't already, install the GStreamer packages for your Linux distribution following this. |
@fengjiongmax |
1 similar comment
@fengjiongmax |
Hi Sir,
I use your videodisplay flutter app in the IDE of Android Studio Flamingo | 2022.2.1 Patch 2.
and I put gstreamer-1.0-android-universal-1.20.1 libraries (arm64、armv7、x86、x86_64) in the path \fltgst\app\native_binding\third-party\gst-android\gstreamer-1.0.
There was still an error when I compiled the videodisplay branch.
Could you help me out.
Many thanks.
Execution failed for task ':native_binding:configureCMakeRelWithDebInfo[arm64-v8a]'.
CMake Error at C:/Users/lyy/AppData/Local/Android/Sdk/cmake/3.18.1/share/cmake-3.18/Modules/FindPkgConfig.cmake:797 (message):
None of the required 'gstreamer-1.0' found
Call Stack (most recent call first):
CMakeLists.txt:11 (pkg_search_module)
The text was updated successfully, but these errors were encountered: