From 9ea81b472b846da82a955646abdb1ba7d27f1dd9 Mon Sep 17 00:00:00 2001 From: sulv Date: Sat, 12 Oct 2024 22:38:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=93=E7=98=A6=E5=8C=85?= =?UTF-8?q?=E7=9A=84=E6=94=AF=E6=8C=81=EF=BC=8C=E6=89=93=E5=8C=85=E5=90=8E?= =?UTF-8?q?=E4=BB=85=E9=9C=80160kb?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 82 +++++++++++++++++-- .../java/com/ly/play/opencv/VideoPlayer.java | 3 +- 2 files changed, 78 insertions(+), 7 deletions(-) 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")) { + } }