win7+vs2005 compiling Qt4.7.3+phonon (need to install new version of Windows SDK)

Source: Internet
Author: User
Tags microsoft website visual studio 2010

QT Official Download the source code at compile time does not inherit phonon, only provide the source, and in win7+vs2005 compile phonon encountered a lot of problems, because phonon is just a front-end program, to use its multimedia playback also need to cooperate with the QT Basic library, Phonon_backend (back end plugin) and multimedia playback backstage and so on.

Phonon only provides a set of API interface to the client program calls, while providing a specification for the backend plug-in, the back-end plug-in to pass the instructions issued by the client program, and return from the backend plug-in to the client program current media status and information, play a role in the bridge. The back end plug-in is actually read into the media, decoding and playback of the part, so in the QT environment to use phonon need:
    1. Compile phonon library: Normally QT does not compile phonon and phonon_backend by default, need to add-phonon and-phonon-backend parameters when configure, then go to Phohoh folder to compile separately;
    2. Compiling the phonon backend plugin: QT provides a usable backend plugin for the 3 platform, placed in the Src/plugins/phonon directory. To enter the directory compilation, QT will automatically select the current system corresponding to the backend plug-in. For the Windows platform, QT only provides DirectShow this backend plug-in, and called the DX SDK, so can only be compiled by VC, if it is MinGW user, you can choose-phonon-vlc-mplayer as the backend plug-in , and DirectShow is also just a framework, decoding also depends on the system installed decoder and filter, the following details are compiled this back-end plug-in process;
    3. After the backend plug-in is compiled, you can run the MediaPlayer test in demo;
install the Microsoft. Net Framework 4.0 fullBefore installing the Win7 SDK, you need to install the Microsoft. Net Framework 4.0 full to install the installation program on the Microsoft website; Installing the Win7 SDKEnsure all VC runtimes (VC + + X86/64 runtime/) before installing the Win7 SDK Redistributable) version cannot be greater than 10.0.30319, if there is more than this version of the runtime is uninstalled, otherwise it will cause the compilation to fail; After uninstalling the high-version runtime, start installing the SDK, the default option: reconfigure QT compilation optionsAfter installation, run Visual Studio 2005 command prompt, re-configure QT, first NMAKE Confclean once, clear the previously configured files, and then reconfigure Qt compile command after cleanup: Configure- Debug-and-release-platform win32-msvc2005-plugin-sql-sqlite-plugin-sql-odbc-phonon-phonon-backend-vcproj compile phonon and phonon backend separatelyAfter reconfiguration, go directly to the phonon directory to compile the phonon library%qtdir%\src\phonon, compile and then enter%qtdir%\src\plugins\phonon compile phonon backend, The error will not find the Dshow.h file because the path to the Platform SDK include file is not added to the environment variable, run script: C:\Program Files\Microsoft Sdks\windows\v7.1\bin\ SetEnv.cmd and then nmake again to compile the Phonon_ds9d4.dll and Phonon_ds94.dll, TestAt this point, running the QT comes with the example of open media playback no problem stating that the compilation was successful. Summary
    1. Previously, according to the Nokia Development documentation, for the compilation of phonon to install the DirectX SDK, and then re-compile one time later found that I do not know when to start DirectShow has been integrated into the platform SDK, this compilation installed platform The SDK version is 7.1 and already contains DirectShow, so there is no need to install the DirectX SDK.
    2. about installing the Microsoft. NET Framework 4.0 full, the first time you compile phonon on a desktop computer because the desktop has visual Studio 2010 installed, comes with the Microsoft. NET Framework 4.0, but do not know whether the full version, later compiled passed; the second compilation phonon in the notebook, the environment is Win7+visual Studio 2005, the Microsoft. Net Framework 4.0 full is not installed manually, However, all Windows Update patches have been manually completed, and the update checks that no updates are available and compiles phonon as passed.
    3. With regard to running C:\Program Files\Microsoft Sdks\windows\v7.1\bin\setenv.cmd, this script must be executed in the Visual Studio 2005 commands prompt command-line window, Setting the environment variable is only valid for the current compiled project, I initially thought that in the Windows CMD window execution can set the system environment variables, and then compile phonon backend when the error, The dshow.h file cannot be found to execute this script in the current compiled command-line window.
    4. You can save time by re-configuring QT compilation options without having to recompile the QT once, selectively compiling phonon and phonon backend.

Reprint Please specify: http://www.cnblogs.com/bingcaihuang/archive/2013/03/21/2972721.html

Win7+vs2005 compiled Qt4.7.3+phonon (need to install new version of Windows SDK)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.