简体   繁体   中英

Setting VLC drawable-hwnd still create a new window

Here I read:

Embedded window video
      --drawable-hwnd=<integer [-2147483648 .. 2147483647]>
          Window handle (HWND)
          Video will be embedded in this pre-existing window. If zero, a new window will be created.

I get the window handle of my Qt5 QML application in this way:

QObject* m_rootObject = engine.rootObjects().first();
if(m_rootObject) {
    QWindow *window = qobject_cast<QWindow *>(m_rootObject);
    if(window) {
        WId wid = window->winId();
        qDebug() << wid;
    }
}

and then I launch vlc:

vlc --drawable-hwnd=395302 udp://@:1235

but it still creates a new window. I'm working on Windows 7. Perhaps I'm not understanding what the documentation says?

I had the same problem with an RTSP stream.

Setting

--drawable-hwnd=windowhandle

seems not to be sufficient.

It only worked after I also set

--no-embedded-video

My complete command line looks like

--no-embedded-video --qt-notification=0 --qt-auto-raise=0 --qt-start-minimized --no-qt-name-in-title --no-video-title-show rtsp://127.0.0.1:8554/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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