简体   繁体   English

调用预编译的可执行文件

[英]calling pre-compiled executables

I am working on a project that makes use of the ffmpeg library within the framework of Qt on an Intel Windows 8.1 machine. 我正在开发一个项目,该项目在Intel Windows 8.1计算机上使用Qt框架内的ffmpeg库。 My application uses a QProcess to call the ffmpeg.exe with a list of list of arguments that works perfectly. 我的应用程序使用QProcess来调用ffmpeg.exe,并带有可以正常工作的参数列表。 I was just wondering if it would be more efficient to use the ffmpeg source with the C++ code and call functions directly using using libav.h? 我只是想知道将ffmpeg源与C ++代码一起使用并使用libav.h直接调用函数是否会更有效?

When i use the QProcess it creates a separate thread so the rest of my program is unaffected by the process. 当我使用QProcess时,它将创建一个单独的线程,因此程序的其余部分不受该进程的影响。 If i was to use the functions directly from libav.hi would need to create my own QThread and run the function in that. 如果我要直接使用libav.hi中的函数,则需要创建自己的QThread并在其中运行该函数。

Any advice would be helpful. 任何意见将是有益的。

Steve 史蒂夫

Here is my advice, first of all I do not know if linking ffmpeg source code directly will require you to use a QThread, it is possible that ffmpeg already manages threads on his own (which would be good), I also do not know precisely if linking directly is going to be more efficient in terms of CPU and RAM. 这是我的建议,首先我不知道直接链接ffmpeg源代码是否需要您使用QThread,ffmpeg可能已经自行管理线程了(这很好),我也不知道如果直接链接将在CPU和RAM方面更加有效。 For sure it's not going to be much more efficient; 当然,它的效率不会更高。 running the same code in an external process or in another thread are not so different in terms of hardware resources. 在外部进程或另一个线程中运行相同的代码在硬件资源方面并没有太大不同。

Beside that if you are looking for a better and deeper control on what is being played on screen, so for example if linking directly you think you may get some useful functions (like a fast forward or zoom in zoom out) then it could be worth a try. 除此之外,如果您想对屏幕上正在播放的内容进行更好和更深入的控制 ,例如,如果直接链接,您认为您可能会获得一些有用的功能(例如快进或放大),那么值得尝试一下。

Bye 再见

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

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