文件后缀大小写处理

文件后缀大小写处理
pull/107/head
xufulong 5 years ago
parent ee01618426
commit c8b616d361
  1. 14
      app/CMakeLists.txt
  2. 2
      app/src/main/java/com/frank/ffmpeg/util/FileUtil.java

@ -41,12 +41,12 @@ set_target_properties( ffmpeg
PROPERTIES IMPORTED_LOCATION PROPERTIES IMPORTED_LOCATION
../../../../libs/${CMAKE_ANDROID_ARCH_ABI}/libffmpeg.so ) ../../../../libs/${CMAKE_ANDROID_ARCH_ABI}/libffmpeg.so )
add_library( mp3lame #add_library( mp3lame
SHARED # SHARED
IMPORTED ) # IMPORTED )
set_target_properties( mp3lame #set_target_properties( mp3lame
PROPERTIES IMPORTED_LOCATION # PROPERTIES IMPORTED_LOCATION
../../../../libs/${CMAKE_ANDROID_ARCH_ABI}/libmp3lame.so ) # ../../../../libs/${CMAKE_ANDROID_ARCH_ABI}/libmp3lame.so )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
@ -66,7 +66,7 @@ find_library( # Sets the name of the path variable.
target_link_libraries( # Specifies the target library. target_link_libraries( # Specifies the target library.
media-handle media-handle
mp3lame # mp3lame
ffmpeg ffmpeg
-landroid #native_window -landroid #native_window
-ljnigraphics #bitmap -ljnigraphics #bitmap

@ -111,6 +111,7 @@ public class FileUtil {
if (TextUtils.isEmpty(path)) { if (TextUtils.isEmpty(path)) {
return false; return false;
} }
path = path.toLowerCase();
return path.endsWith(TYPE_MP3) return path.endsWith(TYPE_MP3)
|| path.endsWith(TYPE_AAC) || path.endsWith(TYPE_AAC)
|| path.endsWith(TYPE_AMR) || path.endsWith(TYPE_AMR)
@ -126,6 +127,7 @@ public class FileUtil {
if (TextUtils.isEmpty(path)) { if (TextUtils.isEmpty(path)) {
return false; return false;
} }
path = path.toLowerCase();
return path.endsWith(TYPE_MP4) return path.endsWith(TYPE_MP4)
|| path.endsWith(TYPE_MKV) || path.endsWith(TYPE_MKV)
|| path.endsWith(TYPE_WEBM) || path.endsWith(TYPE_WEBM)

Loading…
Cancel
Save