简体   繁体   English

为其他人编译 OpenCV + Gstreamer

[英]Compile OpenCV + Gstreamer for others

I created a project which uses OpenCV and Gstreamer (receiving udp stream), It's working perfectly fine if open with Visual Studio (Run button).我创建了一个项目,它使用 OpenCV 和 Gstreamer(接收 udp 流),如果使用 Visual Studio(运行按钮)打开,它工作得非常好。 But after compiling Release x64 MT and trying I not only need to throw a whole lot of GStreamer.dll files to open my app but even after it opens successfully when It comes to opening a stream I get a warning, because of which my program is not working (Capture return false)但是在编译 x64 MT 并尝试之后,我不仅需要抛出大量 GStreamer.dll 文件来打开我的应用程序,而且即使在打开 stream 时成功打开后,我也会收到警告,因此我的程序是不工作(捕获返回假)

[ WARN:0] global F:\Code\opencv_4.5.1\opencv-4.5.1\modules\videoio\src\cap_gstreamer.cpp (734) cv::GStreamerCapture::open OpenCV | GStreamer warning: Error opening bin: no element "udpsrc"
[ WARN:0] global F:\Code\opencv_4.5.1\opencv-4.5.1\modules\videoio\src\cap_gstreamer.cpp (501) cv::GStreamerCapture::isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created

It seems like it can't find something.好像什么都找不到。 My question is:我的问题是:

How to compile my project so any other Windows computer could open it and find all needed files?如何编译我的项目,以便任何其他 Windows 计算机可以打开它并找到所有需要的文件? (bonus points for hiding.dlls) (hidding.dlls 的奖励积分)

Thanks谢谢

Ok I found out, for some reason you need o move.dll files from GStreamer /bin folder to your application main directory, and in the previous folder copy GStreamer /lib folder好的,我发现,由于某种原因,您需要将 GStreamer /bin 文件夹中的文件移动到您的应用程序主目录中,然后在上一个文件夹中复制 GStreamer /lib 文件夹

/MyFolder
   /my app
       /*.dll
       /myapp.exe
   /lib

*.dll-s from " \gstreamer\1.0\x86_64\bin " /lib from " \gstreamer\1.0\x86_64 " *.dll-s 来自“ \gstreamer\1.0\x86_64\bin ” /lib 来自“ \gstreamer\1.0\x86_64 ”

A whole lot of files, and it's breaking my directory organization but it's finally working - I someone found out how to fix/improve that, please let me know:wink:一大堆文件,它破坏了我的目录组织,但它终于开始工作了——我有人发现了如何修复/改进它,请告诉我:wink:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM