Skip to content

Commit 2953e69

Browse files
committed
add source
1 parent b033200 commit 2953e69

File tree

274 files changed

+40261
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

274 files changed

+40261
-0
lines changed

app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/CMakeLists.txt

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
cmake_minimum_required(VERSION 3.4.1)
2+
3+
set(lib_src_DIR ${CMAKE_SOURCE_DIR}/jni_libs/${ANDROID_ABI})
4+
include_directories(${CMAKE_SOURCE_DIR}/jni_include)
5+
6+
add_library(avcodec SHARED IMPORTED)
7+
set_target_properties(avcodec PROPERTIES IMPORTED_LOCATION ${lib_src_DIR}/libavcodec-57.so)
8+
9+
add_library(avformat SHARED IMPORTED)
10+
set_target_properties(avformat PROPERTIES IMPORTED_LOCATION ${lib_src_DIR}/libavformat-57.so)
11+
12+
add_library(avutil SHARED IMPORTED)
13+
set_target_properties(avutil PROPERTIES IMPORTED_LOCATION ${lib_src_DIR}/libavutil-55.so)
14+
15+
add_library(avfilter SHARED IMPORTED)
16+
set_target_properties(avfilter PROPERTIES IMPORTED_LOCATION ${lib_src_DIR}/libavfilter-6.so)
17+
18+
add_library(
19+
xl_render
20+
SHARED
21+
22+
src/main/cpp/xl_audio/xl_audio_player.h
23+
src/main/cpp/xl_audio/xl_audio_player.c
24+
src/main/cpp/xl_audio/xl_audio_filter.h
25+
src/main/cpp/xl_audio/xl_audio_filter.c
26+
27+
src/main/cpp/xl_container/xl_packet_queue.h
28+
src/main/cpp/xl_container/xl_packet_queue.c
29+
src/main/cpp/xl_container/xl_packet_pool.h
30+
src/main/cpp/xl_container/xl_packet_pool.c
31+
src/main/cpp/xl_container/xl_frame_queue.h
32+
src/main/cpp/xl_container/xl_frame_queue.c
33+
src/main/cpp/xl_container/xl_frame_pool.h
34+
src/main/cpp/xl_container/xl_frame_pool.c
35+
36+
src/main/cpp/xl_decoders/xl_player_video_sw_decode_thread.h
37+
src/main/cpp/xl_decoders/xl_player_video_sw_decode_thread.c
38+
src/main/cpp/xl_decoders/xl_player_video_hw_decode_thread.h
39+
src/main/cpp/xl_decoders/xl_player_video_hw_decode_thread.c
40+
src/main/cpp/xl_decoders/xl_player_audio_decode_thread.h
41+
src/main/cpp/xl_decoders/xl_player_audio_decode_thread.c
42+
src/main/cpp/xl_decoders/xl_mediacodec.h
43+
src/main/cpp/xl_decoders/xl_mediacodec.c
44+
45+
src/main/cpp/xl_video/xl_tracker.h
46+
src/main/cpp/xl_video/xl_tracker.c
47+
src/main/cpp/xl_video/xl_mat4.h
48+
src/main/cpp/xl_video/xl_mat4.c
49+
src/main/cpp/xl_video/xl_model.h
50+
src/main/cpp/xl_video/xl_model.c
51+
src/main/cpp/xl_video/xl_mesh_factory.h
52+
src/main/cpp/xl_video/xl_mesh_factory.c
53+
src/main/cpp/xl_video/xl_model_ball.h
54+
src/main/cpp/xl_video/xl_model_ball.c
55+
src/main/cpp/xl_video/xl_model_rect.h
56+
src/main/cpp/xl_video/xl_model_rect.c
57+
src/main/cpp/xl_video/xl_model_vr.h
58+
src/main/cpp/xl_video/xl_model_vr.c
59+
src/main/cpp/xl_video/xl_texture.h
60+
src/main/cpp/xl_video/xl_texture.c
61+
src/main/cpp/xl_video/xl_glsl_program.h
62+
src/main/cpp/xl_video/xl_glsl_program.c
63+
src/main/cpp/xl_video/xl_video_render.h
64+
src/main/cpp/xl_video/xl_video_render.c
65+
src/main/cpp/xl_video/xl_player_gl_thread.h
66+
src/main/cpp/xl_video/xl_player_gl_thread.c
67+
68+
src/main/cpp/xl_types/xl_macro.h
69+
src/main/cpp/xl_types/xl_player_types.h
70+
src/main/cpp/xl_types/xl_video_render_types.h
71+
72+
src/main/cpp/xl_utils/xl_statistics.h
73+
src/main/cpp/xl_utils/xl_statistics.c
74+
src/main/cpp/xl_utils/xl_clock.h
75+
src/main/cpp/xl_utils/xl_clock.c
76+
src/main/cpp/xl_utils/xl_jni_reflect.h
77+
src/main/cpp/xl_utils/xl_jni_reflect.c
78+
79+
src/main/cpp/xl_player.c
80+
src/main/cpp/xl_playerCore.h
81+
src/main/cpp/xl_playerCore.c
82+
src/main/cpp/xl_player_read_thread.h
83+
src/main/cpp/xl_player_read_thread.c
84+
85+
86+
)
87+
add_library(
88+
ekf
89+
SHARED
90+
src/main/cpp/xl_head_tracker/Vector3d.h
91+
src/main/cpp/xl_head_tracker/Vector3d.cpp
92+
src/main/cpp/xl_head_tracker/SO3Util.h
93+
src/main/cpp/xl_head_tracker/SO3Util.cpp
94+
src/main/cpp/xl_head_tracker/Matrix3x3d.h
95+
src/main/cpp/xl_head_tracker/Matrix3x3d.cpp
96+
src/main/cpp/xl_head_tracker/OrientationEKF.h
97+
src/main/cpp/xl_head_tracker/OrientationEKF.cpp
98+
src/main/cpp/xl_head_tracker/HeadTracker.h
99+
src/main/cpp/xl_head_tracker/HeadTracker.cpp
100+
)
101+
102+
find_library( log-lib log )
103+
find_library(android-lib android)
104+
find_library(bmp jnigraphics)
105+
find_library(glesv2-lib GLESv2)
106+
find_library(egl-lib EGL)
107+
find_library(sles-lib OpenSLES)
108+
109+
if (${CMAKE_SYSTEM_VERSION} MATCHES "21")
110+
find_library(media-ndk mediandk)
111+
target_link_libraries(
112+
xl_render
113+
ekf
114+
avcodec
115+
avformat
116+
avutil
117+
avfilter
118+
${log-lib}
119+
${bmp}
120+
${android-lib}
121+
${egl-lib}
122+
${glesv2-lib}
123+
${sles-lib}
124+
${media-ndk}
125+
)
126+
else (${CMAKE_SYSTEM_VERSION} LESS "21")
127+
target_link_libraries(
128+
xl_render
129+
ekf
130+
avcodec
131+
avformat
132+
avutil
133+
avfilter
134+
${log-lib}
135+
${bmp}
136+
${android-lib}
137+
${egl-lib}
138+
${glesv2-lib}
139+
${sles-lib}
140+
)
141+
endif(${CMAKE_SYSTEM_VERSION} MATCHES "21")

app/build.gradle

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 25
5+
buildToolsVersion '25.0.3'
6+
sourceSets {
7+
main {
8+
jniLibs.srcDirs = ["jni_libs"]
9+
}
10+
}
11+
defaultConfig {
12+
applicationId "com.cls.xl.xl"
13+
minSdkVersion 21
14+
targetSdkVersion 25
15+
versionCode 1
16+
versionName "1.0"
17+
ndk {
18+
abiFilters 'armeabi', 'armeabi-v7a' ,'arm64-v8a'
19+
}
20+
externalNativeBuild {
21+
cmake {
22+
cppFlags "-frtti -fexceptions"
23+
}
24+
}
25+
}
26+
buildTypes {
27+
release {
28+
minifyEnabled false
29+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
30+
}
31+
}
32+
externalNativeBuild {
33+
cmake {
34+
path "CMakeLists.txt"
35+
}
36+
}
37+
productFlavors {
38+
}
39+
}
40+
41+
dependencies {
42+
compile fileTree(include: ['*.jar'], dir: 'libs')
43+
compile 'com.android.support:recyclerview-v7:25.3.1'
44+
compile 'com.android.support:appcompat-v7:25.3.1'
45+
}

0 commit comments

Comments
 (0)