Results 1 to 2 of 2

Thread: QProcess and MူPlayer's slave mode problem in Windows Platform

  1. #1
    Join Date
    Jan 2015
    Posts
    35
    Thanks
    20
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Default QProcess and MူPlayer's slave mode problem in Windows Platform

    Hi,

    I want to run MPlayer in My application in WINDOW PLATFORM. I found that code in forum.
    Qt Code:
    1. container->setGeomerty(0,0,1280,1024);
    2. QProcess *mp=new QProcess(container);
    3. connect(mp, SIGNAL(finished(int)),this, SLOT(endPlay(int)));
    4. QString command=" -wid "+QString::number(container->winId())+" -slave "+playfile;
    5. mp->start("mplayer "+command);
    To copy to clipboard, switch view to plain text mode 
    Now I use Qt 5.4 and QX11EmbedContainer is not included in Qt 5.4.
    What is the replacement of QX11EmbedContainer in Qt 5.4?

    I replaced QWidget instead of QX11EmbedContainer in Qt 5.4 as follow:
    Qt Code:
    1. QWidget *Wd = new QWidget(this);
    2. const QString mplayerPath ("C:/mplayer.exe ");
    3. args << " -slave -quiet -ac mad -zoom -vo directx:noaccel -wid " << QString::number(Wd->winId()) << "c:/text.mpg ";
    4. MyProcess = new QProcess (this);
    5. MyProcess -> start (mplayerPath, args);
    6. Wd->show();
    To copy to clipboard, switch view to plain text mode 
    video is played separately from my app's Form. I want it embedded in my Form.

    Thanks in advance.
    Last edited by binary001; 24th January 2015 at 17:55.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QProcess and MူPlayer's slave mode problem in Windows Platform

    Quote Originally Posted by binary001 View Post
    Now I use Qt 5.4 and QX11EmbedContainer is not included in Qt 5.4.
    It wouldn't help you if it did exist. As its name suggests it is for X11.

    Quote Originally Posted by binary001 View Post
    What is the replacement of QX11EmbedContainer in Qt 5.4?
    Qt5's QWindow class has the option of embedding a window given its winId, QWindow::fromWinId().
    Not all platforms support that (called the foreign window capability), but I think Windows does.

    Of course the way it works is the other way around, the embedee provides the ID and the embedder works with that.

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    binary001 (24th January 2015)

Similar Threads

  1. Qt 5 QProcess Strange Problem on Windows.
    By harinlen in forum Qt Programming
    Replies: 6
    Last Post: 1st July 2013, 01:27
  2. Cross-platform Windows & Mac: Font size problem
    By monkazer in forum Qt Programming
    Replies: 3
    Last Post: 25th July 2012, 15:10
  3. Problem using the QPSQL plugin on Windows x64 in Debug mode
    By code_talker in forum Qt Programming
    Replies: 4
    Last Post: 12th August 2010, 13:01
  4. Flash Player Crashes in linux platform
    By Peter Jerald in forum Qt Programming
    Replies: 1
    Last Post: 6th July 2010, 08:54
  5. Problem using QProcess on Windows XP
    By shopov in forum Newbie
    Replies: 3
    Last Post: 29th April 2010, 12:28

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.