Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7cf4a2b

Browse files
author
chenyouwei
committed
fix:android basis先去除ffmpeg
1 parent 0dddc6c commit 7cf4a2b

File tree

4 files changed

+4
-62
lines changed

4 files changed

+4
-62
lines changed

‎app/src/main/java/com/hugh/basis/MainActivity.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ public void onClick(View v) {
531531
goCCMainActivity();
532532
}
533533
});
534-
goCCMainActivity();
534+
// goCCMainActivity();
535535
}
536536

537537
private void goCCMainActivity(){

‎module-ffmpeg/src/main/cpp/CMakeLists.txt‎

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -45,39 +45,3 @@ target_link_libraries( # Specifies the target library.
4545
# included in the NDK.
4646
${log-lib} )
4747

48-
# -------- 以下ffm
49-
#找到包含所有的cpp文件
50-
file(GLOB allCpp *.cpp)
51-
52-
#打印当前 cmakeLists 的路径
53-
message("当前cmakel路径: ${CMAKE_SOURCE_DIR} \n cpu架构:${CMAKE_ANDROID_ARCH_ABI}")
54-
55-
add_library(
56-
ffmpeg_lib
57-
58-
SHARED
59-
60-
ffmpeg-lib.cpp)
61-
62-
find_library(
63-
log-lib
64-
65-
log)
66-
67-
# 引入FFmpeg的头文件
68-
include_directories(${CMAKE_SOURCE_DIR}/include)
69-
70-
# 引入FFmpeg的库文件,设置内部的方式引入,指定库的目录是 -L 指定具体的库-l
71-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${CMAKE_SOURCE_DIR}/${CMAKE_ANDROID_ARCH_ABI}")
72-
73-
target_link_libraries(
74-
ffmpeg_lib
75-
76-
# 具体的库文件,链接到总库
77-
# 这样写会报错,有坑
78-
# avcodec avfilter avformat avutil swresample swscale
79-
80-
# 先把有依赖的库,先依赖进来
81-
avformat avcodec avfilter avutil swresample swscale
82-
83-
${log-lib})

‎module-ffmpeg/src/main/cpp/ffmpeg-lib.cpp‎

Lines changed: 0 additions & 22 deletions
This file was deleted.

‎module-ffmpeg/src/main/java/com/hugh/ffmpeg/CCMainActivity.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class CCMainActivity extends AppCompatActivity {
2626
// Used to load the 'native-lib' library on application startup.
2727
static {
2828
System.loadLibrary("native-lib");
29-
System.loadLibrary("ffmpeg_lib");
29+
// System.loadLibrary("ffmpeg_lib");
3030
}
3131

3232
@Override
@@ -62,7 +62,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
6262
NostaticRef();
6363
}
6464

65-
Log.e("aaa","getFFmpegVersion"+getFFmpegVersion());
65+
// Log.e("aaa","getFFmpegVersion"+getFFmpegVersion());
6666

6767

6868

@@ -73,7 +73,7 @@ public int getIntValue(){
7373
return 1;
7474
}
7575

76-
public native String getFFmpegVersion();
76+
// public native String getFFmpegVersion();
7777

7878
public native String stringFromJNI();
7979
//返回静态字符串

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /