Latest post Fri, Sep 3 2021 12:49 PM by Marianna. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • Fri, Aug 27 2021 12:18 PM

    • Charbel R
    • Not Ranked
    • Joined on Fri, Aug 27 2021
    • Posts 4
    • Points 60

    Help needed with Qt based plugins

    Hello,

    We are building a plugin for Avid Media Composer. The plugin will use a custom UI that will be launched through the DoDialog method. We are using Qt for our plugin but we are having a hard time getting it to work. Do you have any run books or documentation specifically for Qt based plugins that can help solve the problem? We saw that other plugins use Qt for their interface so it seems that this is doable?

    We installed the follow libraries:
    - QT 5.12.11 msvc2017_64.
    - Visual Studio 2017.
    - QT VS Tools.
    And made a QT plugin that works in AVID Media Composer (It compiles, loads and start functions), but when we try to create a QT Window (QT Widget) the program crash (See the error description below).
    Are we having a configuration problem? AVID doesn't find the QT components and reports the error: "this application failed to start because no qt platform plugin could be initialized".

    Can someone give us a guide on what's happening?

     

    Error description (Microsoft Visual C++ Runtime Library):

    Debug Error!

    Program: C:\Qt\5.12.11\msvc2017_64\bin\Qt5Cored.dll

    Module: 5.12.11

    File: kernel\qguiapplication.cpp

    Line: 1219

    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

    (Press Retry to debug the application)

  • Fri, Aug 27 2021 1:33 PM In reply to

    Re: Help needed with Qt based plugins

    deleted my response as incorrectly assumed this was related to the now defunct QT libraries. 

    HP Z840 3.1GHZ 20cores 128GB RAM M4000 GPU 1TB NVMe drive HP Z book 17 G2 2.7GHZ Quad core 32GB RAM Nvidia K3100M 1TB SSD drive ACI Moderator. I'm... [view my complete system specs]

     

    Broadcast & Post Production Consultant / Trainer  Avid Certified Instructor VET (Retired Early 2022)

     

    Still offering training and support for: QC/QAR Training - Understanding Digital Media - Advanced Files * Compression - Avid Ingest - PSE fixing courses and more.

    Mainly delivered remotely via zoom but onsite possible.

     

    T 07581 201248 | E pat@vet-training.co.uk

     

  • Fri, Aug 27 2021 5:02 PM In reply to

    • Charbel R
    • Not Ranked
    • Joined on Fri, Aug 27 2021
    • Posts 4
    • Points 60

    Re: Help needed with Qt based plugins

    Yes, we are referring to the programming framework that builds the plugin UI and not Quicktime :)

    Filed under: , , ,
  • Thu, Sep 2 2021 7:46 PM In reply to

    Re: Help needed with Qt based plugins

    You are experiencing https://en.wikipedia.org/wiki/DLL_Hell.

    Media Composer has it's own version of the Qt DLLs & framworks with custom patches to Qt that are not necessarily binary compatible with any externally built Qt-based AVX plugins. Your AVX plugin is loaded into the Media Composer process, so it cannot also load DLLs from an externally deployed version of the Qt libraries.

    Also, different releases of Media Composer may have significantly different patched versions of Qt. For example, the releases starting with 21.5 are built with a patched version of Qt 5.15.3 (vs2019), but 20.12 is using a special patched verson with Qt 5.12.9 and qtwebengine from 5.11.1. We also use windeployqt (and macdeployqt), so only the subset of the Qt modules needed for Media Composer are installed with the application's directory (or .app bundle on macOS).

     

    What to try first?

    Some 3rd-party AVX developers have had success with following configurations to use Qt in their plugins:

    • configure Qt to build QtSDK from source as static libraries but with a custom unique Qt namespace
    • build the plugins against these Qt static libraries.
    • On Windows, build plugin with an embedded manifest

    Even with all of those changes there may still be compatibility issues when Media Composer releases future versions with newer patched verisons of Qt.

     

    What to try next if there are still problems encountered with your AVX plugin? 

    The best solution is move the modal Qt UI into a separately deployed external process and use IPC to transfer parameter data. This is more more work to setup the plugin, but it pays off by removing the possibility DLL Hell caused by Qt symbol conflicts with Media Composer's patched versions of Qt. 

    • remove all Qt code from the AVX plugin (will need native IPC in pluing)
    • use native APIs in DoModal to create a window in Media Composer process
    • on Windows, set the owner of this plugin window to be the owner HWND of the FrontWindow in Media Composer when DoModal is called.
    • make external Qt App's UI window a child of the plugin's window
    • use native APIs to run local modal dialog message/event loop in AVX plugin
    • if rendering depends upon Qt, then use IPC & shared memory from the plugin's IAVXEffect implementation to render your external Qt process
    This is is much more robust deployment that can use your own prebuilt installation of Qt for the external process, avoiding the requirement for custom version of Qt built from source with static libraries and unique Qt namespace. In either case, please test your AVX plugin with with different versions of Media Composer and all supported versions of Windows and macOS for each of those of releases you want your plugin to support.
    Filed under: , , , ,
  • Thu, Sep 2 2021 7:48 PM In reply to

    • Marianna
    • Top 10 Contributor
    • Joined on Thu, Oct 13 2005
    • Avid
    • Posts 11,589
    • Points 256,010
    • Avid Beta Moderators
      Avid Customer Advocate
      Avid Developer Moderator
      BlogAuthor
      SystemAdministrator

    Re: Help needed with Qt based plugins

    Hey there....  

    I did get a response toyour email which I sent along to engineering Charbel :)

    Question:    We are using Qt for our plugin, but we have a hard time getting it to work. Do you have any run books or documentation specifically for Qt-based plugins to help solve the problem?

    Answer:   No we don’t have any samples on using Qt based plug-ins.

    --------

    Questions:  We saw that other plugins use Qt for their interface, so it seems that this is doable?

    Answer:   This is doable under specific conditions.

    --------

    Questions: Are we having a configuration problem? AVID doesn't find the Qt components and reports the error: "This application failed to start because no Qt platform plugin could be initialized."

    Answer:  We’ll follow-up with a response about this.  From what I understand the plug-in being developed would bring up a Qt based modal dialog.

    Let me know what else I can get them to address.....

    I will see your response as I am on this email thread.

    Marianna

    Sr. Director | Customer Experience [view my complete system specs]
  • Fri, Sep 3 2021 12:04 PM In reply to

    • Charbel R
    • Not Ranked
    • Joined on Fri, Aug 27 2021
    • Posts 4
    • Points 60

    Re: Help needed with Qt based plugins

    Thank you, Tom, for this valuable information. I will pass it on to the team and reply with the results or more questions :)

    Much appreciated!

  • Fri, Sep 3 2021 12:27 PM In reply to

    • Charbel R
    • Not Ranked
    • Joined on Fri, Aug 27 2021
    • Posts 4
    • Points 60

    Re: Help needed with Qt based plugins

    Thank you, Marianna! I will forward the answers to the team. 

    To answer your last question, yes, the plugin we are developing will launch its own UI through Avid's effects control panel, similar to many 3rd-party plugins (Baselight for Avid, Sapphire Builder, NewBlue Titler, etc.) 

    That user interface will be built on the Qt programming framework (at least our intentions at the moment).

  • Fri, Sep 3 2021 12:49 PM In reply to

    • Marianna
    • Top 10 Contributor
    • Joined on Thu, Oct 13 2005
    • Avid
    • Posts 11,589
    • Points 256,010
    • Avid Beta Moderators
      Avid Customer Advocate
      Avid Developer Moderator
      BlogAuthor
      SystemAdministrator

    Re: Help needed with Qt based plugins

    Ha Tom and I posted at the same time.   

    LOL Tom of course was much more detailed..... 

    Thanks Tom!!!!!

    Marianna

    Sr. Director | Customer Experience [view my complete system specs]
Page 1 of 1 (8 items)

© Copyright 2011 Avid Technology, Inc.  Terms of Use |  Privacy Policy |  Site Map |  Find a Reseller