diff --git a/pom.xml b/pom.xml index 86a34e2..2831558 100644 --- a/pom.xml +++ b/pom.xml @@ -47,8 +47,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.apache.maven.plugins maven-jar-plugin @@ -56,27 +91,62 @@ - com.ly.VideoInferenceApp + com.ly.VideoInferenceApp + + true + lib/ - + org.apache.maven.plugins - maven-shade-plugin - 3.2.1 + maven-dependency-plugin + 3.5.0 + copy-dependencies package - shade + copy-dependencies + + ${project.build.directory}/lib + runtime + jar + + + + + + + + org.apache.maven.plugins + maven-resources-plugin + 3.2.0 + + + copy-native-libs + package + + copy-resources + + + ${project.build.directory}/lib + + + ${project.basedir}/lib + + **/*.* + + + + - \ No newline at end of file diff --git a/src/main/java/com/ly/play/opencv/VideoPlayer.java b/src/main/java/com/ly/play/opencv/VideoPlayer.java index 5e10c71..74f7d62 100644 --- a/src/main/java/com/ly/play/opencv/VideoPlayer.java +++ b/src/main/java/com/ly/play/opencv/VideoPlayer.java @@ -35,8 +35,9 @@ public class VideoPlayer { nu.pattern.OpenCV.loadLocally(); String OS = System.getProperty("os.name").toLowerCase(); if (OS.contains("win")) { - // 使用发布版 FFmpeg DLL System.load(System.getProperty("user.dir") + "\\lib\\win\\opencv_videoio_ffmpeg470_64.dll"); + }else if (OS.contains("linux")) { + } }