Fix the FFmpeg extension build

Since gradle 4.0, CMake imported libraries are bundled in the APK, so
manually bundling them causes a duplication which breaks the build.

Issue: #7906
PiperOrigin-RevId: 332012375
This commit is contained in:
aquilescanta 2020-09-16 16:33:09 +01:00 committed by Oliver Woodman
parent 52826c860f
commit fe2bc7ba71
2 changed files with 0 additions and 9 deletions

View File

@ -13,13 +13,6 @@
// limitations under the License. // limitations under the License.
apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle" apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle"
android {
sourceSets.main {
// The directory from which to pick the ffmpeg binaries.
jniLibs.srcDir 'src/main/libs'
}
}
// Configure the native build only if ffmpeg is present to avoid gradle sync // Configure the native build only if ffmpeg is present to avoid gradle sync
// failures if ffmpeg hasn't been built according to the README instructions. // failures if ffmpeg hasn't been built according to the README instructions.
if (project.file('src/main/jni/ffmpeg').exists()) { if (project.file('src/main/jni/ffmpeg').exists()) {

View File

@ -7,7 +7,6 @@ project(libffmpeg_jni C CXX)
set(ffmpeg_location "${CMAKE_CURRENT_SOURCE_DIR}/ffmpeg") set(ffmpeg_location "${CMAKE_CURRENT_SOURCE_DIR}/ffmpeg")
set(ffmpeg_binaries "${ffmpeg_location}/android-libs/${ANDROID_ABI}") set(ffmpeg_binaries "${ffmpeg_location}/android-libs/${ANDROID_ABI}")
set(ffmpeg_output_dir "${CMAKE_CURRENT_SOURCE_DIR}/../libs/${ANDROID_ABI}")
foreach(ffmpeg_lib avutil swresample avcodec) foreach(ffmpeg_lib avutil swresample avcodec)
set(ffmpeg_lib_filename lib${ffmpeg_lib}.so) set(ffmpeg_lib_filename lib${ffmpeg_lib}.so)
@ -20,7 +19,6 @@ foreach(ffmpeg_lib avutil swresample avcodec)
${ffmpeg_lib} PROPERTIES ${ffmpeg_lib} PROPERTIES
IMPORTED_LOCATION IMPORTED_LOCATION
${ffmpeg_lib_file_path}) ${ffmpeg_lib_file_path})
file(COPY ${ffmpeg_lib_file_path} DESTINATION ${ffmpeg_output_dir})
endforeach() endforeach()
include_directories(${ffmpeg_location}) include_directories(${ffmpeg_location})