Open
Conversation
支持使用Android NDK工具链编译modelbox。编译所得到的so文件,可被安卓/鸿蒙平台上的APP调用。
pymumu
reviewed
Apr 8, 2022
| # Look for the library (sorted from most current/relevant entry to least). | ||
| find_library(MINDSPORE_LIBRARY NAMES | ||
| mindspore | ||
| NAMES mindspore mindspore-lite |
Contributor
There was a problem hiding this comment.
mindspore和lite版本能混用吗?
是否应该要分开?
pymumu
reviewed
Apr 8, 2022
| message(FATAL_ERROR "Do not build in source directory!") | ||
| endif() | ||
|
|
||
| if (DEFINED ENV{USER_ROOT} AND ANDROID_ABI) |
pymumu
reviewed
Apr 8, 2022
| #ifdef ANDROID | ||
| /* When they come from different so files, they may have different hash | ||
| * codes even if they have the same names. */ | ||
| if (strcmp(typeid(T).name(), entrys_[key].type().name()) == 0) { |
pymumu
reviewed
Apr 8, 2022
| inline _LIBCPP_INLINE_VISIBILITY | ||
| typename std::enable_if | ||
| < | ||
| !std::is_array<_Tp>::value && !std::is_array<_Up>::value, |
pymumu
reviewed
Apr 8, 2022
| @@ -0,0 +1,139 @@ | |||
| /* Android does not provide execinfo.h. We implement backtrace and | |||
Contributor
There was a problem hiding this comment.
这个文件感觉可以放到src/libmodelbox/base/arch/android中。避免andriod宏
pymumu
reviewed
Apr 8, 2022
| object, then these functions return 0. */ | ||
| if (!dladdr(addr, &info) || info.dli_fname == NULL) | ||
| { | ||
| pos += snprintf(symbols + pos, len - pos, "Unknown(+0) [%p]", addr) + 1; |
pymumu
reviewed
Apr 8, 2022
| return NULL; | ||
| } | ||
|
|
||
| memset(symbols, 0, sizeof(void *)); |
pymumu
reviewed
Apr 8, 2022
| #ifndef ANDROID | ||
| #include <execinfo.h> | ||
| #else | ||
| #include "../../../libmodelbox/base/utils/backtrace.cc" |
pymumu
reviewed
Apr 8, 2022
| find_package(PythonInterp ${PYTHON_VER}) | ||
| if(NOT ${PYTHONINTERP_FOUND}) | ||
| if (DEFINED ENV{USER_ROOT} AND ANDROID_ABI AND PYTHON_VERSION_STRING) | ||
| if(EXISTS "$ENV{USER_ROOT}/${ANDROID_ABI}/usr/lib/libpython${PYTHON_VERSION_STRING}.so") |
8931842 to
1d25ee9
Compare
| av_packet_rescale_ts(av_packet.get(), time_base, stream_->time_base); | ||
| av_packet->stream_index = stream_->index; | ||
| if (!is_header_wrote_) { | ||
| #ifndef ANDROID |
d2068f7 to
5cb3ffa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
支持使用Android NDK工具链编译modelbox。编译所得到的so文件,可被安卓/鸿蒙平台上的APP调用。